mirror of
https://github.com/auricom/home-cluster.git
synced 2025-10-03 01:00:54 +02:00
feat: cilium-gateway
This commit is contained in:
@@ -3,49 +3,14 @@
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
BOOTSTRAP_RESOURCES_DIR: '{{.ROOT_DIR}}/.taskfiles/bootstrap/resources'
|
||||
CLUSTER_DIR: '{{.ROOT_DIR}}/kubernetes'
|
||||
BOOTSTRAP_SCRIPT: '{{.SCRIPTS_DIR}}/bootstrap-talos.sh'
|
||||
|
||||
tasks:
|
||||
|
||||
base:
|
||||
desc: Bootstrap Base Apps
|
||||
cmds:
|
||||
- until kubectl wait nodes --for=condition=Ready=False --all --timeout=10m; do sleep 5; done
|
||||
- helmfile --quiet --file {{.CLUSTER_DIR}}/bootstrap/apps/helmfile.yaml apply --skip-diff-on-install --suppress-diff
|
||||
- until kubectl wait nodes --for=condition=Ready --all --timeout=10m; do sleep 5; done
|
||||
default:
|
||||
desc: Bootstrap Talos and Kubernetes cluster
|
||||
cmd: bash {{.BOOTSTRAP_SCRIPT}}
|
||||
preconditions:
|
||||
- talosctl config info
|
||||
# - test -f {{.CLUSTER_DIR}}/talos/cluster-0/talosconfig
|
||||
- test -f {{.CLUSTER_DIR}}/bootstrap/apps/helmfile.yaml
|
||||
- which helmfile kubectl
|
||||
|
||||
# NOTE: Nodes must all be part of the Ceph cluster and Ceph disks must share the same disk model
|
||||
rook:
|
||||
desc: Bootstrap Rook-Ceph
|
||||
cmds:
|
||||
- minijinja-cli {{.BOOTSTRAP_RESOURCES_DIR}}/wipe-rook.yaml.j2 | kubectl apply --server-side --filename -
|
||||
- until kubectl --namespace default get job/wipe-rook &>/dev/null; do sleep 5; done
|
||||
- kubectl --namespace default wait job/wipe-rook --for=condition=complete --timeout=5m
|
||||
- stern --namespace default job/wipe-rook --no-follow
|
||||
- kubectl --namespace default delete job wipe-rook
|
||||
env:
|
||||
NODE_COUNT:
|
||||
sh: talosctl config info --output json | jq --raw-output '.nodes | length'
|
||||
preconditions:
|
||||
- test -f {{.BOOTSTRAP_RESOURCES_DIR}}/wipe-rook.yaml.j2
|
||||
- which jq kubectl minijinja-cli stern talosctl
|
||||
|
||||
flux:
|
||||
desc: Bootstrap Flux
|
||||
cmds:
|
||||
- kubectl create namespace flux-system --dry-run=client -o yaml | kubectl apply --filename -
|
||||
- cat {{.SOPS_AGE_KEY}} | kubectl --namespace flux-system create secret generic sops-age --from-file=age.agekey=/dev/stdin
|
||||
- kubectl apply --server-side --kustomize {{.CLUSTER_DIR}}/bootstrap/flux
|
||||
- SOPS_AGE_KEY_FILE={{.SOPS_AGE_KEY}} sops exec-file {{.CLUSTER_DIR}}/bootstrap/flux/github-deploy-key.sops.yaml "kubectl apply --server-side --filename {}"
|
||||
- SOPS_AGE_KEY_FILE={{.SOPS_AGE_KEY}} sops exec-file {{.CLUSTER_DIR}}/flux/vars/cluster-secrets.sops.yaml "kubectl apply --server-side --filename {}"
|
||||
- kubectl apply --server-side --filename ./flux/vars/cluster-settings.yaml
|
||||
|
||||
apps:
|
||||
desc: Bootstrap Flux
|
||||
- kubectl apply --server-side --kustomize {{.CLUSTER_DIR}}/flux/config
|
||||
- find --version | grep -q GNU
|
||||
- test -f {{.BOOTSTRAP_SCRIPT}}
|
||||
- which gum helm helmfile kubectl op talosctl yq
|
||||
|
Reference in New Issue
Block a user