Skip to content

Commit e6b750f

Browse files
committed
up
1 parent f1aacb7 commit e6b750f

2 files changed

Lines changed: 22 additions & 9 deletions

File tree

README.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,20 +146,30 @@ This cluster uses [1Password Connect](https://developer.1password.com/docs/conne
146146
```
147147

148148
### 6. Bootstrap ArgoCD & Deploy The Stack
149-
This final step uses our "App of Apps" pattern to bootstrap the entire cluster from a single command.
149+
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.
150150

151151
```bash
152-
# 1. Apply the ArgoCD Bootstrap Manifests
153-
# This single command does everything:
154-
# - Deploys the ArgoCD Helm chart, including its CRDs.
155-
# - Deploys the 'root' Application, which points to our self-managing configuration.
152+
# 1. Apply the ArgoCD main components and CRDs
153+
# This deploys the ArgoCD Helm chart, which creates the CRDs and controller.
156154
kustomize build infrastructure/controllers/argocd --enable-helm | kubectl apply -f -
157155
158-
# 2. Wait for ArgoCD to be ready (2-5 minutes)
159-
# This ensures the ArgoCD server is running before you try to access its UI or API.
156+
# 2. Wait for the ArgoCD CRDs to be established in the cluster
157+
# This command pauses until the Kubernetes API server recognizes the 'Application' resource type.
158+
echo "Waiting for ArgoCD CRDs to be established..."
159+
kubectl wait --for condition=established --timeout=60s crd/applications.argoproj.io
160+
161+
# 3. Wait for the ArgoCD server to be ready
162+
# This ensures the ArgoCD server is running before we apply the root application.
163+
echo "Waiting for ArgoCD server to be available..."
160164
kubectl wait --for=condition=Available deployment/argocd-server -n argocd --timeout=300s
165+
166+
# 4. Apply the Root Application
167+
# Now that ArgoCD is running and its CRDs are ready, we can apply the 'root' application
168+
# to kickstart the self-managing GitOps loop.
169+
echo "Applying the root application..."
170+
kubectl apply -f infrastructure/controllers/argocd/root.yaml
161171
```
162-
**That's it!** You have successfully bootstrapped the cluster.
172+
**That's it!** You have successfully and reliably bootstrapped the cluster.
163173
164174
### What Happens Next Automatically?
165175
@@ -367,7 +377,10 @@ kubectl get applicationsets -n argocd -o name | xargs -I{} kubectl patch {} -n a
367377
kubectl delete applicationsets --all -n argocd
368378
369379
# Bootstrap with the new enterprise pattern
380+
# Note: This is the full, correct bootstrap sequence.
370381
kustomize build infrastructure/controllers/argocd --enable-helm | kubectl apply -f -
382+
kubectl wait --for condition=established --timeout=60s crd/applications.argoproj.io
383+
kubectl apply -f infrastructure/controllers/argocd/root.yaml
371384
```
372385
373386
## 🚀 Taking to Production

infrastructure/controllers/argocd/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ namespace: argocd
44
resources:
55
- ns.yaml
66
- http-route.yaml
7+
# root.yaml is now applied in a separate step after the CRDs are established.
78
# This is the root application that manages our AppProjects and ApplicationSets.
89
# By including it here, the ArgoCD installation will immediately start managing
910
# the rest of the applications in the repository.
10-
- root.yaml
1111
helmCharts:
1212
- name: argo-cd
1313
repo: https://argoproj.github.io/argo-helm

0 commit comments

Comments
 (0)