GitOps Workflow
This skill covers the entire lifecycle of a change in this repository, from creating a branch to verifying the deployment in ArgoCD.
1. Development and PR Creation
- •Prepare Main: Ensure you are on the latest
main.powershellgit checkout main git pull origin main
- •Feature Branch: Create a descriptive branch.
powershell
git checkout -b <branch-name>
- •Commit & Push:
powershell
git add . git commit -m "<commit-message>" git push -u origin <branch-name>
- •Create PR & Auto-Merge:
powershell
gh pr create --fill gh pr merge --auto --merge
2. CI Verification and Merge
- •Watch Checks: Pause until CI completes.
powershell
gh pr checks --watch
- •If checks fail: Investigate logs immediately:
powershell
gh run view --log-failed
- •If checks fail: Investigate logs immediately:
- •Verify Merge: Confirm the PR has reached the
MERGEDstate.powershellgh pr view --json state -q .state
3. Post-Merge Sync and Deployment
- •Update Local Main:
powershell
git checkout main git pull origin main
- •Verify ArgoCD Sync: Confirm the change is applied to the cluster.
powershell
# App name is usually the directory name or found in argocd.yaml kubectl get app -n argocd <app-name>
- •Verify Health: Ensure the application transitions to
HealthyandSynced.
Standards
- •Auto-Sync: Most applications have
prune: trueandselfHeal: true. - •Diagnostics: If the app is not healthy, use the
k8s-diagnosticskill to investigate.