[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M739RBHNJ5PWENE12FWCD02E":3,"skill-same:01M739RBHNJ5PWENE12FWCD02E":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M739RBHNJ5PWENE12FWCD02E","implement-gitops-workflow",null,"Implement GitOps continuous delivery using Argo CD or Flux with app-of-apps pattern, automated sync policies, drift detection, and multi-environment promotion. Manage Kubernetes deployments declaratively from Git with automated reconciliation. Use when implementing declarative infrastructure management, migrating from imperative kubectl commands to Git-driven deployments, setting up multi-environment promotion workflows, enforcing code review gates for production, or meeting audit and compliance requirements.","roohe\u002Fagentic-super-skills","roohe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99054084?v=4","01M734WCDFP6RZVT5CNM00QR26","01M734WCE4BD0T4NZS5PCV9V5F",10,"MIT","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fimplement-gitops-workflow\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: implement-gitops-workflow\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-24\"\ndescription: >\n  Implement GitOps continuous delivery using Argo CD or Flux with app-of-apps pattern,\n  automated sync policies, drift detection, and multi-environment promotion. Manage\n  Kubernetes deployments declaratively from Git with automated reconciliation. Use when\n  implementing declarative infrastructure management, migrating from imperative kubectl\n  commands to Git-driven deployments, setting up multi-environment promotion workflows,\n  enforcing code review gates for production, or meeting audit and compliance requirements.\nlicense: MIT\nallowed-tools: Read Write Edit Bash Grep Glob\nmetadata:\n  author: Philipp Thoss\n  version: \"1.0\"\n  domain: devops\n  complexity: advanced\n  language: multi\n  tags: gitops, argocd, flux, sync, drift-detection\n---\n\n# Implement GitOps Workflow\n\nDeploy and manage Kubernetes applications using GitOps principles with Argo CD or Flux for automated, auditable, and repeatable deployments.\n\n## When to Use\n\n- Implementing declarative infrastructure and application management\n- Migrating from imperative kubectl\u002Fhelm commands to Git-driven deployments\n- Setting up multi-environment promotion workflows (dev → staging → prod)\n- Enforcing code review and approval gates for production deployments\n- Achieving compliance and audit requirements with Git history\n- Implementing disaster recovery with Git as single source of truth\n\n## Inputs\n\n- **Required**: Kubernetes cluster with admin access (EKS, GKE, AKS, or self-hosted)\n- **Required**: Git repository for Kubernetes manifests and Helm charts\n- **Required**: Argo CD or Flux CLI installed\n- **Optional**: Sealed Secrets or External Secrets Operator for secrets management\n- **Optional**: Image Updater for automated image promotion\n- **Optional**: Prometheus for monitoring sync status\n\n## Procedure\n\n> See [Extended Examples](references\u002FEXAMPLES.md) for complete configuration files and templates.\n\n\n### Step 1: Install Argo CD and Configure Repository Access\n\nDeploy Argo CD to cluster and connect to Git repository.\n\n```bash\n# Create namespace\nkubectl create namespace argocd\n\n# Install Argo CD\nkubectl apply -n argocd -f https:\u002F\u002Fraw.githubusercontent.com\u002Fargoproj\u002Fargo-cd\u002Fstable\u002Fmanifests\u002Finstall.yaml\n\n# Wait for pods to be ready\nkubectl wait --for=condition=ready pod -l app.kubernetes.io\u002Fname=argocd-server -n argocd --timeout=300s\n\n# Install Argo CD CLI\ncurl -sSL -o argocd-linux-amd64 https:\u002F\u002Fgithub.com\u002Fargoproj\u002Fargo-cd\u002Freleases\u002Flatest\u002Fdownload\u002Fargocd-linux-amd64\nsudo install -m 555 argocd-linux-amd64 \u002Fusr\u002Flocal\u002Fbin\u002Fargocd\nrm argocd-linux-amd64\n\n# Port-forward to access UI\nkubectl port-forward svc\u002Fargocd-server -n argocd 8080:443 &\n\n# Get initial admin password\nARGOCD_PASSWORD=$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath=\"{.data.password}\" | base64 -d)\necho \"Argo CD Admin Password: $ARGOCD_PASSWORD\"\n\n# Login via CLI\nargocd login localhost:8080 --username admin --password \"$ARGOCD_PASSWORD\" --insecure\n\n# Change admin password\nargocd account update-password\n\n# Add Git repository (HTTPS with token)\nargocd repo add https:\u002F\u002Fgithub.com\u002FUSERNAME\u002Fgitops-repo \\\n  --username USERNAME \\\n  --password \"$GITHUB_TOKEN\" \\\n  --name gitops-repo\n\n# Or add via SSH\nssh-keygen -t ed25519 -C \"argocd@cluster\" -f argocd-deploy-key -N \"\"\n# Add argocd-deploy-key.pub to GitHub repository deploy keys\nargocd repo add git@github.com:USERNAME\u002Fgitops-repo.git \\\n  --ssh-private-key-path argocd-deploy-key \\\n  --name gitops-repo\n\n# Verify repository connection\nargocd repo list\n\n# Configure Ingress for UI (optional)\ncat \u003C\u003CEOF | kubectl apply -f -\napiVersion: networking.k8s.io\u002Fv1\nkind: Ingress\nmetadata:\n  name: argocd-server-ingress\n  namespace: argocd\n  annotations:\n    cert-manager.io\u002Fcluster-issuer: letsencrypt-prod\n    nginx.ingress.kubernetes.io\u002Fssl-passthrough: \"true\"\n    nginx.ingress.kubernetes.io\u002Fbackend-protocol: \"HTTPS\"\nspec:\n  ingressClassName: nginx\n  tls:\n  - hosts:\n    - argocd.example.com\n    secretName: argocd-tls\n  rules:\n  - host: argocd.example.com\n    http:\n      paths:\n      - path: \u002F\n        pathType: Prefix\n        backend:\n          service:\n            name: argocd-server\n            port:\n              number: 443\nEOF\n```\n\n**Got:** Argo CD installed in argocd namespace. UI accessible via port-forward or Ingress. Admin password changed from default. Git repository added with SSH or token authentication. Repository connection verified.\n\n**If fail:** For pod CrashLoopBackOff, check logs with `kubectl logs -n argocd -l app.kubernetes.io\u002Fname=argocd-server`. For repository connection failures, verify token has repo access or SSH key added to deploy keys. For Ingress SSL issues, ensure cert-manager issued certificate successfully. For login failures, retrieve password again or reset via `kubectl delete secret argocd-initial-admin-secret -n argocd` and restart server.\n\n### Step 2: Create Application Manifest and Deploy First Application\n\nDefine Argo CD Application resource with sync policies and health checks.\n\n```bash\n# Create Git repository structure\nmkdir -p gitops-repo\u002F{apps,infra,projects}\ncd gitops-repo\n\n# Create sample application\nmkdir -p apps\u002Fmyapp\u002Foverlays\u002F{dev,staging,prod}\nmkdir -p apps\u002Fmyapp\u002Fbase\n\n# Base Kustomization\ncat > apps\u002Fmyapp\u002Fbase\u002Fkustomization.yaml \u003C\u003CEOF\napiVersion: kustomize.config.k8s.io\u002Fv1beta1\nkind: Kustomization\nresources:\n- deployment.yaml\n- service.yaml\nEOF\n\ncat > apps\u002Fmyapp\u002Fbase\u002Fdeployment.yaml \u003C\u003CEOF\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: myapp\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: myapp\n  template:\n    metadata:\n      labels:\n        app: myapp\n    spec:\n      containers:\n      - name: myapp\n        image: ghcr.io\u002Fusername\u002Fmyapp:v1.0.0\n        ports:\n        - containerPort: 8080\nEOF\n\ncat > apps\u002Fmyapp\u002Fbase\u002Fservice.yaml \u003C\u003CEOF\napiVersion: v1\nkind: Service\nmetadata:\n  name: myapp\nspec:\n  selector:\n    app: myapp\n  ports:\n  - port: 80\n    targetPort: 8080\nEOF\n\n# Production overlay\ncat > apps\u002Fmyapp\u002Foverlays\u002Fprod\u002Fkustomization.yaml \u003C\u003CEOF\napiVersion: kustomize.config.k8s.io\u002Fv1beta1\nkind: Kustomization\nnamespace: production\nresources:\n- ..\u002F..\u002Fbase\nreplicas:\n- name: myapp\n  count: 5\nimages:\n- name: ghcr.io\u002Fusername\u002Fmyapp\n  newTag: v1.0.0\nEOF\n\n# Commit to Git\ngit add .\ngit commit -m \"Add myapp application manifests\"\ngit push\n\n# Create Argo CD Application\ncat > argocd-apps\u002Fmyapp-prod.yaml \u003C\u003CEOF\napiVersion: argoproj.io\u002Fv1alpha1\nkind: Application\nmetadata:\n  name: myapp-prod\n  namespace: argocd\n  finalizers:\n  - resources-finalizer.argocd.argoproj.io\nspec:\n  project: default\n  source:\n    repoURL: https:\u002F\u002Fgithub.com\u002FUSERNAME\u002Fgitops-repo\n    targetRevision: main\n    path: apps\u002Fmyapp\u002Foverlays\u002Fprod\n  destination:\n    server: https:\u002F\u002Fkubernetes.default.svc\n    namespace: production\n  syncPolicy:\n    automated:\n      prune: true      # Delete resources removed from Git\n      selfHeal: true   # Auto-sync on drift detection\n      allowEmpty: false\n    syncOptions:\n    - CreateNamespace=true\n    - PruneLast=true\n    retry:\n      limit: 5\n      backoff:\n        duration: 5s\n        factor: 2\n        maxDuration: 3m\n  revisionHistoryLimit: 10\nEOF\n\n# Apply Application via kubectl\nkubectl apply -f argocd-apps\u002Fmyapp-prod.yaml\n\n# Or create via CLI\nargocd app create myapp-prod \\\n  --repo https:\u002F\u002Fgithub.com\u002FUSERNAME\u002Fgitops-repo \\\n  --path apps\u002Fmyapp\u002Foverlays\u002Fprod \\\n  --dest-server https:\u002F\u002Fkubernetes.default.svc \\\n  --dest-namespace production \\\n  --sync-policy automated \\\n  --auto-prune \\\n  --self-heal\n\n# Watch sync status\nargocd app get myapp-prod --watch\n\n# Verify application\nkubectl get all -n production\nargocd app sync myapp-prod  # Manual sync if automated disabled\n```\n\n**Got:** Application synced automatically from Git. Resources created in production namespace. Argo CD UI shows healthy status. Automated sync policies enable prune and self-heal. Sync succeeds within retry limits.\n\n**If fail:** For sync failures, check application events with `argocd app get myapp-prod` and `kubectl get events -n production`. For Kustomize build errors, test locally with `kustomize build apps\u002Fmyapp\u002Foverlays\u002Fprod`. For namespace errors, verify namespace exists or enable CreateNamespace sync option. For pruning issues, check finalizers and owner references with `kubectl get \u003Cresource> -o yaml`.\n\n### Step 3: Implement App-of-Apps Pattern for Multi-Environment Management\n\nCreate root application that manages child applications across environments.\n\n```bash\n# Create app-of-apps structure\nmkdir -p argocd-apps\u002F{projects,infra,apps}\n\n# Define projects for RBAC\ncat > argocd-apps\u002Fprojects\u002Fproduction.yaml \u003C\u003CEOF\napiVersion: argoproj.io\u002Fv1alpha1\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n**Got:** Root app manages all child applications. New applications automatically deployed when added to Git. Infrastructure applications deployed before app applications (via sync waves if needed). Projects enforce RBAC boundaries. App tree shows parent-child relationships.\n\n**If fail:** For circular dependencies, use sync waves to control order. For project permission errors, verify sourceRepos and destinations match application requirements. For recursive directory issues, ensure YAML files are valid and don't conflict. For missing child apps, check root app status with `argocd app get root-app`.\n\n### Step 4: Configure Image Updater for Automated Deployments\n\nSet up Argo CD Image Updater to automatically promote new image versions.\n\n```bash\n# Install Argo CD Image Updater\nkubectl apply -n argocd -f https:\u002F\u002Fraw.githubusercontent.com\u002Fargoproj-labs\u002Fargocd-image-updater\u002Fstable\u002Fmanifests\u002Finstall.yaml\n\n# Configure image update strategy via annotations\ncat > argocd-apps\u002Fmyapp-prod-autoupdate.yaml \u003C\u003CEOF\napiVersion: argoproj.io\u002Fv1alpha1\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n**Got:** Image Updater monitors registry for new images matching tag patterns. Semantic versioning strategy updates to latest stable release. Git commits created automatically with new image tags. Applications sync with updated images. Staging uses digest strategy for immutable deployments.\n\n**If fail:** For registry access errors, verify image-updater has pull credentials via secret or ServiceAccount. For write-back failures, check git-creds secret has push permissions. For no updates detected, verify tag regex matches actual tags with `argocd-image-updater test ghcr.io\u002Fusername\u002Fmyapp`. For authentication issues, check image-updater logs for detailed error messages.\n\n### Step 5: Implement Progressive Delivery with Argo Rollouts\n\nEnable canary and blue-green deployments with automated rollback.\n\n```bash\n# Install Argo Rollouts controller\nkubectl create namespace argo-rollouts\nkubectl apply -n argo-rollouts -f https:\u002F\u002Fgithub.com\u002Fargoproj\u002Fargo-rollouts\u002Freleases\u002Flatest\u002Fdownload\u002Finstall.yaml\n\n# Install Rollouts kubectl plugin\ncurl -LO https:\u002F\u002Fgithub.com\u002Fargoproj\u002Fargo-rollouts\u002Freleases\u002Flatest\u002Fdownload\u002Fkubectl-argo-rollouts-linux-amd64\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n**Got:** Rollout progressively shifts traffic to canary. Analysis runs at each step, validating success rate. Automated promotion on success, rollback on failure. Argo CD syncs Rollout resources. Dashboard shows real-time rollout progress.\n\n**If fail:** For analysis failures, verify Prometheus accessible and query returns valid results. For traffic routing issues, check Ingress annotations and canary service endpoints. For stuck rollouts, manually promote or abort. For revision mismatch, ensure Argo CD sync policy doesn't conflict with Rollouts controller updates.\n\n### Step 6: Configure Drift Detection and Webhook Notifications\n\nMonitor for manual changes and send alerts to Slack\u002Femail.\n\n```bash\n# Configure drift detection in Application\ncat > argocd-apps\u002Fmyapp-strict.yaml \u003C\u003CEOF\napiVersion: argoproj.io\u002Fv1alpha1\nkind: Application\nmetadata:\n  name: myapp-prod\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n**Got:** Self-heal automatically reverts manual kubectl changes. Notifications sent to Slack on sync failures and successful deployments. Webhooks trigger external systems (PagerDuty, monitoring, ITSM). Drift alerts show what changed and who made changes (via Git history).\n\n**If fail:** For self-heal not triggering, verify automated sync policy enabled and refresh interval not too long (default 3m). For notification failures, test Slack token with curl and verify bot added to channels. For ignored differences not working, check JSON pointer syntax matches resource structure. For webhook errors, check endpoint accessibility and authentication headers.\n\n## Validation\n\n- [ ] Argo CD or Flux installed and accessible via UI\u002FCLI\n- [ ] Git repository connected with proper authentication\n- [ ] Applications sync automatically from Git on commit\n- [ ] Manual kubectl changes reverted by self-heal\n- [ ] App-of-apps pattern deploys multiple applications\n- [ ] Image Updater promotes new images based on tag patterns\n- [ ] Argo Rollouts perform progressive canary deployments\n- [ ] Notifications sent to Slack\u002Femail on sync events\n- [ ] Drift detection alerts on out-of-band changes\n- [ ] RBAC enforces project-level access controls\n\n## Pitfalls\n\n- **Automatic prune disabled**: Resources removed from Git remain in cluster. Enable `prune: true` in sync policy.\n\n- **No sync waves**: Infrastructure applications deployed after apps that depend on them. Use `argocd.argoproj.io\u002Fsync-wave` annotations to control order.\n\n- **Ignoring HPA-managed replicas**: Sync fails because HPA changed replica count. Add `\u002Fspec\u002Freplicas` to ignoreDifferences.\n\n- **Write-back conflicts**: Image Updater commits conflict with manual commits. Use separate branch or fine-grained RBAC for image updater.\n\n- **Missing finalizers**: Application deletion leaves orphaned resources. Add `resources-finalizer.argocd.argoproj.io` to Application metadata.\n\n- **No analysis templates**: Rollouts promote automatically without validation. Implement AnalysisTemplates with metrics queries.\n\n- **Secrets in Git**: Plaintext secrets committed to repository. Use Sealed Secrets or External Secrets Operator.\n\n- **Self-heal too aggressive**: Self-heal reverts legitimate emergency changes. Use annotations to temporarily disable or implement approval gates.\n\n## Related Skills\n\n- `configure-git-repository` - Setting up Git repository structure for GitOps\n- `manage-git-branches` - Branch strategies for environment promotion\n- `deploy-to-kubernetes` - Understanding Kubernetes resources managed by GitOps\n- `manage-kubernetes-secrets` - Sealed Secrets integration with Argo CD\n- `build-ci-cd-pipeline` - CI builds images, GitOps deploys them\n- `setup-container-registry` - Image promotion between registries\n","# Implement GitOps Workflow\n\nDeploy and manage Kubernetes applications using GitOps principles with Argo CD or Flux for automated, auditable, and repeatable deployments.\n\n## When to Use\n\n- Implementing declarative infrastructure and application management\n- Migrating from imperative kubectl\u002Fhelm commands to Git-driven deployments\n- Setting up multi-environment promotion workflows (dev → staging → prod)\n- Enforcing code review and approval gates for production deployments\n- Achieving compliance and audit requirements with Git history\n- Implementing disaster recovery with Git as single source of truth\n\n## Inputs\n\n- **Required**: Kubernetes cluster with admin access (EKS, GKE, AKS, or self-hosted)\n- **Required**: Git repository for Kubernetes manifests and Helm charts\n- **Required**: Argo CD or Flux CLI installed\n- **Optional**: Sealed Secrets or External Secrets Operator for secrets management\n- **Optional**: Image Updater for automated image promotion\n- **Optional**: Prometheus for monitoring sync status\n\n## Procedure\n\n> See [Extended Examples](references\u002FEXAMPLES.md) for complete configuration files and templates.\n\n\n### Step 1: Install Argo CD and Configure Repository Access\n\nDeploy Argo CD to cluster and connect to Git repository.\n\n```bash\n# Create namespace\nkubectl create namespace argocd\n\n# Install Argo CD\nkubectl apply -n argocd -f https:\u002F\u002Fraw.githubusercontent.com\u002Fargoproj\u002Fargo-cd\u002Fstable\u002Fmanifests\u002Finstall.yaml\n\n# Wait for pods to be ready\nkubectl wait --for=condition=ready pod -l app.kubernetes.io\u002Fname=argocd-server -n argocd --timeout=300s\n\n# Install Argo CD CLI\ncurl -sSL -o argocd-linux-amd64 https:\u002F\u002Fgithub.com\u002Fargoproj\u002Fargo-cd\u002Freleases\u002Flatest\u002Fdownload\u002Fargocd-linux-amd64\nsudo install -m 555 argocd-linux-amd64 \u002Fusr\u002Flocal\u002Fbin\u002Fargocd\nrm argocd-linux-amd64\n\n# Port-forward to access UI\nkubectl port-forward svc\u002Fargocd-server -n argocd 8080:443 &\n\n# Get initial admin password\nARGOCD_PASSWORD=$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath=\"{.data.password}\" | base64 -d)\necho \"Argo CD Admin Password: $ARGOCD_PASSWORD\"\n\n# Login via CLI\nargocd login localhost:8080 --username admin --password \"$ARGOCD_PASSWORD\" --insecure\n\n# Change admin password\nargocd account update-password\n\n# Add Git repository (HTTPS with token)\nargocd repo add https:\u002F\u002Fgithub.com\u002FUSERNAME\u002Fgitops-repo \\\n  --username USERNAME \\\n  --password \"$GITHUB_TOKEN\" \\\n  --name gitops-repo\n\n# Or add via SSH\nssh-keygen -t ed25519 -C \"argocd@cluster\" -f argocd-deploy-key -N \"\"\n# Add argocd-deploy-key.pub to GitHub repository deploy keys\nargocd repo add git@github.com:USERNAME\u002Fgitops-repo.git \\\n  --ssh-private-key-path argocd-deploy-key \\\n  --name gitops-repo\n\n# Verify repository connection\nargocd repo list\n\n# Configure Ingress for UI (optional)\ncat \u003C\u003CEOF | kubectl apply -f -\napiVersion: networking.k8s.io\u002Fv1\nkind: Ingress\nmetadata:\n  name: argocd-server-ingress\n  namespace: argocd\n  annotations:\n    cert-manager.io\u002Fcluster-issuer: letsencrypt-prod\n    nginx.ingress.kubernetes.io\u002Fssl-passthrough: \"true\"\n    nginx.ingress.kubernetes.io\u002Fbackend-protocol: \"HTTPS\"\nspec:\n  ingressClassName: nginx\n  tls:\n  - hosts:\n    - argocd.example.com\n    secretName: argocd-tls\n  rules:\n  - host: argocd.example.com\n    http:\n      paths:\n      - path: \u002F\n        pathType: Prefix\n        backend:\n          service:\n            name: argocd-server\n            port:\n              number: 443\nEOF\n```\n\n**Got:** Argo CD installed in argocd namespace. UI accessible via port-forward or Ingress. Admin password changed from default. Git repository added with SSH or token authentication. Repository connection verified.\n\n**If fail:** For pod CrashLoopBackOff, check logs with `kubectl logs -n argocd -l app.kubernetes.io\u002Fname=argocd-server`. For repository connection failures, verify token has repo access or SSH key added to deploy keys. For Ingress SSL issues, ensure cert-manager issued certificate successfully. For login failures, retrieve password again or reset via `kubectl delete secret argocd-initial-admin-secret -n argocd` and restart server.\n\n### Step 2: Create Application Manifest and Deploy First Application\n\nDefine Argo CD Application resource with sync policies and health checks.\n\n```bash\n# Create Git repository structure\nmkdir -p gitops-repo\u002F{apps,infra,projects}\ncd gitops-repo\n\n# Create sample application\nmkdir -p apps\u002Fmyapp\u002Foverlays\u002F{dev,staging,prod}\nmkdir -p apps\u002Fmyapp\u002Fbase\n\n# Base Kustomization\ncat > apps\u002Fmyapp\u002Fbase\u002Fkustomization.yaml \u003C\u003CEOF\napiVersion: kustomize.config.k8s.io\u002Fv1beta1\nkind: Kustomization\nresources:\n- deployment.yaml\n- service.yaml\nEOF\n\ncat > apps\u002Fmyapp\u002Fbase\u002Fdeployment.yaml \u003C\u003CEOF\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: myapp\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: myapp\n  template:\n    metadata:\n      labels:\n        app: myapp\n    spec:\n      containers:\n      - name: myapp\n        image: ghcr.io\u002Fusername\u002Fmyapp:v1.0.0\n        ports:\n        - containerPort: 8080\nEOF\n\ncat > apps\u002Fmyapp\u002Fbase\u002Fservice.yaml \u003C\u003CEOF\napiVersion: v1\nkind: Service\nmetadata:\n  name: myapp\nspec:\n  selector:\n    app: myapp\n  ports:\n  - port: 80\n    targetPort: 8080\nEOF\n\n# Production overlay\ncat > apps\u002Fmyapp\u002Foverlays\u002Fprod\u002Fkustomization.yaml \u003C\u003CEOF\napiVersion: kustomize.config.k8s.io\u002Fv1beta1\nkind: Kustomization\nnamespace: production\nresources:\n- ..\u002F..\u002Fbase\nreplicas:\n- name: myapp\n  count: 5\nimages:\n- name: ghcr.io\u002Fusername\u002Fmyapp\n  newTag: v1.0.0\nEOF\n\n# Commit to Git\ngit add .\ngit commit -m \"Add myapp application manifests\"\ngit push\n\n# Create Argo CD Application\ncat > argocd-apps\u002Fmyapp-prod.yaml \u003C\u003CEOF\napiVersion: argoproj.io\u002Fv1alpha1\nkind: Application\nmetadata:\n  name: myapp-prod\n  namespace: argocd\n  finalizers:\n  - resources-finalizer.argocd.argoproj.io\nspec:\n  project: default\n  source:\n    repoURL: https:\u002F\u002Fgithub.com\u002FUSERNAME\u002Fgitops-repo\n    targetRevision: main\n    path: apps\u002Fmyapp\u002Foverlays\u002Fprod\n  destination:\n    server: https:\u002F\u002Fkubernetes.default.svc\n    namespace: production\n  syncPolicy:\n    automated:\n      prune: true      # Delete resources removed from Git\n      selfHeal: true   # Auto-sync on drift detection\n      allowEmpty: false\n    syncOptions:\n    - CreateNamespace=true\n    - PruneLast=true\n    retry:\n      limit: 5\n      backoff:\n        duration: 5s\n        factor: 2\n        maxDuration: 3m\n  revisionHistoryLimit: 10\nEOF\n\n# Apply Application via kubectl\nkubectl apply -f argocd-apps\u002Fmyapp-prod.yaml\n\n# Or create via CLI\nargocd app create myapp-prod \\\n  --repo https:\u002F\u002Fgithub.com\u002FUSERNAME\u002Fgitops-repo \\\n  --path apps\u002Fmyapp\u002Foverlays\u002Fprod \\\n  --dest-server https:\u002F\u002Fkubernetes.default.svc \\\n  --dest-namespace production \\\n  --sync-policy automated \\\n  --auto-prune \\\n  --self-heal\n\n# Watch sync status\nargocd app get myapp-prod --watch\n\n# Verify application\nkubectl get all -n production\nargocd app sync myapp-prod  # Manual sync if automated disabled\n```\n\n**Got:** Application synced automatically from Git. Resources created in production namespace. Argo CD UI shows healthy status. Automated sync policies enable prune and self-heal. Sync succeeds within retry limits.\n\n**If fail:** For sync failures, check application events with `argocd app get myapp-prod` and `kubectl get events -n production`. For Kustomize build errors, test locally with `kustomize build apps\u002Fmyapp\u002Foverlays\u002Fprod`. For namespace errors, verify namespace exists or enable CreateNamespace sync option. For pruning issues, check finalizers and owner references with `kubectl get \u003Cresource> -o yaml`.\n\n### Step 3: Implement App-of-Apps Pattern for Multi-Environment Management\n\nCreate root application that manages child applications across environments.\n\n```bash\n# Create app-of-apps structure\nmkdir -p argocd-apps\u002F{projects,infra,apps}\n\n# Define projects for RBAC\ncat > argocd-apps\u002Fprojects\u002Fproduction.yaml \u003C\u003CEOF\napiVersion: argoproj.io\u002Fv1alpha1\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n**Got:** Root app manages all child applications. New applications automatically deployed when added to Git. Infrastructure applications deployed before app applications (via sync waves if needed). Projects enforce RBAC boundaries. App tree shows parent-child relationships.\n\n**If fail:** For circular dependencies, use sync waves to control order. For project permission errors, verify sourceRepos and destinations match application requirements. For recursive directory issues, ensure YAML files are valid and don't conflict. For missing child apps, check root app status with `argocd app get root-app`.\n\n### Step 4: Configure Image Updater for Automated Deployments\n\nSet up Argo CD Image Updater to automatically promote new image versions.\n\n```bash\n# Install Argo CD Image Updater\nkubectl apply -n argocd -f https:\u002F\u002Fraw.githubusercontent.com\u002Fargoproj-labs\u002Fargocd-image-updater\u002Fstable\u002Fmanifests\u002Finstall.yaml\n\n# Configure image update strategy via annotations\ncat > argocd-apps\u002Fmyapp-prod-autoupdate.yaml \u003C\u003CEOF\napiVersion: argoproj.io\u002Fv1alpha1\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n**Got:** Image Updater monitors registry for new images matching tag patterns. Semantic versioning strategy updates to latest stable release. Git commits created automatically with new image tags. Applications sync with updated images. Staging uses digest strategy for immutable deployments.\n\n**If fail:** For registry access errors, verify image-updater has pull credentials via secret or ServiceAccount. For write-back failures, check git-creds secret has push permissions. For no updates detected, verify tag regex matches actual tags with `argocd-image-updater test ghcr.io\u002Fusername\u002Fmyapp`. For authentication issues, check image-updater logs for detailed error messages.\n\n### Step 5: Implement Progressive Delivery with Argo Rollouts\n\nEnable canary and blue-green deployments with automated rollback.\n\n```bash\n# Install Argo Rollouts controller\nkubectl create namespace argo-rollouts\nkubectl apply -n argo-rollouts -f https:\u002F\u002Fgithub.com\u002Fargoproj\u002Fargo-rollouts\u002Freleases\u002Flatest\u002Fdownload\u002Finstall.yaml\n\n# Install Rollouts kubectl plugin\ncurl -LO https:\u002F\u002Fgithub.com\u002Fargoproj\u002Fargo-rollouts\u002Freleases\u002Flatest\u002Fdownload\u002Fkubectl-argo-rollouts-linux-amd64\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n**Got:** Rollout progressively shifts traffic to canary. Analysis runs at each step, validating success rate. Automated promotion on success, rollback on failure. Argo CD syncs Rollout resources. Dashboard shows real-time rollout progress.\n\n**If fail:** For analysis failures, verify Prometheus accessible and query returns valid results. For traffic routing issues, check Ingress annotations and canary service endpoints. For stuck rollouts, manually promote or abort. For revision mismatch, ensure Argo CD sync policy doesn't conflict with Rollouts controller updates.\n\n### Step 6: Configure Drift Detection and Webhook Notifications\n\nMonitor for manual changes and send alerts to Slack\u002Femail.\n\n```bash\n# Configure drift detection in Application\ncat > argocd-apps\u002Fmyapp-strict.yaml \u003C\u003CEOF\napiVersion: argoproj.io\u002Fv1alpha1\nkind: Application\nmetadata:\n  name: myapp-prod\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n**Got:** Self-heal automatically reverts manual kubectl changes. Notifications sent to Slack on sync failures and successful deployments. Webhooks trigger external systems (PagerDuty, monitoring, ITSM). Drift alerts show what changed and who made changes (via Git history).\n\n**If fail:** For self-heal not triggering, verify automated sync policy enabled and refresh interval not too long (default 3m). For notification failures, test Slack token with curl and verify bot added to channels. For ignored differences not working, check JSON pointer syntax matches resource structure. For webhook errors, check endpoint accessibility and authentication headers.\n\n## Validation\n\n- [ ] Argo CD or Flux installed and accessible via UI\u002FCLI\n- [ ] Git repository connected with proper authentication\n- [ ] Applications sync automatically from Git on commit\n- [ ] Manual kubectl changes reverted by self-heal\n- [ ] App-of-apps pattern deploys multiple applications\n- [ ] Image Updater promotes new images based on tag patterns\n- [ ] Argo Rollouts perform progressive canary deployments\n- [ ] Notifications sent to Slack\u002Femail on sync events\n- [ ] Drift detection alerts on out-of-band changes\n- [ ] RBAC enforces project-level access controls\n\n## Pitfalls\n\n- **Automatic prune disabled**: Resources removed from Git remain in cluster. Enable `prune: true` in sync policy.\n\n- **No sync waves**: Infrastructure applications deployed after apps that depend on them. Use `argocd.argoproj.io\u002Fsync-wave` annotations to control order.\n\n- **Ignoring HPA-managed replicas**: Sync fails because HPA changed replica count. Add `\u002Fspec\u002Freplicas` to ignoreDifferences.\n\n- **Write-back conflicts**: Image Updater commits conflict with manual commits. Use separate branch or fine-grained RBAC for image updater.\n\n- **Missing finalizers**: Application deletion leaves orphaned resources. Add `resources-finalizer.argocd.argoproj.io` to Application metadata.\n\n- **No analysis templates**: Rollouts promote automatically without validation. Implement AnalysisTemplates with metrics queries.\n\n- **Secrets in Git**: Plaintext secrets committed to repository. Use Sealed Secrets or External Secrets Operator.\n\n- **Self-heal too aggressive**: Self-heal reverts legitimate emergency changes. Use annotations to temporarily disable or implement approval gates.\n\n## Related Skills\n\n- `configure-git-repository` - Setting up Git repository structure for GitOps\n- `manage-git-branches` - Branch strategies for environment promotion\n- `deploy-to-kubernetes` - Understanding Kubernetes resources managed by GitOps\n- `manage-kubernetes-secrets` - Sealed Secrets integration with Argo CD\n- `build-ci-cd-pipeline` - CI builds images, GitOps deploys them\n- `setup-container-registry` - Image promotion between registries\n",{"name":5,"locale":23,"license":14,"metadata":24,"translator":31,"description":32,"allowed-tools":33,"source_commit":34,"source_locale":35,"translation_date":36},"caveman-lite",{"tags":25,"author":26,"domain":27,"version":28,"language":29,"complexity":30},"gitops, argocd, flux, sync, drift-detection","Philipp Thoss","devops","1.0","multi","advanced","Julius Brussee homage — caveman","Implement GitOps continuous delivery using Argo CD or Flux with app-of-apps pattern, automated sync policies, drift detection, and multi-environment promotion. Manage Kubernetes deployments declaratively from Git with automated reconciliation. Use when implementing declarative infrastructure management, migrating from imperative kubectl commands to Git-driven deployments, setting up multi-environment promotion workflows, enforcing code review gates for production, or meeting audit and compliance requirements.\n","Read Write Edit Bash Grep Glob","82c77053","en","2026-04-24","master","f483e54f3ad5f202a77d45f2e57f8d970b71195f","skills_library\u002Fimplement-gitops-workflow",2,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills","https:\u002F\u002Fgithub.com\u002Froohe","yoou.link","2026-05-19 15:56:07",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add roohe\u002Fagentic-super-skills --skill implement-gitops-workflow",{"tool":51,"command":52},"bunx","bunx skills add roohe\u002Fagentic-super-skills --skill implement-gitops-workflow",{"tool":54,"command":55},"pnpm","pnpm dlx skills add roohe\u002Fagentic-super-skills --skill implement-gitops-workflow","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fimplement-gitops-workflow\u002FSKILL.md",true,[59],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002FEXAMPLES.md","REFERENCE","参考文档",16167,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fimplement-gitops-workflow\u002Freferences\u002FEXAMPLES.md",[66,73,80,87,94,101],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M73D865CZME2FCMKA4PQM348","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M73D7Z64J4ABWZJD7P44XBBF","youtube-downloader","Download and process YouTube content for research. Use when: downloading competitor videos for analysis; extracting audio for podcasts; getting transcripts for content repurposing; archiving webinars; research content curation","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyoutube-downloader\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M73D7K8778TGZV3GJFR3703D","yc-pitch-deck","Create a compelling startup pitch deck that follows the structure proven to raise billions from top investors. Master the YC and Sequoia formats that get founders funded. Use when: **Fundraising** to create investor pitch decks; **YC application** to structure your narrative; **Demo Day prep** to craft your 2-minute pitch; **Angel investors** to communicate your opportunity; **Partnership pitches** to structure compelling asks","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyc-pitch-deck\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M73D70KJSE0E8Z28YMNNRT04","x-twitter-scraper","Use when the user needs X (Twitter) data or confirmation-gated X actions through Xquik: tweet search, user lookup, follower extraction, media download, monitoring, webhooks, MCP, SDKs, posting, likes, DMs, and profile updates. Requires a Xquik API key. Never ask for X login material.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fx-twitter-scraper\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":18},"01M73D6ED01GV077R7K4NZNFZJ","write-vignette","Create R package vignettes using R Markdown or Quarto. Covers vignette setup, YAML configuration, code chunk options, building and testing, and CRAN requirements for vignettes. Use when adding a Getting Started tutorial, documenting complex workflows spanning multiple functions, creating domain-specific guides, or when CRAN submission requires user-facing documentation beyond function help pages.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-vignette\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":18},"01M73D69YJR0BK3NFHE0CYG3EF","write-validation-documentation","Write IQ\u002FOQ\u002FPQ validation documentation for computerized systems in regulated environments. Covers protocols, reports, test scripts, deviation handling, and approval workflows. Use when validating R or other software for regulated use, preparing for a regulatory audit, documenting qualification of computing environments, or creating and updating validation protocols and reports for new or re-qualified systems.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-validation-documentation\u002FSKILL.md",[],[]]