81 lines
3.6 KiB
YAML
81 lines
3.6 KiB
YAML
---
|
|
version: "3"
|
|
|
|
vars:
|
|
# renovate: datasource=github-releases depName=prometheus-operator/prometheus-operator
|
|
PROMETHEUS_OPERATOR_VERSION: "v0.70.0"
|
|
|
|
tasks:
|
|
|
|
install:
|
|
desc: Install Flux into your cluster
|
|
cmds:
|
|
# Install essential Prometheus Operator CRDs
|
|
- kubectl apply --server-side --filename https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/{{ .PROMETHEUS_OPERATOR_VERSION }}/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
|
|
- kubectl apply --server-side --filename https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/{{ .PROMETHEUS_OPERATOR_VERSION }}/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
|
|
- kubectl apply --server-side --filename https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/{{ .PROMETHEUS_OPERATOR_VERSION }}/example/prometheus-operator-crd/monitoring.coreos.com_scrapeconfigs.yaml
|
|
- kubectl apply --server-side --filename https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/{{ .PROMETHEUS_OPERATOR_VERSION }}/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
|
|
# Install Flux
|
|
- kubectl apply --server-side --kustomize {{.KUBERNETES_DIR}}/bootstrap
|
|
- cat {{.SOPS_AGE_KEY_FILE}} | kubectl -n flux-system create secret generic sops-age --from-file=age.agekey=/dev/stdin
|
|
- sops --decrypt {{.KUBERNETES_DIR}}/flux/vars/cluster-secrets.sops.yaml | kubectl apply --server-side --filename -
|
|
- sops --decrypt {{.KUBERNETES_DIR}}/flux/vars/cluster-secrets-user.sops.yaml | kubectl apply --server-side --filename -
|
|
- kubectl apply --server-side --filename {{.KUBERNETES_DIR}}/flux/vars/cluster-settings.yaml
|
|
- kubectl apply --server-side --filename {{.KUBERNETES_DIR}}/flux/vars/cluster-settings-user.yaml
|
|
- kubectl apply --server-side --kustomize {{.KUBERNETES_DIR}}/flux/config
|
|
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: "{{.ROOT_DIR}}/age.key"
|
|
|
|
reconcile:
|
|
desc: Force update Flux to pull in changes from your Git repository
|
|
cmd: flux reconcile -n flux-system kustomization cluster --with-source
|
|
|
|
nodes:
|
|
desc: List all the nodes in your cluster
|
|
cmd: kubectl get nodes {{.CLI_ARGS | default "-o wide"}}
|
|
|
|
pods:
|
|
desc: List all the pods in your cluster
|
|
cmd: kubectl get pods {{.CLI_ARGS | default "-A"}}
|
|
|
|
kustomizations:
|
|
desc: List all the kustomizations in your cluster
|
|
cmd: kubectl get kustomizations {{.CLI_ARGS | default "-A"}}
|
|
|
|
helmreleases:
|
|
desc: List all the helmreleases in your cluster
|
|
cmd: kubectl get helmreleases {{.CLI_ARGS | default "-A"}}
|
|
|
|
helmrepositories:
|
|
desc: List all the helmrepositories in your cluster
|
|
cmd: kubectl get helmrepositories {{.CLI_ARGS | default "-A"}}
|
|
|
|
gitrepositories:
|
|
desc: List all the gitrepositories in your cluster
|
|
cmd: 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"}}
|
|
|
|
ingresses:
|
|
desc: List all the ingresses in your cluster
|
|
cmd: kubectl get ingress {{.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: ingresses
|
|
- task: pods
|