Files
home-cluster/.taskfiles/K0s/Taskfile.yaml
T
Devin Buhl edbcf28139 feat: add python version check (#1176)
* feat: add python version check

Signed-off-by: Devin Buhl <devin@buhl.casa>

* chore: formatting

Signed-off-by: Devin Buhl <devin@buhl.casa>

* test python 3.10

* chore: taskfile formating

Signed-off-by: Devin Buhl <devin@buhl.casa>

* chore: python 3.11 is minimum

Signed-off-by: Devin Buhl <devin@buhl.casa>

---------

Signed-off-by: Devin Buhl <devin@buhl.casa>
2024-01-16 21:13:58 -05:00

46 lines
1.1 KiB
YAML

---
version: "3"
env:
DISABLE_TELEMETRY: "true"
DISABLE_UPGRADE_CHECK: "true"
vars:
K0S_CONFIG_FILE: "{{.ROOT_DIR}}/k0s-config.yaml"
tasks:
apply:
desc: Apply k0s cluster config
cmds:
- k0sctl apply --config {{.K0S_CONFIG_FILE}}
- task: kubeconfig
preconditions:
- { msg: "Missing K0s config file", sh: "test -f {{.K0S_CONFIG_FILE}}" }
nuke:
desc: Nuke the k0s cluster
deps: [":ansible:deps"]
cmds:
- k0sctl reset --config {{.K0S_CONFIG_FILE}}
- task: :ansible:run
vars:
playbook: cluster-nuke
preconditions:
- { msg: "Missing K0s config file", sh: "test -f {{.K0S_CONFIG_FILE}}" }
kubeconfig:
desc: Gets k0s cluster kubeconfig
cmds:
- k0sctl kubeconfig --config {{.K0S_CONFIG_FILE}} > {{.KUBECONFIG_FILE}}
sources:
- "{{.K0S_CONFIG_FILE}}"
generates:
- "{{.KUBECONFIG_FILE}}"
preconditions:
- { msg: "Missing K0s config file", sh: "test -f {{.K0S_CONFIG_FILE}}" }
.reset:
internal: true
cmd: rm -rf {{.K0S_CONFIG_FILE}}