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
|
||||
|
||||
@@ -359,17 +359,17 @@ Resolving problems that you have could take some tweaking of your YAML manifests
|
||||
```sh
|
||||
# Upgrade Talos to a newer version
|
||||
# NOTE: This needs to be run once on every node
|
||||
task talos:upgrade node=? image=?
|
||||
task talos:upgrade NODE=? IMAGE=?
|
||||
# e.g.
|
||||
# task talos:upgrade node=192.168.42.10 image=factory.talos.dev/installer/${schematic_id}:v1.7.4
|
||||
# task talos:upgrade NODE=192.168.42.10 IMAGE=factory.talos.dev/installer/${schematic_id}:v1.7.4
|
||||
```
|
||||
|
||||
```sh
|
||||
# Upgrade Kubernetes to a newer version
|
||||
# NOTE: This only needs to be run once against a controller node
|
||||
task talos:upgrade-k8s controller=? to=?
|
||||
task talos:upgrade-k8s NODE=? VERSION=?
|
||||
# e.g.
|
||||
# task talos:upgrade-k8s controller=192.168.42.10 to=1.30.1
|
||||
# task talos:upgrade-k8s CONTROLLER=192.168.42.10 VERSION=1.30.1
|
||||
```
|
||||
|
||||
## 👉 Help
|
||||
|
||||
Reference in new issue
Block a user