Skip to content

Commit

Permalink
feat(upgrade-path): add pre-kubernetes.sh.tpl where due
Browse files Browse the repository at this point in the history
Add Ansible reprovision on:
 - 1.28.6 → 1.29.6
 - 1.29.6 → 1.30.1
  • Loading branch information
kriive committed Dec 18, 2024
1 parent 53df0d6 commit af3df58
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions configs/upgrades/onpremises/1.28.6-1.29.6/pre-kubernetes.sh.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env sh

set -e

{{- if index .spec "kubernetes" }}

## master upgrades - only one at a time
{{- range $h := .spec.kubernetes.masters.hosts }}
ansible-playbook 55.upgrade-control-plane.yml --limit "{{ $h.name }}" --become
{{- end }}

{{- if ne .upgrade.skipNodesUpgrade true }}
{{- range $n := .spec.kubernetes.nodes }}
{{- range $h := $n.hosts }}
ansible-playbook 56.upgrade-worker-nodes.yml --limit "{{ $h.name }}"
{{- end }}
{{- end }}
{{- end }}

{{- end }}
20 changes: 20 additions & 0 deletions configs/upgrades/onpremises/1.29.6-1.30.1/pre-kubernetes.sh.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env sh

set -e

{{- if index .spec "kubernetes" }}

## master upgrades - only one at a time
{{- range $h := .spec.kubernetes.masters.hosts }}
ansible-playbook 55.upgrade-control-plane.yml --limit "{{ $h.name }}" --become
{{- end }}

{{- if ne .upgrade.skipNodesUpgrade true }}
{{- range $n := .spec.kubernetes.nodes }}
{{- range $h := $n.hosts }}
ansible-playbook 56.upgrade-worker-nodes.yml --limit "{{ $h.name }}"
{{- end }}
{{- end }}
{{- end }}

{{- end }}

0 comments on commit af3df58

Please sign in to comment.