diff --git a/puppet-manifests/src/manifests/controller.pp b/puppet-manifests/src/manifests/controller.pp index 398e4004d..d239c1744 100644 --- a/puppet-manifests/src/manifests/controller.pp +++ b/puppet-manifests/src/manifests/controller.pp @@ -45,6 +45,7 @@ include ::platform::dockerdistribution include ::platform::containerd::controller include ::platform::kubernetes::master include ::platform::helm +include ::platform::armada include ::platform::patching include ::platform::patching::api diff --git a/puppet-manifests/src/modules/platform/manifests/armada.pp b/puppet-manifests/src/modules/platform/manifests/armada.pp new file mode 100644 index 000000000..28e60fd35 --- /dev/null +++ b/puppet-manifests/src/modules/platform/manifests/armada.pp @@ -0,0 +1,25 @@ +class platform::armada::params( + $node_selector_label = 'armada=enabled' +) {} + +class platform::armada + inherits ::platform::armada::params { + include ::platform::params + + if (str2bool($::is_initial_config) and $::personality == 'controller') { + + Class['::platform::kubernetes::master'] + + # Configure sane node label values that work with armada node selector. + # This is a workaround for helm v3 increased chart validation of values. + # We cannot override armada .Values.labels.node_selector_value with null + # or "" since it produces: + # error validating "": error validating data: unknown object type "nil". + # We can override with "" if the chart is modified to quote the value. + -> exec { 'label for armada node selector': + path => '/usr/bin:/usr/sbin:/bin', + command => "kubectl --kubeconfig=/etc/kubernetes/admin.conf label node ${::platform::params::hostname} armada=enabled || true", # lint:ignore:140chars + logoutput => true, + } + } +} diff --git a/puppet-manifests/src/modules/platform/manifests/helm.pp b/puppet-manifests/src/modules/platform/manifests/helm.pp index e512a90fc..45cbd81f9 100644 --- a/puppet-manifests/src/modules/platform/manifests/helm.pp +++ b/puppet-manifests/src/modules/platform/manifests/helm.pp @@ -24,7 +24,7 @@ define platform::helm::repository ( command => "helm repo index ${repo_path}", logoutput => true, user => 'www', - group => 'www', + group => 'root', require => User['www'], } @@ -95,15 +95,6 @@ class platform::helm Class['::platform::kubernetes::master'] - -> exec { 'initialize helm': - environment => [ 'KUBECONFIG=/etc/kubernetes/admin.conf', 'HOME=/home/sysadmin' ], - command => 'helm init --skip-refresh --client-only', - logoutput => true, - user => 'sysadmin', - group => 'sys_protected', - require => User['sysadmin'] - } - -> exec { 'restart lighttpd for helm': require => [File['/etc/lighttpd/lighttpd.conf', $target_helm_repos_base_dir, $source_helm_repos_base_dir]], command => 'systemctl restart lighttpd.service',