Giter VIP home page Giter VIP logo

puppetlabs-helm's People

Contributors

adrianiurca avatar ccaum avatar chelnak avatar daianamezdrea avatar davejrt avatar david22swan avatar davids avatar devcfgc avatar disha-maker avatar dseapy avatar eamonntp avatar eimlav avatar eputnam avatar florindragos avatar gregohardy avatar hdeadman avatar lionce avatar lukasaud avatar michaeltlombardi avatar olblak avatar pmcmaw avatar puetzp avatar sanfrancrisko avatar sathieu avatar scotty-c avatar sheenaajay avatar tphoney avatar walkamongus avatar zonart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppetlabs-helm's Issues

Tests not working

I'm trying to contribute to this module, but I noticed a couple of errors.

  1. The travis.yml is incorrect, so the spec tests aren't running properly
  2. When running the tests, "No implicit conversion of Nil into String" gets thrown

helm init flags being parsed incorrectly

When I try to TLS-secure my helm installation, I run into the following error:

Error: 'helm init --service-account 'tiller' --tiller-namespace 'kube-system' --tiller-tls-cert '/etc/kubernetes/pki/tiller.crt' --tiller-tls-key '/etc/kubernetes/pki/tiller.key' --tls_ca_cert '/etc/kubernetes/pki/tiller_ca.crt' --upgrade' returned 1 instead of one of [0]
Error: /Stage[main]/Helm::Config/Helm::Helm_init[helm-kube-system-master]/Exec[helm kube-system init]/returns: change from 'notrun' to ['0'] failed: 'helm init --service-account 'tiller' --tiller-namespace 'kube-system' --tiller-tls-cert '/etc/kubernetes/pki/tiller.crt' --tiller-tls-key '/etc/kubernetes/pki/tiller.key' --tls_ca_cert '/etc/kubernetes/pki/tiller_ca.crt' --upgrade' returned 1 instead of one of [0]

There seems to be a typo in this ruby function:

flags << "--tls_ca_cert '#{opts['tls_ca_cert']}'" if opts['tls_ca_cert'] && opts['tls_ca_cert'].to_s != 'undef'

The flag should be named --tls-ca-cert.
Same is true for dry-run

Fortunately just a very minor issue!

helm::chart generates invalid command and fails

What you expected to happen?

Should install the helm chart to our kubernetes cluster in the specified namespace with the specified values and leave off any helm options that are empty.

What happened?

Generates invalid helm command and errors out:

# Generated command and output
$ helm install --ca-file '' --cert-file '' --key-file '' --key-ring '' --home '' --host '' --kube-context '' --name 'internal_application' --name-template '' --namespace 'internal-application' --repo ''  --values ./deploy/chart/internal-application.values.yaml \
>  --timeout '' --tiller-namespace 'kube-system' --tls-ca-cert '' --tls-cert '' --tls-key '' --version '' 'deploy/chart/internal-application'
Error: unknown flag: --key-ring
# Output 2
Error: invalid argument "" for --timeout: strconv.ParseInt: parsing "": invalid syntax
# Output 3
Error: unknown flag: --Atls-key

How to reproduce it?

Puppet code that reproduces issue:

helm::chart { 'internal_application':
  ensure       => present,
  chart        => '<path/to/chart/directory>',
  env          => $env,
  path         => $path,
  namespace => 'internal_application',
  values     => ['<path/to/internal_app.values.yaml/file>'],
  release_name => 'internal_application',
}

Anything else we need to know?

Should automatically default the ENV and PATH to the local user's settings and assume that helm is being run from a client desktop, such as a Macbook, Windows, or Linux desktop if those are not set.

Versions:

$ puppet --version
6.2.0

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.3", GitCommit:"721bfa751924da8d1680787490c54b9179b1fed0", GitTreeState:"clean", BuildDate:"2019-02-01T20:08:12Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.5-gke.5", GitCommit:"9aba9c1237d9d2347bef28652b93b1cba3aca6d8", GitTreeState:"clean", BuildDate:"2018-12-11T02:36:50Z", GoVersion:"go1.10.3b4", Compiler:"gc", Platform:"linux/amd64"}

