Files
home-cluster/.taskfiles/ClusterTasks.yml
T
Devin Buhl 49d5e6de70 refactor(cluster)!: Update flux installation and upgrade method
Other changes include:
- Rename cluster/base to cluster/flux
- Add config and charts fluxtomizations
- Update scripts and taskfiles to reflect changes
2022-06-09 12:22:22 -04:00

77 lines
2.2 KiB
YAML

---
version: "3"
tasks:
verify:
desc: Verify flux meets the prerequisites
cmds:
- flux check --pre
install:
desc: Install Flux into your cluster
cmds:
- kubectl apply --kustomize {{.CLUSTER_DIR}}/bootstrap/
- cat {{.SOPS_AGE_KEY_FILE}} | kubectl -n flux-system create secret generic sops-age --from-file=age.agekey=/dev/stdin
- kubectl apply --kustomize {{.CLUSTER_DIR}}/flux/flux-system/
- task: reconcile
preconditions:
- sh: test -f {{.SOPS_AGE_KEY_FILE}}
msg: |
Age key file is not found. Did you forget to create it?
vars:
SOPS_AGE_KEY_FILE: ~/.config/sops/age/keys.txt
reconcile:
desc: Force update Flux to pull in changes from your Git repository
cmds:
- flux reconcile -n flux-system source git flux-cluster
- flux reconcile -n flux-system source kustomization flux-cluster
nodes:
desc: List all the nodes in your cluster
cmds:
- kubectl get nodes {{.CLI_ARGS | default "-o wide"}}
pods:
desc: List all the pods in your cluster
cmds:
- kubectl get pods {{.CLI_ARGS | default "-A"}}
kustomizations:
desc: List all the kustomizations in your cluster
cmds:
- kubectl get kustomizations {{.CLI_ARGS | default "-A"}}
helmreleases:
desc: List all the helmreleases in your cluster
cmds:
- kubectl get helmreleases {{.CLI_ARGS | default "-A"}}
helmrepositories:
desc: List all the helmreleases in your cluster
cmds:
- kubectl get helmrepositories {{.CLI_ARGS | default "-A"}}
gitrepositories:
desc: List all the helmreleases in your cluster
cmds:
- kubectl get gitrepositories {{.CLI_ARGS | default "-A"}}
certificates:
desc: List all the certificates in your cluster
cmds:
- kubectl get certificates {{.CLI_ARGS | default "-A"}}
- kubectl get certificaterequests {{.CLI_ARGS | default "-A"}}
resources:
desc: Gather common resources in your cluster, useful when asking for support
cmds:
- task: nodes
- task: kustomizations
- task: helmreleases
- task: helmrepositories
- task: gitrepositories
- task: certificates
- task: pods