fix: updates to talos taskfile and readme
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
2 files changed
+11
-9
No files matched your search
@@ -40,7 +40,7 @@ tasks:
|
||||
desc: Upgrade Talos on a node
|
||||
dir: '{{.KUBERNETES_DIR}}/bootstrap/talos'
|
||||
cmds:
|
||||
- talosctl --nodes {{.NODE}} upgrade --image {{.IMAGE}} --wait=true --timeout=10m --preserve=true --reboot-mode={{.MODE}}
|
||||
- talosctl --nodes {{.NODE}} upgrade --image {{.IMAGE}} --timeout=10m --reboot-mode={{.MODE}}
|
||||
- talosctl --nodes {{.NODE}} health --wait-timeout=10m --server=false
|
||||
vars:
|
||||
MODE: '{{.MODE | default "default"}}'
|
||||
@@ -52,21 +52,23 @@ tasks:
|
||||
- msg: Unable to retrieve Talos config
|
||||
sh: talosctl config info >/dev/null 2>&1
|
||||
- msg: Node not found
|
||||
sh: talosctl --nodes {{.node}} get machineconfig >/dev/null 2>&1
|
||||
sh: talosctl --nodes {{.NODE}} get machineconfig >/dev/null 2>&1
|
||||
|
||||
upgrade-k8s:
|
||||
desc: Upgrade Kubernetes across the cluster
|
||||
dir: '{{.KUBERNETES_DIR}}/bootstrap/talos'
|
||||
cmd: talosctl --nodes {{.CONTROLLER}} upgrade-k8s --to {{.TO}}
|
||||
cmd: talosctl --nodes {{.NODE}} upgrade-k8s --to {{.VERSION}}
|
||||
requires:
|
||||
vars: ['CONTROLLER', 'TO']
|
||||
vars: ['NODE', 'VERSION']
|
||||
preconditions:
|
||||
- msg: Missing talosconfig
|
||||
sh: test -f {{.TALOSCONFIG}}
|
||||
- msg: Unable to retrieve Talos config
|
||||
sh: talosctl config info >/dev/null 2>&1
|
||||
- msg: Node not found
|
||||
sh: talosctl --nodes {{.CONTROLLER}} get machineconfig >/dev/null 2>&1
|
||||
sh: talosctl --nodes {{.NODE}} get machineconfig >/dev/null 2>&1
|
||||
- msg: Node not controller
|
||||
sh: talosctl config info --output json | jq --exit-status '.endpoints | index("{{.NODE}}") != null'
|
||||
|
||||
nuke:
|
||||
desc: Resets nodes back to maintenance mode
|
||||
|
||||
Reference in new issue
Block a user