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
|
desc: Upgrade Talos on a node
|
||||||
dir: '{{.KUBERNETES_DIR}}/bootstrap/talos'
|
dir: '{{.KUBERNETES_DIR}}/bootstrap/talos'
|
||||||
cmds:
|
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
|
- talosctl --nodes {{.NODE}} health --wait-timeout=10m --server=false
|
||||||
vars:
|
vars:
|
||||||
MODE: '{{.MODE | default "default"}}'
|
MODE: '{{.MODE | default "default"}}'
|
||||||
@@ -52,21 +52,23 @@ tasks:
|
|||||||
- msg: Unable to retrieve Talos config
|
- msg: Unable to retrieve Talos config
|
||||||
sh: talosctl config info >/dev/null 2>&1
|
sh: talosctl config info >/dev/null 2>&1
|
||||||
- msg: Node not found
|
- 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:
|
upgrade-k8s:
|
||||||
desc: Upgrade Kubernetes across the cluster
|
desc: Upgrade Kubernetes across the cluster
|
||||||
dir: '{{.KUBERNETES_DIR}}/bootstrap/talos'
|
dir: '{{.KUBERNETES_DIR}}/bootstrap/talos'
|
||||||
cmd: talosctl --nodes {{.CONTROLLER}} upgrade-k8s --to {{.TO}}
|
cmd: talosctl --nodes {{.NODE}} upgrade-k8s --to {{.VERSION}}
|
||||||
requires:
|
requires:
|
||||||
vars: ['CONTROLLER', 'TO']
|
vars: ['NODE', 'VERSION']
|
||||||
preconditions:
|
preconditions:
|
||||||
- msg: Missing talosconfig
|
- msg: Missing talosconfig
|
||||||
sh: test -f {{.TALOSCONFIG}}
|
sh: test -f {{.TALOSCONFIG}}
|
||||||
- msg: Unable to retrieve Talos config
|
- msg: Unable to retrieve Talos config
|
||||||
sh: talosctl config info >/dev/null 2>&1
|
sh: talosctl config info >/dev/null 2>&1
|
||||||
- msg: Node not found
|
- 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:
|
nuke:
|
||||||
desc: Resets nodes back to maintenance mode
|
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
|
```sh
|
||||||
# Upgrade Talos to a newer version
|
# Upgrade Talos to a newer version
|
||||||
# NOTE: This needs to be run once on every node
|
# NOTE: This needs to be run once on every node
|
||||||
task talos:upgrade node=? image=?
|
task talos:upgrade NODE=? IMAGE=?
|
||||||
# e.g.
|
# 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
|
```sh
|
||||||
# Upgrade Kubernetes to a newer version
|
# Upgrade Kubernetes to a newer version
|
||||||
# NOTE: This only needs to be run once against a controller node
|
# 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.
|
# 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
|
## 👉 Help
|
||||||
|
|||||||
Reference in new issue
Block a user