* feat: add partial support, change k0s config filename, always use NLLB for k0s Signed-off-by: Devin Buhl <devin@buhl.casa> * chore: update wording Signed-off-by: Devin Buhl <devin@buhl.casa> --------- Signed-off-by: Devin Buhl <devin@buhl.casa>
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
---
|
|
version: "3"
|
|
|
|
env:
|
|
DISABLE_TELEMETRY: "true"
|
|
DISABLE_UPGRADE_CHECK: "true"
|
|
|
|
vars:
|
|
K0S_CONFIG_FILE: "{{.KUBERNETES_DIR}}/k0s/k0sctl.yaml"
|
|
|
|
tasks:
|
|
|
|
apply:
|
|
desc: Apply k0s cluster config
|
|
dir: "{{.KUBERNETES_DIR}}/k0s" # Needed for uploading files in k0sctl.yaml
|
|
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}}
|