fix: helm before rke2 managed manifests
Build / precommit (pull_request) Successful in 3m59s

- add fact to list namespaces
- require namespace before adding additional config
- renamed some files to better match what they are
This commit is contained in:
2025-09-20 22:35:35 +10:00
parent 4c9204858e
commit 2d1f56779f
7 changed files with 56 additions and 12 deletions
+25 -1
View File
@@ -77,7 +77,31 @@ class rke2::config (
# on the controller nodes only
if $node_type == 'server' {
# manage extra config config
# wait for purelb helm to setup namespace
if 'purelb' in $facts['k8s_namespaces'] {
file {'/var/lib/rancher/rke2/server/manifests/purelb-config.yaml':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
source => 'puppet:///modules/rke2/purelb-config.yaml',
require => Service['rke2-server'],
}
}
# wait for rancher helm to setup namespace
if 'cattle-system' in $facts['k8s_namespaces'] {
file {'/var/lib/rancher/rke2/server/manifests/ingress-route-rancher.yaml':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
source => 'puppet:///modules/rke2/ingress-route-rancher.yaml',
require => Service['rke2-server'],
}
}
# manage extra config config (these are not dependent on helm)
$extra_config_files.each |$file| {
file {"/var/lib/rancher/rke2/server/manifests/${file}.yaml":