2024-05-04 01:26:26 +00:00
|
|
|
---
|
|
|
|
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
|
|
|
version: "3"
|
|
|
|
|
|
|
|
vars:
|
2024-09-07 01:49:06 +00:00
|
|
|
CLUSTER_SECRET_SOPS_FILE: "{{.CLUSTERS_DIR}}/common/bootstrap/flux/sops-key.sops.yaml"
|
|
|
|
GITHUB_DEPLOY_KEY_FILE: "{{.CLUSTERS_DIR}}/common/bootstrap/flux/forgejo-deploy-key.sops.yaml"
|
2024-05-04 01:26:26 +00:00
|
|
|
|
|
|
|
tasks:
|
|
|
|
bootstrap:
|
|
|
|
desc: Bootstrap Flux into a Kubernetes cluster
|
|
|
|
cmds:
|
2024-09-07 01:49:06 +00:00
|
|
|
- kubectl apply --server-side --kustomize {{.CLUSTERS_DIR}}/common/bootstrap/flux
|
2024-05-04 01:31:55 +00:00
|
|
|
- sops --decrypt {{.CLUSTER_SECRET_SOPS_FILE}} | kubectl apply --server-side --filename -
|
2024-05-04 01:26:26 +00:00
|
|
|
- sops --decrypt {{.GITHUB_DEPLOY_KEY_FILE}} | kubectl apply --server-side --filename -
|
2024-09-07 01:49:06 +00:00
|
|
|
- kubectl apply --server-side --kustomize {{.CLUSTERS_DIR}}/{{.CLUSTER}}/flux/config
|
2024-05-04 01:26:26 +00:00
|
|
|
preconditions:
|
|
|
|
- { msg: "Missing cluster sops key", sh: "gpg -K 687802D4DFD8AA82EA55666CF7DADAC782D7663D" }
|
|
|
|
|
|
|
|
reconcile:
|
2024-09-07 03:38:28 +00:00
|
|
|
desc: Force update Flux to pull in changes from the Git repository
|
2024-05-04 01:26:26 +00:00
|
|
|
cmd: flux reconcile --namespace flux-system kustomization cluster --with-source
|