All skills
wshobson avatar

/gitops-workflow

@5684887
by Seth Hobsonwshobson/agents40k stars
4,281

Implement GitOps workflows with ArgoCD and Flux for automated, declarative Kubernetes deployments with continuous reconciliation. Use when implementing GitOps practices, automating Kubernetes deployments, or setting up declarative infrastructure management.

Use this Skill: https://skilld.dev/gh/wshobson/agents/gitops-workflow

This session only. Nothing lands on disk.

referencessync-policies.md

≈699 tokens on demand. Your agent reads this file only when SKILL.md points to it.

GitOps Sync Policies

ArgoCD Sync Policies

Automated Sync

syncPolicy:
  automated:
    prune: true # Delete resources removed from Git
    selfHeal: true # Reconcile manual changes
    allowEmpty: false # Prevent empty sync

Manual Sync

syncPolicy:
  syncOptions:
    - PrunePropagationPolicy=foreground
    - CreateNamespace=true

Sync Windows

syncWindows:
  - kind: allow
    schedule: "0 8 * * *"
    duration: 1h
    applications:
      - my-app
  - kind: deny
    schedule: "0 22 * * *"
    duration: 8h
    applications:
      - "*"

Retry Policy

syncPolicy:
  retry:
    limit: 5
    backoff:
      duration: 5s
      factor: 2
      maxDuration: 3m

Flux Sync Policies

Kustomization Sync

apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  name: my-app
spec:
  interval: 5m
  prune: true
  wait: true
  timeout: 5m
  retryInterval: 1m
  force: false

Source Sync Interval

apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
  name: my-app
spec:
  interval: 1m
  timeout: 60s

Health Assessment

Custom Health Checks

# ArgoCD
apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-cm
  namespace: argocd
data:
  resource.customizations.health.MyCustomResource: |
    hs = {}
    if obj.status ~= nil then
      if obj.status.conditions ~= nil then
        for i, condition in ipairs(obj.status.conditions) do
          if condition.type == "Ready" and condition.status == "False" then
            hs.status = "Degraded"
            hs.message = condition.message
            return hs
          end
          if condition.type == "Ready" and condition.status == "True" then
            hs.status = "Healthy"
            hs.message = condition.message
            return hs
          end
        end
      end
    end
    hs.status = "Progressing"
    hs.message = "Waiting for status"
    return hs

Sync Options

Common Sync Options

  • PrunePropagationPolicy=foreground - Wait for pruned resources to be deleted
  • CreateNamespace=true - Auto-create namespace
  • Validate=false - Skip kubectl validation
  • PruneLast=true - Prune resources after sync
  • RespectIgnoreDifferences=true - Honor ignore differences
  • ApplyOutOfSyncOnly=true - Only apply out-of-sync resources

Best Practices

  1. Use automated sync for non-production
  2. Require manual approval for production
  3. Configure sync windows for maintenance
  4. Implement health checks for custom resources
  5. Use selective sync for large applications
  6. Configure appropriate retry policies
  7. Monitor sync failures with alerts
  8. Use prune with caution in production
  9. Test sync policies in staging
  10. Document sync behavior for teams

Source: SKILL.md on GitHub

1 warning16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides standard installation and configuration guides for ArgoCD and Flux CD. It includes remote downloads and privileged commands that are part of the official, documented setup processes for these well-known industry tools.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    2/3 files flagged

  • ZeroLeaks5mo

    2 findings · Score: 80/100

Signed by skilld at 5684887. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 8 months ago
  • kubernetes
  • gitops
  • argocd
  • flux
  • cd
  • declarative
  • deployment
  • kustomization
  • multi-cluster

README badge

README badge for wshobson/agents/gitops-workflow

Implements GitOps workflows for Kubernetes using ArgoCD or Flux CD, with declarative application deployments that continuously reconcile desired state from Git. Covers repository structure, auto-sync policies, progressive delivery strategies like canary deployments, and secret management with External Secrets Operator or Sealed Secrets.

Generated from the current SKILL.md.

Does this skill cover both ArgoCD and Flux, or do I have to pick one?
The skill covers both ArgoCD and Flux CD. You choose which tool fits your GitOps workflow; the skill shows setup and configuration for each.
Can I use this skill for multi-cluster deployments?
Yes. The skill includes guidance for multi-cluster deployments and uses the App of Apps pattern to manage applications across clusters.
How does secret management work in this GitOps workflow?
The skill covers External Secrets Operator and Sealed Secrets to keep secrets out of Git while maintaining declarative infrastructure.
Does this skill support progressive delivery strategies like canary or blue-green deployments?
Yes. The skill includes examples of canary deployments using ArgoCD Rollouts and blue-green deployment configurations.
What happens if there's a sync failure or drift between Git and the cluster?
The skill covers troubleshooting commands (argocd app get, argocd app diff) and auto-sync policies with retry logic to handle failures and reconcile drift.

Generated from the current SKILL.md. These answers refresh after source changes.