This module installs the the Helm package manager, which consists of the Helm client (Helm) and the Helm server (Tiller), and it also manages the Helm deployments. The Helm package manager installs and manages Kubernetes applications.
This module is not supported or maintained by Puppet and does not qualify for Puppet Support plans. It's provided without guarantee or warranty and you can use it at your own risk. All bugfixes, updates, and new feature development will come from community contributions. [tier:community]
Before installing the helm module, create a Kubernetes service account and install a Kubernetes cluster, including kubectl. For more information about Kubernetes and kubectl, see the Kubernetes docs.
To install the helm module, include the helm
class:
include 'helm'
To customise options, such as the version, the service account, or the Tiller namespace, add the following code to the manifest file:
class { 'helm':
version => '2.6.0',
service_account => 'my_account',
tiller_namespaces => ['my_namespace'],
}
A Helm chart is a collection of files that describe a related set of Kubernetes resources. To create a Helm chart, add the following code to the manifest file:
helm::create { 'myapp':
env => $env,
chart_path => '/tmp',
chart_name => 'myapp',
path => $path,
}
To package a Helm chart, add the following code to the manifest file:
helm::package { 'myapp':
chart_path => '/tmp',
chart_name => 'myapp',
destination => '/root',
env => $env,
path => $path,
version => '0.1.0',
}
To deploy a Helm chart, add the following code to the manifest file:
helm::chart { 'mysql':
ensure => present,
chart => 'stable/mysql',
env => $env,
path => $path,
release_name => 'mysql',
}
To add a Helm chart repository, add the following code to the manifest file:
helm::repo { 'myrepo':
ensure => present,
env => $env,
path => $path,
username => 'username',
password => 'password',
repo_name => 'myrepo',
url => 'http://myserver/charts'
}
To update a Helm chart repository, add the following code to the manifest file:
helm::repo_update { 'update':
env => $env,
path => $path,
update => true
}
This module is compatible only with the Linux
kernel.
If you would like to contribute to this module please follow the rules in the CONTRIBUTING.md.
To run the acceptance tests you can use Puppet Litmus with the Vagrant provider by using the following commands:
bundle exec rake 'litmus:provision_list[all_supported]'
bundle exec rake 'litmus:install_agent[puppet5]'
bundle exec rake 'litmus:install_module'
bundle exec rake 'litmus:acceptance:parallel'
As currently Litmus does not allow memory size and cpu size parameters for the Vagrant provisioner task we recommend to manually update the Vagrantfile used by the provisioner and add at least the following specifications for the puppetlabs-kubernetes module acceptance tests:
Update Vagrantfile in the file: spec/fixtures/modules/provision/tasks/vagrant.rb vf = <<-VF Vagrant.configure("2") do |config| config.vm.box = '#{platform}' config.vm.boot_timeout = 600 config.ssh.insert_key = false config.vm.hostname = "testkube" config.vm.provider "virtualbox" do |vb| vb.memory = "2048" vb.cpus = "2" end #{network} #{synced_folder} end VF