From 2e4196688c8020c636436a62ff11c9eb82356111 Mon Sep 17 00:00:00 2001 From: MichaelFisher1997 Date: Sat, 21 Mar 2026 17:42:39 +0000 Subject: [PATCH] fix: bootstrap flux in phases - crds first, then resources --- .gitea/workflows/deploy.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index e76f2a5..7ee28f9 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -255,7 +255,15 @@ jobs: --from-file=identity="$HOME/.ssh/id_ed25519" \ --from-file=known_hosts=/tmp/flux_known_hosts \ --dry-run=client -o yaml | kubectl apply -f - - kubectl apply -k clusters/prod/flux-system + # Apply CRDs and controllers first + kubectl apply -f clusters/prod/flux-system/gotk-components.yaml + # Wait for CRDs to be established + kubectl wait --for=condition=Established crd --all --timeout=120s + # Then apply custom resources + kubectl apply -f clusters/prod/flux-system/gitrepository-platform.yaml + kubectl apply -f clusters/prod/flux-system/kustomization-infrastructure.yaml + kubectl apply -f clusters/prod/flux-system/kustomization-apps.yaml + kubectl apply -f clusters/prod/flux-system/gotk-controller-cp1-patches.yaml kubectl -n flux-system rollout status deployment/source-controller --timeout=180s kubectl -n flux-system rollout status deployment/kustomize-controller --timeout=180s kubectl -n flux-system rollout status deployment/helm-controller --timeout=180s