Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patching v3 #21

Merged
merged 22 commits into from
Mar 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add firewall also for non firewalld systems
  • Loading branch information
rwaffen committed Mar 9, 2023
commit 782860f590272caa0fa0e356d5689d52733a7e9f
42 changes: 27 additions & 15 deletions manifests/node/kubelet.pp
Original file line number Diff line number Diff line change
Expand Up @@ -236,21 +236,33 @@
Package <| title == 'containernetworking-plugins' |> -> Service['kubelet']

if $manage_firewall {
firewalld_custom_service { 'kubelet':
ensure => $ensure,
short => 'kubelet',
description => 'Kubernetes kubelet daemon',
ports => [
{
port => '10250',
protocol => 'tcp',
},
],
}
firewalld_service { 'Allow k8s kubelet access':
ensure => $ensure,
zone => 'public',
service => 'kubelet',
case fact('os.family') {
'Debian': {
firewall { '100 allow kubelet access':
dport => 10250,
proto => 'tcp',
action => 'accept',
tuxmea marked this conversation as resolved.
Show resolved Hide resolved
}
}
'RedHat': {
firewalld_custom_service { 'kubelet':
ensure => $ensure,
short => 'kubelet',
description => 'Kubernetes kubelet daemon',
ports => [
{
port => '10250',
protocol => 'tcp',
},
],
}
firewalld_service { 'Allow k8s kubelet access':
ensure => $ensure,
zone => 'public',
tuxmea marked this conversation as resolved.
Show resolved Hide resolved
service => 'kubelet',
}
}
default: {}
}
}
}