-
-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Devin Buhl <devin@buhl.casa>
- Loading branch information
Showing
8 changed files
with
65 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
version: "3" | ||
|
||
vars: | ||
TALOS_DIR: "{{.ROOT_DIR}}/kubernetes/talos" | ||
|
||
tasks: | ||
|
||
genconfig: | ||
desc: Generate talos config | ||
dir: "{{.TALOS_DIR}}" | ||
cmd: talhelper genconfig | ||
preconditions: | ||
- { msg: "Missing talhelper config file", sh: "test -f {{.TALOS_DIR}}/talhelper.yaml" } | ||
|
||
apply-config: | ||
desc: Apply talos config on a node | ||
cmd: talosctl -n {{.node}} apply-config -f "{{.TALOS_DIR}}/clusterconfig/k8s-{{.node}}.yaml" | ||
vars: | ||
node: '{{ or .node (fail "Argument (node) is required") }}' | ||
preconditions: | ||
- { msg: "Missing Talos config file", sh: "test -f {{.TALOS_DIR}}/clusterconfig/k8s-{{.node}}.yaml" } | ||
- { msg: "Node not found", sh: "talosctl -n {{.node}} get mc" } | ||
|
||
upgrade-talos: | ||
desc: Upgrade talos on a node | ||
cmd: talosctl -n {{.node}} upgrade --image {{.image}} --preserve=true --reboot-mode=powercycle | ||
vars: | ||
image: '{{ or .image (fail "Argument (image) is required") }}' | ||
node: '{{ or .node (fail "Argument (node) is required") }}' | ||
preconditions: | ||
- { msg: "Node not found", sh: "talosctl -n {{.node}} get mc" } | ||
|
||
upgrade-k8s: | ||
desc: Upgrade k8s on a node | ||
cmd: talosctl -n {{.node}} upgrade-k8s --to {{.to}} | ||
vars: | ||
node: '{{ or .node (fail "Argument (node) is required") }}' | ||
to: '{{ or .to (fail "Argument (to) is required") }}' | ||
preconditions: | ||
- { msg: "Node not found", sh: "talosctl -n {{.node}} get mc" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ moreutils | |
sops | ||
stern-bin | ||
talhelper-bin | ||
talosctl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#% if bootstrap_distribution == 'talos' %# | ||
--- | ||
clusterName: &cluster k8s | ||
clusterPodNets: | ||
- "#{ bootstrap_cluster_cidr.split(',')[0] }#" | ||
clusterSvcNets: | ||
- "#{ bootstrap_service_cidr.split(',')[0] }#" | ||
#% endif %# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters