34 lines
853 B
YAML
34 lines
853 B
YAML
---
|
|
version: "3"
|
|
|
|
env:
|
|
DISABLE_TELEMETRY: "true"
|
|
DISABLE_UPGRADE_CHECK: "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
|
|
vars:
|
|
playbook: cluster-nuke
|
|
preconditions:
|
|
- { msg: "k0s-config.yaml not found", sh: "test -f {{.ROOT_DIR}}/k0s-config.yaml" }
|