Skip to content

Commit

Permalink
fix(ansible): use k3s kubectl
Browse files Browse the repository at this point in the history
  • Loading branch information
timothystewart6 committed Sep 2, 2022
1 parent 6695d13 commit 3c36dc8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions roles/k3s/post/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,46 +28,46 @@

- name: Wait for metallb controller to be running
command: >-
kubectl wait deployment -n metallb-system controller --for condition=Available=True --timeout=60s
k3s kubectl wait deployment -n metallb-system controller --for condition=Available=True --timeout=60s
changed_when: false
with_items: "{{ groups['master'] }}"
run_once: true

- name: Wait for metallb webhook service to be running
command: >-
kubectl wait -n metallb-system --for=jsonpath='{.status.phase}'=Running pods \
k3s kubectl wait -n metallb-system --for=jsonpath='{.status.phase}'=Running pods \
--selector component=controller --timeout=60s
changed_when: false
with_items: "{{ groups['master'] }}"
run_once: true

- name: Wait for metallb pods in replicasets
command: >-
kubectl wait pods -n metallb-system --for condition=Ready \
k3s kubectl wait pods -n metallb-system --for condition=Ready \
--selector component=controller,app=metallb --timeout=60s
changed_when: false
with_items: "{{ groups['master'] }}"
run_once: true

- name: Wait for the metallb controller readyReplicas
command: >-
kubectl wait -n metallb-system --for=jsonpath='{.status.readyReplicas}'=1 replicasets \
k3s kubectl wait -n metallb-system --for=jsonpath='{.status.readyReplicas}'=1 replicasets \
--selector component=controller,app=metallb --timeout=60s
changed_when: false
with_items: "{{ groups['master'] }}"
run_once: true

- name: Wait for the metallb controller fullyLabeledReplicas
command: >-
kubectl wait -n metallb-system --for=jsonpath='{.status.fullyLabeledReplicas}'=1 replicasets \
k3s kubectl wait -n metallb-system --for=jsonpath='{.status.fullyLabeledReplicas}'=1 replicasets \
--selector component=controller,app=metallb --timeout=60s
changed_when: false
with_items: "{{ groups['master'] }}"
run_once: true

- name: Wait for the metallb controller availableReplicas
command: >-
kubectl wait -n metallb-system --for=jsonpath='{.status.availableReplicas}'=1 replicasets \
k3s kubectl wait -n metallb-system --for=jsonpath='{.status.availableReplicas}'=1 replicasets \
--selector component=controller,app=metallb --timeout=60s
changed_when: false
with_items: "{{ groups['master'] }}"
Expand Down

0 comments on commit 3c36dc8

Please sign in to comment.