feat: refactor config file (#1267)
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
1 parent
e4427a8325
commit
889ca07692
114 files changed
+721
-1042
No files matched your search
@@ -34,10 +34,10 @@ tasks:
|
||||
prompt: This will overwrite the existing kubeconfig... continue?
|
||||
cmds:
|
||||
- k0sctl kubeconfig --config {{.K0S_CONFIG_FILE}} > {{.KUBECONFIG_FILE}}
|
||||
- sed -i {{if eq OS "darwin"}}''{{end}} 's|https://.+:6443|https://{{.kube_api_addr}}:6443|g' {{.KUBECONFIG_FILE}}
|
||||
- sed -i {{if eq OS "darwin"}}''{{end}} 's|https://.+:6443|https://{{.endpoint}}:6443|g' {{.KUBECONFIG_FILE}}
|
||||
vars:
|
||||
kube_api_addr:
|
||||
sh: "yq '.bootstrap_kube_api_addr' {{.BOOTSTRAP_CONFIG_FILE}}"
|
||||
endpoint:
|
||||
sh: "yq '.cluster.endpoint_vip' {{.BOOTSTRAP_CONFIG_FILE}}"
|
||||
preconditions:
|
||||
- { msg: "Missing K0s config file", sh: "test -f {{.K0S_CONFIG_FILE}}" }
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ tasks:
|
||||
- task: :k0s:.reset
|
||||
- task: :kubernetes:.reset
|
||||
- task: :sops:.reset
|
||||
- task: :talos:.reset
|
||||
|
||||
force-reset:
|
||||
desc: Reset repo back to HEAD
|
||||
|
||||
@@ -22,7 +22,10 @@ tasks:
|
||||
file: "{{.ITEM}}"
|
||||
vars:
|
||||
file:
|
||||
sh: find "{{.KUBERNETES_DIR}}" -type f -name "*.sops.*" -exec grep -L "ENC\[AES256_GCM" {} \;
|
||||
sh: |
|
||||
if [ -d "{{.KUBERNETES_DIR}}" ]; then
|
||||
find "{{.KUBERNETES_DIR}}" -type f -name "*.sops.*" -exec grep -L "ENC\[AES256_GCM" {} \;
|
||||
fi
|
||||
|
||||
.encrypt-file:
|
||||
internal: true
|
||||
|
||||
@@ -77,3 +77,7 @@ tasks:
|
||||
vars: ["node", "to"]
|
||||
preconditions:
|
||||
- { msg: "Node not found", sh: "talosctl --nodes {{.node}} get machineconfig" }
|
||||
|
||||
.reset:
|
||||
internal: true
|
||||
cmd: rm -rf {{.TALOS_DIR}}
|
||||
Reference in new issue
Block a user