$ helm version
Client: &version.Version{SemVer:"v2.10.0", GitCommit:"9ad53aac42165a5fadc6c87be0dea6b115f93090", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.10.0", GitCommit:"9ad53aac42165a5fadc6c87be0dea6b115f93090", GitTreeState:"clean"}

$ facter os
{
  "name": "Ubuntu",
  "family": "Debian",
  "release": {
    "major": "18.10",
    "full": "18.10"
  },
  "lsb": {
    "distcodename": "cosmic",
    "distid": "Ubuntu",
    "distdescription": "Pop!_OS 18.10",
    "distrelease": "18.10",
    "majdistrelease": "18.10"
  }
}

$ puppet module list
/home/dhollinger/.puppetlabs/bolt-code/modules
├── puppet-archive (v3.2.1)
├── puppetlabs-helm (v0.1.2)
├── puppetlabs-stdlib (v5.2.0)
└── puppetlabs-vcsrepo (v2.4.0)

Logs:

Debug: Runtime environment: puppet_version=6.2.0, ruby_version=2.5.3, run_mode=user, default_encoding=UTF-8
Debug: Loading external facts from /home/dhollinger/.puppetlabs/opt/puppet/cache/facts.d
Info: Loading facts
Debug: Loading facts from /home/dhollinger/.puppetlabs/bolt-code/modules/vcsrepo/lib/facter/vcsrepo_svn_ver.rb
Info: Loading facts
Debug: Loading facts from /home/dhollinger/.puppetlabs/bolt-code/modules/archive/lib/facter/archive_windir.rb
Info: Loading facts
Debug: Loading facts from /home/dhollinger/.puppetlabs/bolt-code/modules/stdlib/lib/facter/package_provider.rb
Debug: Loading facts from /home/dhollinger/.puppetlabs/bolt-code/modules/stdlib/lib/facter/service_provider.rb
Debug: Loading facts from /home/dhollinger/.puppetlabs/bolt-code/modules/stdlib/lib/facter/pe_version.rb
Debug: Loading facts from /home/dhollinger/.puppetlabs/bolt-code/modules/stdlib/lib/facter/facter_dot_d.rb
Debug: Loading facts from /home/dhollinger/.puppetlabs/bolt-code/modules/stdlib/lib/facter/root_home.rb
Debug: Loading facts from /home/dhollinger/.puppetlabs/bolt-code/modules/stdlib/lib/facter/puppet_settings.rb
Debug: Facter: Found no suitable resolves of 1 for ec2_metadata
Debug: Facter: value for ec2_metadata is still nil
Debug: Reloading pip package provider
Debug: Failed to load library 'cfpropertylist' for feature 'cfpropertylist': cannot load such file -- cfpropertylist
Debug: Failed to load library 'cfpropertylist' for feature 'cfpropertylist': cannot load such file -- cfpropertylist
Debug: Facter: value for agent_specified_environment is still nil
Debug: Facter: Found no suitable resolves of 2 for iphostnumber
Debug: Facter: value for iphostnumber is still nil
Debug: Facter: Found no suitable resolves of 1 for gce
Debug: Facter: value for gce is still nil
Debug: Facter: Found no suitable resolves of 1 for ec2_metadata
Debug: Facter: value for ec2_metadata is still nil
Debug: Facter: Found no suitable resolves of 1 for ec2_userdata
Debug: Facter: value for ec2_userdata is still nil
Debug: Facter: value for zpool_version is still nil
Debug: Facter: value for zfs_version is still nil
Debug: Facter: ruby-augeas not available
Debug: Facter: value for augeasversion is still nil
Debug: Facter: value for is_rsc is still nil
Debug: Facter: value for is_rsc is still nil
Debug: Facter: Found no suitable resolves of 1 for rsc_region
Debug: Facter: value for rsc_region is still nil
Debug: Facter: value for is_rsc is still nil
Debug: Facter: Found no suitable resolves of 1 for rsc_instance_id
Debug: Facter: value for rsc_instance_id is still nil
Debug: Facter: Found no suitable resolves of 1 for zonename
Debug: Facter: value for zonename is still nil
Debug: Facter: Found no suitable resolves of 1 for system32
Debug: Facter: value for system32 is still nil
Debug: Facter: Found no suitable resolves of 1 for xendomains
Debug: Facter: value for xendomains is still nil
Debug: Facter: Found no suitable resolves of 1 for processor
Debug: Facter: value for processor is still nil
Debug: Facter: value for vlans is still nil
Debug: Facter: value for ipaddress6 is still nil
Debug: Facter: value for network_enp2s0f1 is still nil
Debug: Facter: value for network_virbr0_nic is still nil
Debug: Facter: value for lsbrelease is still nil
Debug: Facter: Found no suitable resolves of 1 for selinux_enforced
Debug: Facter: value for selinux_enforced is still nil
Debug: Facter: Found no suitable resolves of 1 for selinux_policyversion
Debug: Facter: value for selinux_policyversion is still nil
Debug: Facter: Found no suitable resolves of 1 for selinux_current_mode
Debug: Facter: value for selinux_current_mode is still nil
Debug: Facter: Found no suitable resolves of 1 for selinux_config_mode
Debug: Facter: value for selinux_config_mode is still nil
Debug: Facter: Found no suitable resolves of 1 for selinux_config_policy
Debug: Facter: value for selinux_config_policy is still nil
Debug: Facter: value for lsbminordistrelease is still nil
Debug: Facter: Found no suitable resolves of 2 for swapencrypted
Debug: Facter: value for swapencrypted is still nil
Debug: Facter: value for ipaddress6_docker0 is still nil
Debug: Facter: value for ipaddress_enp2s0f1 is still nil
Debug: Facter: value for ipaddress6_enp2s0f1 is still nil
Debug: Facter: value for netmask_enp2s0f1 is still nil
Debug: Facter: value for ipaddress6_lo is still nil
Debug: Facter: value for macaddress_lo is still nil
Debug: Facter: value for ipaddress6_virbr0 is still nil
Debug: Facter: value for ipaddress_virbr0_nic is still nil
Debug: Facter: value for ipaddress6_virbr0_nic is still nil
Debug: Facter: value for netmask_virbr0_nic is still nil
Debug: Facter: value for ipaddress6_wlp3s0 is still nil
Debug: Facter: value for cfkey is still nil
Debug: Facter: value for sshdsakey is still nil
Debug: Facter: value for sshdsakey is still nil
Debug: Facter: value for sshfp_dsa is still nil
Debug: Facter: Found no suitable resolves of 1 for archive_windir
Debug: Facter: value for archive_windir is still nil
Debug: Puppet::Type::Package::ProviderRpm: file rpm does not exist
Debug: Puppet::Type::Package::ProviderZypper: file /usr/bin/zypper does not exist
Debug: Puppet::Type::Package::ProviderUp2date: file /usr/sbin/up2date-nox does not exist
Debug: Puppet::Type::Package::ProviderAptitude: file /usr/bin/aptitude does not exist
Debug: Puppet::Type::Package::ProviderPortupgrade: file /usr/local/sbin/portupgrade does not exist
Debug: Puppet::Type::Package::ProviderPacman: file /usr/bin/pacman does not exist
Debug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not exist
Debug: Puppet::Type::Package::ProviderUrpmi: file urpmi does not exist
Debug: Puppet::Type::Package::ProviderPkgin: file pkgin does not exist
Debug: Puppet::Type::Package::ProviderPkg: file /usr/bin/pkg does not exist
Debug: Puppet::Type::Package::ProviderAix: file /usr/bin/lslpp does not exist
Debug: Puppet::Type::Package::ProviderNim: file /usr/sbin/nimclient does not exist
Debug: Puppet::Type::Package::ProviderSun: file /usr/bin/pkginfo does not exist
Debug: Puppet::Type::Package::ProviderOpenbsd: file pkg_info does not exist
Debug: Puppet::Type::Package::ProviderYum: file yum does not exist
Debug: Puppet::Type::Package::ProviderDnf: file dnf does not exist
Debug: Puppet::Type::Package::ProviderOpkg: file opkg does not exist
Debug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swinstall does not exist
Debug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not exist
Debug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not exist
Debug: Puppet::Type::Package::ProviderFreebsd: file /usr/sbin/pkg_info does not exist
Debug: Puppet::Type::Package::ProviderPorts: file /usr/local/sbin/portupgrade does not exist
Debug: Puppet::Type::Package::ProviderPkgng: file /usr/local/sbin/pkg does not exist
Debug: Puppet::Type::Package::ProviderTdnf: file tdnf does not exist
Debug: Puppet::Type::Package::ProviderAptrpm: file rpm does not exist
Debug: Puppet::Type::Package::ProviderPortage: file /usr/bin/emerge does not exist
Debug: /Package[dummy]: Provider apt does not support features virtual_packages; not managing attribute allow_virtual
Debug: Puppet::Type::Service::ProviderInit: false value when expecting true
Debug: Puppet::Type::Service::ProviderRedhat: file /sbin/chkconfig does not exist
Debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc does not exist
Debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not exist
Debug: Puppet::Type::Service::ProviderOpenrc: file /bin/rc-status does not exist
Debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl does not exist
Debug: Puppet::Type::Service::ProviderOpenbsd: file /usr/sbin/rcctl does not exist
Debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update does not exist
Debug: Puppet::Type::Service::ProviderUpstart: file /sbin/start does not exist
Debug: /Service[dummy]: Provider systemd does not support features configurable_timeout; not managing attribute timeout
Debug: Facter: value for pe_version is still nil
Debug: Facter: value for pe_version is still nil
Debug: Facter: value for pe_version is still nil
Debug: Facter: Found no suitable resolves of 1 for pe_major_version
Debug: Facter: value for pe_major_version is still nil
Debug: Facter: value for pe_version is still nil
Debug: Facter: Found no suitable resolves of 1 for pe_minor_version
Debug: Facter: value for pe_minor_version is still nil
Debug: Facter: value for pe_version is still nil
Debug: Facter: Found no suitable resolves of 1 for pe_patch_version
Debug: Facter: value for pe_patch_version is still nil
Debug: Reset text domain to :production
Debug: importing '/home/dhollinger/.puppetlabs/bolt-code/modules/helm/manifests/init.pp' in environment production
Debug: importing '/home/dhollinger/.puppetlabs/bolt-code/modules/helm/manifests/chart.pp' in environment production
Debug: Automatically imported helm::chart from helm/chart into production
Debug: importing '/home/dhollinger/.puppetlabs/bolt-code/modules/helm/manifests/params.pp' in environment production
Debug: Automatically imported helm::params from helm/params into production
Notice: Compiled catalog for pop-os.localdomain in environment production in 0.13 seconds
Debug: Creating default schedules
Debug: Loaded state in 0.00 seconds
Debug: Loaded state in 0.00 seconds
Info: Applying configuration version '1551122246'
Debug: /Stage[main]/Main/File[/home/dhollinger/workspace/flywheel/slerminal/deploy/chart/internal-application.values.yaml]/before: before to Helm::Chart[internal-application]
Notice: /Stage[main]/Main/File[/home/dhollinger/workspace/flywheel/slerminal/deploy/chart/internal-application.values.yaml]/ensure: defined content as '{md5}e9c9bb03a8dde5ae60e930d37657e789'
Debug: /Stage[main]/Main/File[/home/dhollinger/workspace/flywheel/slerminal/deploy/chart/internal-application.values.yaml]: The container Class[Main] will propagate my refresh event
Debug: Exec[helm install deploy/chart/internal-application](provider=posix): Executing check 'helm ls --tiller-namespace kube-system | grep internal-application'
Debug: Executing: 'helm ls --tiller-namespace kube-system | grep internal-application'
Debug: Exec[helm install deploy/chart/internal-application](provider=posix): Executing 'helm install --ca-file '' --cert-file '' --key-file '' --key-ring '' --home '' --host '' --kube-context '' --name 'internal-application' --name-template '' --namespace 'internal-application' --repo ''  --values ./deploy/chart/internal-application.values.yaml \
 --timeout '' --tiller-namespace 'kube-system' --tls-ca-cert '' --tls-cert '' --tls-key '' --version '' 'deploy/chart/internal-application''
Debug: Executing: 'helm install --ca-file '' --cert-file '' --key-file '' --key-ring '' --home '' --host '' --kube-context '' --name 'internal-application' --name-template '' --namespace 'internal-application' --repo ''  --values ./deploy/chart/internal-application.values.yaml \
 --timeout '' --tiller-namespace 'kube-system' --tls-ca-cert '' --tls-cert '' --tls-key '' --version '' 'deploy/chart/internal-application''
Notice: /Stage[main]/Main/Helm::Chart[internal-application]/Exec[helm install deploy/chart/internal-application]/returns: Error: unknown flag: --key-ring
Error: 'helm install --ca-file '' --cert-file '' --key-file '' --key-ring '' --home '' --host '' --kube-context '' --name 'internal-application' --name-template '' --namespace 'internal-application' --repo ''  --values ./deploy/chart/internal-application.values.yaml \
 --timeout '' --tiller-namespace 'kube-system' --tls-ca-cert '' --tls-cert '' --tls-key '' --version '' 'deploy/chart/internal-application'' returned 1 instead of one of [0]
Error: /Stage[main]/Main/Helm::Chart[internal-application]/Exec[helm install deploy/chart/internal-application]/returns: change from 'notrun' to ['0'] failed: 'helm install --ca-file '' --cert-file '' --key-file '' --key-ring '' --home '' --host '' --kube-context '' --name 'internal-application' --name-template '' --namespace 'internal-application' --repo ''  --values ./deploy/chart/internal-application.values.yaml \
 --timeout '' --tiller-namespace 'kube-system' --tls-ca-cert '' --tls-cert '' --tls-key '' --version '' 'deploy/chart/internal-application'' returned 1 instead of one of [0]
Debug: Helm::Chart[internal-application]: Resource is being skipped, unscheduling all events
Debug: Class[Main]: Resource is being skipped, unscheduling all events
Info: Class[Main]: Unscheduling all events on Class[Main]
Debug: Stage[main]: Resource is being skipped, unscheduling all events
Debug: Finishing transaction 46951431239960
Debug: Storing state
Debug: Pruned old state cache entries in 0.00 seconds
Debug: Stored state in 0.01 seconds
Notice: Applied catalog in 0.81 seconds
Debug: Applying settings catalog for sections reporting, metrics
Debug: Finishing transaction 46951426093660
Debug: Received report to process from pop-os.localdomain
Debug: Processing report from pop-os.localdomain with processor Puppet::Reports::Store

Puppet 8x compatibility

Hello,
Is it possible to fix the module with Puppet 8x compatibility ?

For example, currently :

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Unknown variable: '::architecture'. (file: /etc/puppetlabs/code/environments/flp_puppet8/modules/helm/manifests/binary.pp, line: 9, column: 8) on node cladev-ubu2004.adm.fr.clara.net
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Thanks.

Missing parameter

tiller_image is missing from the parameters in init.pp. Should have the following between stable_repo_url and tiller_namespace:

Optional[String] $tiller_image = $helm::params::tiller_image,

mark repo as helm 3 incompatible

This module is alone for helm 2 and not able to install or handle helm 3 without changes. May we add this as a flag? Better update the module to also handle helm 3. This would be nice.

Overriding the default init define

There's a single parameter to init helm. However, the helm::helm_init defined type has lots of different options.

Because of the way the module has been constructed, specifying them is way more difficult than it needs to be.

In addition to this, the helm::config class seems to be largely redundany in that it's just a meta class that includes helm::helm_init.

What's the preferred way to pass these params through the default define? It's possible to specify

class { 'helm':
  init => false,
}

and then specify your own define, but why is that necessary?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.