metallb: fix for kubernetes running without kube-proxy
This commit is contained in:
parent
0bff6e9a26
commit
5f333565a3
@ -11,15 +11,25 @@
|
||||
release_values: "{{ metallb_combined_values | from_yaml }}"
|
||||
wait: true
|
||||
|
||||
- name: Check if kube-proxy ConfigMap exist
|
||||
check_mode: false
|
||||
shell: |
|
||||
kubectl get configmap kube-proxy -n kube-system
|
||||
register: _kube_proxy_configmap
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
|
||||
- name: Check for strict arp
|
||||
check_mode: false
|
||||
shell: |
|
||||
kubectl get configmap kube-proxy -n kube-system -o yaml | \
|
||||
sed -e "s/strictARP: false/strictARP: true/" | \
|
||||
kubectl diff -f - -n kube-system
|
||||
register: check_strict_arp
|
||||
when: metallb_strict_arp
|
||||
changed_when: check_strict_arp.rc != 0
|
||||
register: check_strict_arp_status
|
||||
when:
|
||||
- _kube_proxy_configmap.rc == 0
|
||||
- metallb_strict_arp
|
||||
changed_when: check_strict_arp_status.rc != 0
|
||||
|
||||
- name: Apply strict arp
|
||||
shell: |
|
||||
@ -28,8 +38,9 @@
|
||||
kubectl apply -f - -n kube-system \
|
||||
&& kubectl -n kube-system delete pods --selector=k8s-app=kube-proxy
|
||||
when:
|
||||
- strict_arp_for_metallb
|
||||
- metallb_strict_arp.changed
|
||||
- _kube_proxy_configmap.rc == 0
|
||||
- metallb_strict_arp
|
||||
- metallb_strict_arp_status.changed
|
||||
|
||||
- name: Apply MetalLB L2 definitions
|
||||
k8s:
|
||||
|
Loading…
Reference in New Issue
Block a user