argocd-expert
GitOps implementation with ArgoCD: declarative synchronization of Kubernetes applications, App-of-Apps pattern, ApplicationSets, Argo Rollouts for canary/blue-green, secret management with Sealed Secrets/External Secrets Operator, and troubleshooting of sync failures and drift. Use when setting up ArgoCD for continuous delivery, designing GitOps repo structure, implementing progressive delivery strategies, managing secrets in GitOps workflows, or debugging out-of-sync applications. Trigger: ArgoCD, GitOps, Argo Rollouts, ApplicationSet. Do NOT trigger for: raw Kubernetes manifest authoring without GitOps context.
- License 许可
- MIT
- 最近更新
- 2026-08-27
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- argocd-expert
- license
- MIT
- metadata
- { "author": "Community", "status": "stable", "version": "1.0", "category": "cloud" }
- description
- GitOps implementation with ArgoCD: declarative synchronization of Kubernetes applications, App-of-Apps pattern, ApplicationSets, Argo Rollouts for canary/blue-green, secret management with Sealed Secrets/External Secrets Operator, and troubleshooting of sync failures and drift. Use when setting up ArgoCD for continuous delivery, designing GitOps repo structure, implementing progressive delivery strategies, managing secrets in GitOps workflows, or debugging out-of-sync applications. Trigger: ArgoCD, GitOps, Argo Rollouts, ApplicationSet. Do NOT trigger for: raw Kubernetes manifest authoring without GitOps context.
02 资源文件 4
- 参考文档evals/evals.json2.2 KB
- 参考文档references/application-patterns.md990 B
- 参考文档references/progressive-delivery.md907 B
- 参考文档references/troubleshooting.md844 B
03 SKILL.md 正文
ArgoCD Expert
GitOps with ArgoCD: declarative sync, progressive delivery and secrets.
Core Stack
- GitOps Engine: ArgoCD (declarative sync, webhook triggers, auto-healing)
- Progressive Delivery: Argo Rollouts (canary, blue-green, analysis templates)
- Secrets: Sealed Secrets + External Secrets Operator + SOPS
- Sync: App-of-Apps pattern, ApplicationSets, sync waves, resource hooks
App-of-Apps Pattern
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: root-app
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/example-org/infrastructure-helm
targetRevision: main
path: apps/
destination:
server: https://kubernetes.default.svc
namespace: argocd
syncPolicy:
automated:
prune: true
selfHeal: true
Each sub-app in apps/ deploys a specific service. Root app auto-discovers changes.
Secrets in GitOps
| Tool | Pattern | Use Case |
|---|---|---|
| Sealed Secrets | Encrypt in-cluster, safe in Git | Simple, single-cluster |
| External Secrets Operator | Sync from AWS Secrets Manager/Vault | Multi-cluster, external source-of-truth |
| SOPS | Encrypt with KMS/PGP | Multi-tool, no K8s dependency |
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: api-db
spec:
refreshInterval: 1h
secretStoreRef:
name: aws-secretsmanager
kind: ClusterSecretStore
target:
name: api-db-secret
data:
- secretKey: password
remoteRef:
key: prod/api/db
property: password
Argo Rollouts
apiVersion: argoproj.io/v1alpha1
kind: Rollout
spec:
replicas: 5
strategy:
canary:
steps:
- setWeight: 20
- pause: { duration: 60s }
- setWeight: 40
- pause: { duration: 60s }
- setWeight: 100
template: { ... }
- Analysis templates validate canary before promotion (Prometheus queries, Datadog monitors)
- Automatic rollback on analysis failure
Sync Waves & Hooks
annotations:
argocd.argoproj.io/sync-wave: "1" # lower = first
argocd.argoproj.io/hook: PreSync # run before sync
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
Wave ordering: ConfigMaps -> Secrets -> Deployments -> Jobs.
Troubleshooting
| Issue | Check |
|---|---|
| OutOfSync | Manual changes? kubectl diff vs git |
| SyncError | Invalid YAML? Missing CRD? RBAC deny? |
| Degraded | Pod not ready? Health check failing? |
| Unknown | Network timeout to repo? Webhook not firing? |
argocd app get <app> --refresh hardfor forced reconciliation- NEVER manually edit ArgoCD-managed resources (drift)
Constraints
- NEVER store plaintext secrets in Git — use Sealed Secrets/ESO/SOPS
- NEVER run without
selfHeal: truein production (drift protection) - NEVER skip analysis templates for canary deployments
- ALWAYS use sync waves for ordered dependency deployment
- ALWAYS pin image tags (never
:latest) in ArgoCD sources - NEVER bypass ArgoCD for production changes (manual
kubectl apply)
Overview
GitOps delivery with ArgoCD for team K8s infrastructure. Covers declarative sync, App-of-Apps pattern, progressive delivery via Argo Rollouts, secrets management (Sealed Secrets/ESO/SOPS), and troubleshooting sync failures and drift.
Anti-patterns
FAIL: Storing plaintext secrets in Git
apiVersion: v1
kind: Secret
metadata:
name: db-password
data:
password: c3VwZXJzZWNyZXQ= # BAD: base64 != encrypted
PASS: Use Sealed Secrets (kubeseal) or External Secrets Operator referencing AWS Secrets Manager/Vault.
FAIL: Bypassing ArgoCD with manual kubectl apply
kubectl apply -f deployment.yaml # BAD: creates drift
PASS: Push changes to Git repo and let ArgoCD sync. Set selfHeal: true for auto-correction.
FAIL: Skipping analysis templates in canary rollouts
strategy:
canary:
steps:
- setWeight: 100 # BAD: no validation, immediate full traffic
PASS: Add analysis template with Prometheus queries to auto-rollback on failure.
FAIL: Using :latest image tag in ArgoCD sources
source:
targetRevision: :latest # BAD: unreproducible deployments
PASS: Pin to immutable tag (e.g. v1.2.3 or commit SHA).
References
| Resource | URL | Last verified |
|---|---|---|
| ArgoCD Documentation | https://argo-cd.readthedocs.io/en/stable/ | 2025-05 |
| Argo Rollouts | https://argoproj.github.io/rollouts/ | 2025-05 |
| External Secrets Operator | https://external-secrets.io/latest/ | 2025-05 |
| Sealed Secrets | https://github.com/bitnami-labs/sealed-secrets | 2025-05 |
| SOPS | https://github.com/getsops/sops | 2025-05 |
Verification Checklist
- [ ] Secrets stored in Git are encrypted (Sealed Secrets/ESO/SOPS) — no plaintext
- [ ] Argo Rollouts analysis templates configured for canary deployments
- [ ]
selfHeal: trueenabled for production applications - [ ] Sync waves ordered correctly (ConfigMaps → Secrets → Deployments → Jobs)
- [ ] Image tags pinned to immutable version (never
:latest) - [ ] Sync policy configured: prune enabled, auto-sync turned on
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Application stuck in OutOfSync state |
Manual kubectl apply created drift; resource modified outside ArgoCD |
Revert manual changes; enable selfHeal: true; re-sync via argocd app sync |
SyncError after commit |
Invalid YAML in manifest; missing CRD; RBAC deny | Run kubectl apply --dry-run=client locally; verify CRD installed; check RBAC |
| Rollout paused at canary step and not promoting | Analysis template not passing health checks | Check analysis run logs in Argo Rollouts UI; verify Prometheus query works |
App shows Unknown status |
Network timeout reaching Git repo; webhook not firing | Verify repo URL reachable from ArgoCD; check webhook delivery logs |
| Gotcha: sync wave ordering non-deterministic within same wave | Resources in same wave (weight 0, 10, 20) deploy in parallel — no guaranteed order | Use separate waves for sequential dependencies; add --sync-wave annotation with different weights for ordered resources |
Edge case: argocd app diff shows no diff but sync still fails |
Kubernetes CRD schema validation rejects valid manifest; API version mismatch (v1 vs v1beta1) | Verify CRD API version matches manifest; run kubectl validate against the cluster's CRD schema |
04 同仓库更多 Skills
web-browsing-agent-expert
Web browsing for AI agents: driving a headless browser (Playwright, Puppeteer) from agent tooling, navigation and page-state grounding, DOM extraction and structured data capture, form interaction, session and cookie management, anti-bot mitigation awareness, and safe browsing rules (no PII exfiltration, respect robots and terms). Use when building a browsing tool or MCP server for an agent, teaching an agent to navigate and read web pages, extracting structured content from dynamic sites, or handling login walls and pagination in agent workflows. Trigger: web browsing agent, headless browser, Playwright MCP, Puppeteer, browser automation for agents, DOM extraction, page navigation, session management. Do NOT trigger for: end-to-end UI testing of an application (use playwright-expert); writing standalone scraping scripts for data pipelines (use python-expert); fetching a single public URL (use the fetch tool).
vector-databases
Design and operate vector databases for cloud-native AI features. Use when selecting between pgvector, Pinecone, or Weaviate for AI context layer or integration-hub; designing embedding schemas and index parameters; implementing ANN search with metadata filtering; managing embedding model versions; optimizing query latency; or debugging low retrieval quality. Pairs with rag-architecture for pipeline design and postgres-database-expert for pgvector specifics. Trigger: vector database, pgvector, Pinecone, Weaviate, embedding, ANN search, HNSW, cosine similarity. Do NOT trigger for: relational SQL optimization, standard PostgreSQL schema design, Redis caching.
typescript-expert
Full-stack TypeScript stack for modern projects: frontend SSR/CSR with Next.js 14 App Router and React, backend APIs with Node.js (Express/Fastify), state management with Zustand/Redux Toolkit, unit and integration testing with Vitest/Jest + React Testing Library + MSW, and static analysis with ESLint/Prettier/tsc. Use when building React components or hooks, implementing Next.js App Router or Server Components, writing Node.js REST API handlers, implementing middleware (auth, rate-limit, logging), managing client state (Zustand/RTK), writing frontend/backend tests, or running TypeScript linting/type checks. Trigger: TypeScript, Next.js, React, Zustand, Node.js, Express, Fastify, MSW, Vitest. Do NOT trigger for: Python backend development, Go microservices, iOS/mobile development.
tool-usage
Guide correct tool selection, design, and orchestration for AI agents. Use when choosing between dedicated vs Bash tools, designing MCP tool interfaces, naming tool parameters, handling tool response limits, orchestrating parallel vs sequential calls, evaluating tool accuracy, applying ACI design principles, selecting workflow patterns, or reading/filtering/transforming/generating structured data (JSON, YAML, CSV, TOML, XML). Trigger: tool selection, MCP tool design, orchestration, ACI, parallel execution, composite tool, structured data, jq, yq, dasel, mlr, csvkit. Do NOT trigger for: writing application business logic, domain-specific development (route to domain skill), database migrations.
token-efficiency
Enforce token-efficient output, compression, caching, and model routing. Use when calibrating response verbosity, applying compression strategies to logs or RAG chunks, routing tasks to the right model tier, setting thinking budgets, enforcing word limits, compressing context before reinitiation, applying KV-cache ordering, masking tool output observations, or applying clarification-first protocol before irreversible actions. Trigger: token efficiency, compression, model routing, thinking budget, KV-cache, clarification protocol. Do NOT trigger for: non-agent tooling, CI/CD pipeline scripting, infrastructure provisioning.
time-series-db
Time-series database patterns for cloud-native metrics and analytics: TimescaleDB, InfluxDB, and Amazon Timestream selection; continuous aggregates, retention policies, downsampling, and integration with Prometheus/Grafana. Use when storing business metrics over time, building custom business dashboards, designing high-frequency event storage, or querying time-bucketed aggregations. Trigger: time-series, TimescaleDB, InfluxDB, Prometheus, Grafana, hypertable, continuous aggregate, retention policy. Do NOT trigger for: relational PostgreSQL schema design, NoSQL document stores, Kafka event streaming.