Skip to content

Commit ac4d09c

Browse files
committed
Kubernetes: add firewall management for MetalLB
We didn't cover until today the fact that speakers pods of MetalLB require a specific port on the firewall to be enabled, this commit fixes the problem.
1 parent 846132b commit ac4d09c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

roles/kubernetes/defaults/main.yml

+2
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ k8s_ceph_csi_vol_expansion: false
9090

9191
k8s_metallb_enable: false
9292
k8s_metallb_namespace: metallb-system
93+
k8s_metallb_ports:
94+
- 7946/tcp
9395
k8s_metallb_pools: {}
9496

9597
k8s_ingress_nginx_enable: false

roles/kubernetes/tasks/common.yml

+11
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,17 @@
225225
sysctl_set: yes
226226
state: present
227227
reload: yes
228+
229+
- name: Allow MetalLB ports in Firewalld
230+
firewalld:
231+
port: "{{ item }}"
232+
state: enabled
233+
permanent: yes
234+
immediate: yes
235+
with_items:
236+
- "{{ k8s_metallb_ports }}"
237+
when:
238+
- k8s_metallb_enable|bool
228239
when:
229240
- k8s_firewalld_enable|bool
230241

0 commit comments

Comments
 (0)