gitops
此存储库的 GitOps 工作流程:在版本控制中编辑 Argo CD/Kubernetes/infra 清单、验证更改并依赖 Argo CD 进行同步。当任务涉及 argocd/、kubernetes/、tofu/、ansible/ 或部署/runbook 更改时,或者当要求通过 GitOps 推出服务时使用。
📖 中文导读:此存储库的 GitOps 工作流程:在版本控制中编辑 Argo CD/Kubernetes/infra 清单、验证更改并依赖 Argo CD 进行同步。当任务涉及 argocd/、kubernetes/、tofu/、ansible/ 或部署/runbook 更改时,或者当要求通过 GitOps 推出服务时使用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: gitops description: "GitOps workflows for this repo: edit Argo CD/Kubernetes/infra manifests in version control, validate changes, and rely on Argo CD to sync. Use when tasks touch argocd/, kubernetes/, tofu/, ansible/, or deployment/runbook changes, or when asked to roll out services via GitOps."
GitOps
Overview
Use GitOps-first changes for infra and deployment workflows, then validate locally and let Argo CD reconcile. Only apply directly to the cluster when explicitly instructed or in an emergency.
Workflow
Locate the source of truth
- Argo CD apps and overlays:
argocd/ - Kubernetes manifests:
kubernetes/ - IaC:
tofu/,ansible/ - Service-specific instructions: nearest
README.md
- Argo CD apps and overlays:
Edit manifests in Git
- Prefer updating Argo CD apps/overlays instead of raw kubectl applies.
- Keep environment-specific changes in overlays.
Validate locally
- Argo lint:
scripts/argo-lint.sh - Kubeconform:
scripts/kubeconform.sh argocd - Terraform/tofu:
bun run tf:plan(apply only when asked) - Ansible:
bun run ansible
- Argo lint:
Rollout discipline
- Note rollout/impact for changes in
argocd/,kubernetes/,tofu/,ansible/. - For Helm charts with kustomize, use:
mise exec helm@3 -- kustomize build --enable-helm <path>.
- Cluster access (exception-only)
- Use direct
kubectl applyonly when explicitly asked or in emergencies. - Always set namespace:
kubectl ... -n <ns>.
- Deploy completion guardrail
- Only call a deploy "completed" after the Argo CD application is synced and healthy.
Pointers
- Use
references/gitops-checklist.mdfor quick commands and repo-specific notes.