Skip to content

Commit

Permalink
Merge "Add k8s cfg file to the OAM firewall script"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Oct 10, 2023
2 parents 2a96b5b + 58581b8 commit e49328c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion puppet-manifests/src/modules/platform/manifests/firewall.pp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@
) {
if $config != {} {
$apply_script = 'calico_firewall_apply_policy.sh'
if $::personality == 'worker' {
$cfgf = '/etc/kubernetes/kubelet.conf'
} elsif $::personality == 'controller' {
$cfgf = '/etc/kubernetes/admin.conf'
}
$yaml_config = hash2yaml($config)
$gnp_name = "${::personality}-oam-if-gnp"
$file_name_gnp = "/tmp/gnp_${gnp_name}.yaml"
Expand All @@ -169,7 +174,7 @@
}
-> exec { "apply globalnetworkpolicies ${gnp_name} with ${file_name_gnp}":
path => '/usr/bin:/usr/sbin:/bin:/usr/local/bin',
command => "${apply_script} ${gnp_name} ${file_name_gnp}",
command => "${apply_script} ${gnp_name} ${file_name_gnp} ${cfgf}",
logoutput => true
}
}
Expand Down

0 comments on commit e49328c

Please sign in to comment.