diff --git a/CLAUDE.md b/CLAUDE.md index 684848b..8ef1236 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -113,6 +113,12 @@ The kube-plex/ directory contains a Go application that replaces the standard Pl ## ArgoCD Migration Guidelines +### Agent Workflow Defaults +When migrating or adding an ArgoCD Application, always: +- Create/update the Application manifest and any `helm-values/` files. +- Git add, commit, and push the changes to the tracked branch. +- Use the ArgoCD CLI to sync the app and wait for healthy status. + ### Critical Configuration Preservation Rules When migrating applications from direct Helm deployment to ArgoCD GitOps: @@ -252,6 +258,42 @@ Before migrating any application to ArgoCD: helm template --values | grep -A 20 "kind: Service" ``` +### Commit & Push + ArgoCD CLI Checks +After adding a new ArgoCD Application and values files: + +1. Commit and push the changes: + ```bash + git add applications/.yaml helm-values/_values.* + git commit -m "feat(argocd): add application" + git push # or: git push gitea master + ``` + +2. ArgoCD CLI login (if not already authenticated): + ```bash + # Example options; adjust for your environment + # Get admin password if needed + kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d; echo + + # Login (use your server/credentials) + argocd login argocd-server.argocd.svc.cluster.local --username admin --password --insecure + ``` + +3. Sync and wait for health: + ```bash + argocd app sync + argocd app wait --sync --health --timeout 300 + argocd app get + argocd app list | grep + ``` + +4. If sync fails, inspect details and events: + ```bash + argocd app history --refresh + argocd app get --refresh + kubectl -n default describe deploy/ || true + kubectl -n default get events --sort-by=.lastTimestamp | tail -n 50 + ``` + ### Post-Migration Verification 1. **Check Volume Mounts Match Original**: