Files
home-cluster/.taskfiles/K0sTasks.yaml
T
2024-01-11 16:46:36 -05:00

33 lines
843 B
YAML

---
version: "3"
env:
DISABLE_TELEMETRY: "true"
tasks:
kubeconfig:
desc: Gets k0s cluster kubeconfig
cmds:
- k0sctl kubeconfig --config k0s-config.yaml > kubeconfig
preconditions:
- { msg: "k0s-config.yaml not found", sh: "test -f {{.ROOT_DIR}}/k0s-config.yaml" }
apply:
desc: Apply k0s cluster k0s-config.yaml
cmds:
- k0sctl apply --config k0s-config.yaml
- task: kubeconfig
preconditions:
- { msg: "k0s-config.yaml not found", sh: "test -f {{.ROOT_DIR}}/k0s-config.yaml" }
reset:
desc: Resets the k0s cluster
cmds:
- k0sctl reset --config k0s-config.yaml
- task: :ansible:run playbook=cluster-nuke
vars:
playbook: cluster-nuke
preconditions:
- { msg: "k0s-config.yaml not found", sh: "test -f {{.ROOT_DIR}}/k0s-config.yaml" }