Skip to content

Commit

Permalink
Fix waiting for MetalLB controller (kubernetes-sigs#10858)
Browse files Browse the repository at this point in the history
The current state waiting method is bad to implement.
When changing the deployment version, which is execute with the upgrade_cluster in the previous ansible task: "Kubernetes Apps | Install and configure MetalLB", next ansible task: "Kubernetes Apps | Wait for MetalLB controller to be running" may fall with an error.
  • Loading branch information
flxbwr authored Feb 6, 2024
1 parent 65e2248 commit ad565ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/kubernetes-apps/metallb/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
- inventory_hostname == groups['kube_control_plane'][0]

- name: Kubernetes Apps | Wait for MetalLB controller to be running
command: "{{ bin_dir }}/kubectl -n metallb-system wait --for=condition=ready pod -l app=metallb,component=controller --timeout=2m"
command: "{{ bin_dir }}/kubectl rollout status -n metallb-system deployment -l app=metallb,component=controller --timeout=2m"
become: true
when:
- inventory_hostname == groups['kube_control_plane'][0]
Expand Down

0 comments on commit ad565ad

Please sign in to comment.