Skip to content

Commit

Permalink
PLAT-6548 Add a retry to rancher helm install (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelhar authored Apr 27, 2023
1 parent afe84de commit c75d1e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ansible/roles/rancher/tasks/rancher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- name: Install Rancher
command: >
helm upgrade rancher rancher-stable/rancher
--install --cleanup-on-fail --wait
--namespace cattle-system
--version {{ rancher_version }}
--set replicas={{ node_count }}
Expand All @@ -17,8 +18,11 @@
--set bootstrapPassword={{ rancher_password }}
--description='RanchHand Deploy'
--set rancherImageTag={{ rancher_image_tag }}
--wait --install
when: not (charts.json | json_query("[?name == \"rancher\"]"))
register: rancher_install
until: rancher_install.rc == 0
retries: 3
delay: 30

- name: Wait for Rancher to be available
command: kubectl rollout status --watch deployment rancher --namespace=cattle-system
Expand Down

0 comments on commit c75d1e1

Please sign in to comment.