Skip to content

Commit b2f440b

Browse files
committed
try
1 parent b0e6816 commit b2f440b

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ kubectl delete applicationsets --all -n argocd
380380
# Note: This is the full, correct bootstrap sequence.
381381
kustomize build infrastructure/controllers/argocd --enable-helm | kubectl apply -f -
382382
kubectl wait --for condition=established --timeout=60s crd/applications.argoproj.io
383+
kubectl wait --for=condition=Available deployment/argocd-server -n argocd --timeout=300s
383384
kubectl apply -f infrastructure/controllers/argocd/root.yaml
384385
```
385386

docs/argocd.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,28 @@ kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/downloa
4242
```
4343

4444
### 2. Bootstrap ArgoCD
45-
This single command uses Kustomize to deploy the ArgoCD Helm chart and the `root` application, which kickstarts the entire GitOps loop.
45+
This final step uses our "App of Apps" pattern to bootstrap the entire cluster. This is a multi-step process to avoid race conditions with CRD installation.
4646

4747
```bash
48-
# 1. Apply the ArgoCD Bootstrap Manifests
48+
# 1. Apply the ArgoCD main components and CRDs
49+
# This deploys the ArgoCD Helm chart, which creates the CRDs and controller.
4950
kustomize build infrastructure/controllers/argocd --enable-helm | kubectl apply -f -
5051

51-
# 2. Wait for ArgoCD to be ready (2-5 minutes)
52+
# 2. Wait for the ArgoCD CRDs to be established in the cluster
53+
# This command pauses until the Kubernetes API server recognizes the 'Application' resource type.
54+
echo "Waiting for ArgoCD CRDs to be established..."
55+
kubectl wait --for condition=established --timeout=60s crd/applications.argoproj.io
56+
57+
# 3. Wait for the ArgoCD server to be ready
58+
# This ensures the ArgoCD server is running before we apply the root application.
59+
echo "Waiting for ArgoCD server to be available..."
5260
kubectl wait --for=condition=Available deployment/argocd-server -n argocd --timeout=300s
61+
62+
# 4. Apply the Root Application
63+
# Now that ArgoCD is running and its CRDs are ready, we can apply the 'root' application
64+
# to kickstart the self-managing GitOps loop.
65+
echo "Applying the root application..."
66+
kubectl apply -f infrastructure/controllers/argocd/root.yaml
5367
```
5468
**That's it!** ArgoCD will now manage itself and deploy everything else automatically.
5569

0 commit comments

Comments
 (0)