Skip to content

Commit

Permalink
talos taskfile - Remove unneeded absolute path variables
Browse files Browse the repository at this point in the history
  • Loading branch information
wasurerarenai authored Jan 26, 2025
1 parent a3bf8fa commit e301291
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .taskfiles/talos/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tasks:
generate-config:
desc: Generate Talos configuration
dir: "{{.TALHELPER_CONFIG_DIR}}"
cmd: talhelper genconfig --config-file {{.TALHELPER_CONFIG_FILE}} --secret-file {{.TALHELPER_SECRET_FILE}} --out-dir {{.TALHELPER_CLUSTER_DIR}}
cmd: talhelper genconfig
preconditions:
- test -f {{.TALHELPER_CONFIG_FILE}}
- test -f {{.SOPS_CONFIG_FILE}}
Expand All @@ -20,7 +20,7 @@ tasks:
apply-node:
desc: Apply Talos config to a node [IP=required]
dir: "{{.TALHELPER_CONFIG_DIR}}"
cmd: talhelper gencommand apply --node {{.IP}} --config-file {{.TALHELPER_CONFIG_FILE}} --out-dir {{.TALHELPER_CLUSTER_DIR}} --extra-flags '--mode={{.MODE}}' | bash
cmd: talhelper gencommand apply --node {{.IP}} --extra-flags '--mode={{.MODE}}' | bash
vars:
MODE: '{{.MODE | default "auto"}}'
requires:
Expand All @@ -34,7 +34,7 @@ tasks:
upgrade-node:
desc: Upgrade Talos on a single node [IP=required]
dir: "{{.TALHELPER_CONFIG_DIR}}"
cmd: talhelper gencommand upgrade --node {{.IP}} --config-file {{.TALHELPER_CONFIG_FILE}} --out-dir {{.TALHELPER_CLUSTER_DIR}} --extra-flags "--image='factory.talos.dev/installer{{if eq .TALOS_SECUREBOOT "true"}}-secureboot{{end}}/{{.TALOS_SCHEMATIC_ID}}:{{.TALOS_VERSION}}' --timeout=10m" | bash
cmd: talhelper gencommand upgrade --node {{.IP}} --extra-flags "--image='factory.talos.dev/installer{{if eq .TALOS_SECUREBOOT "true"}}-secureboot{{end}}/{{.TALOS_SCHEMATIC_ID}}:{{.TALOS_VERSION}}' --timeout=10m" | bash
vars:
TALOS_SCHEMATIC_ID:
sh: yq '.nodes[] | select(.ipAddress == "{{.IP}}") | .talosImageURL' {{.TALHELPER_CONFIG_FILE}} | awk -F/ '{print $NF}'
Expand All @@ -53,7 +53,7 @@ tasks:
upgrade-k8s:
desc: Upgrade Kubernetes
dir: "{{.TALHELPER_CONFIG_DIR}}"
cmd: talhelper gencommand upgrade-k8s --config-file {{.TALHELPER_CONFIG_FILE}} --out-dir {{.TALHELPER_CLUSTER_DIR}} --extra-flags "--to '{{.KUBERNETES_VERSION}}'" | bash
cmd: talhelper gencommand upgrade-k8s --extra-flags "--to '{{.KUBERNETES_VERSION}}'" | bash
vars:
KUBERNETES_VERSION:
sh: yq '.kubernetesVersion' {{.TALHELPER_CONFIG_FILE}}
Expand All @@ -66,6 +66,6 @@ tasks:
desc: Resets nodes back to maintenance mode
dir: "{{.TALHELPER_CONFIG_DIR}}"
prompt: This will destroy your cluster and reset the nodes back to maintenance mode... continue?
cmd: talhelper gencommand reset --config-file {{.TALHELPER_CONFIG_FILE}} --out-dir {{.TALHELPER_CLUSTER_DIR}} --extra-flags="--reboot {{- if eq .CLI_FORCE false }} --system-labels-to-wipe STATE --system-labels-to-wipe EPHEMERAL{{ end }} --graceful=false --wait=false" | bash
cmd: talhelper gencommand reset --extra-flags="--reboot {{- if eq .CLI_FORCE false }} --system-labels-to-wipe STATE --system-labels-to-wipe EPHEMERAL{{ end }} --graceful=false --wait=false" | bash
preconditions:
- which talhelper

0 comments on commit e301291

Please sign in to comment.