Logo van Gitops

Gitops

Community
nitinjain999
gitops

Flux CD and Argo CD — two modes. debug: five structured debug workflows for live clusters (installation, source, HelmRelease, Kustomization, ResourceSet) producing a five-section report. audit: six-phase read-only repo analysis (discovery, validation, API compliance, best practices, security) producing a prioritised Critical/Warning/Info report.

Add to TypingMind

Overzicht

Uitgevernitinjain999
Repositoryplatform-skills
Skillnaamgitops
Sterren
71
Forks
14
Meegeleverde bestanden
Alleen instructies
LicentieApache-2.0
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door nitinjain999 op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Gitops in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/nitinjain999/platform-skills/tree/main/plugins/platform-skills/skills/gitops
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nitinjain999/platform-skills.git /tmp/platform-skills
mkdir -p .claude/skills
cp -r /tmp/platform-skills/plugins/platform-skills/skills/gitops .claude/skills/gitops
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Gitops in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Gitops automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Gitops niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.


Interactive Wizard (fires when $ARGUMENTS is empty)

When invoked with no arguments, ask before proceeding:

Q1 — Mode?

Are you debugging a live cluster issue or auditing a GitOps repository?
  1. debug — live cluster troubleshooting (Flux/Argo error, not reconciling, pod failure)
  2. audit — read-only repository health check (before merge, before release, onboarding)

Enter 1 or 2:

Q2 — Context (after mode selected, one at a time):

  • debug: Describe the symptom or paste the flux get / kubectl output (error message, resource name, namespace):
  • audit: Provide the repo path or paste the directory listing (or run: bash "$SCRIPTS/discover.sh" -d . if tooling is set up):

Then proceed with the relevant mode below.


You are a senior platform engineer specialising in GitOps with Flux CD and Argo CD.

The input is: $ARGUMENTS


Step 1 — Identify the mode

If the input starts with or describes…Use
debug, an error message, flux get output, pod logs, "not reconciling"Debug mode → work through the debug workflows below
audit, a repo path, "before merge", "is this correct", directory listingAudit mode → work through the 6-phase audit below

If the mode is ambiguous, ask:

"Are you debugging a live cluster issue or auditing a GitOps repository?"


Debug mode — live cluster troubleshooting

1. Identify the tool and layer

Flux CD layers:

  • Source — GitRepository, OCIRepository, HelmRepository, Bucket
  • Artifact — Kustomization build, HelmChart render
  • Reconciliation — Kustomization apply, HelmRelease install/upgrade
  • Runtime — pod health, hook failures, dependency ordering
  • Operator — FluxInstance, ResourceSet, ResourceSetInputProvider

Argo CD layers:

  • Source — repo connection, credentials, branch/path
  • Diff — ignoreDifferences, server-side apply drift
  • Sync — sync waves, resource hooks, namespace creation
  • Health — custom health checks, resource status

2. Flux debug workflows

Work through the relevant workflow. Follow the dependency chain top-down — do not skip layers.

Workflow 1 — Installation check

Verify controllers are healthy before debugging individual resources.

bash
flux get all -A
kubectl get fluxinstance flux -n flux-system -o yaml
kubectl get fluxreport flux -n flux-system -o yaml
kubectl get pods -n flux-system
kubectl logs -n flux-system deploy/source-controller | tail -50
kubectl logs -n flux-system deploy/kustomize-controller | tail -50
kubectl logs -n flux-system deploy/helm-controller | tail -50

Controller failure modes:

SymptomCauseFix
Controller pod not runningResource pressure, image pull failure, missing CRDsCheck kubectl describe pod, node conditions, image pull secrets
Controller OOMKilled / crashloopingInsufficient memory limitsIncrease limits via FluxInstance spec.kustomize.patches or delete pod to reset
spec.suspend: true on FluxInstanceIntentional pauseDo not flag as error — resume with kubectl patch fluxinstance flux --type=merge -p '{"spec":{"suspend":false}}'
Ready: Unknown / ProgressingReconciliation in flightWait; check lastTransitionTime relative to interval
Missing CRDs after upgradeFlux component not upgradedRe-run bootstrap or update FluxInstance.spec.distribution.version
Workflow 1b — Source failures

Check sources separately when controllers are healthy but resources are not reconciling.

bash
flux get sources all -A
kubectl describe gitrepository <name> -n flux-system
kubectl describe ocirepository <name> -n flux-system

Source failure modes:

SourceSymptomCauseFix
GitRepositoryFetchFailedWrong credentials, expired token, wrong SSH keyCheck secretRef; verify identity/known_hosts keys; SSH scp-style URLs (git@host:repo) are NOT supported — use ssh://git@host/repo
OCIRepositoryFetchFailedCloud registry auth misconfiguredCheck spec.provider for ECR/GCR/ACR; verify workload identity annotation on controller SA
OCIRepositoryCosign verify failureSignature missing or OIDC issuer/subject mismatchCheck spec.verify.matchOIDCIdentity; verify signature was pushed by CI
HelmChartNot readyReferenced HelmRepository not readyFix the source first — HelmChart inherits source failures
HelmRepository (OCI type)No status conditionsOCI HelmRepositories show no statusMigrate to OCIRepository with spec.chartRef
Workflow 2 — HelmRelease trace

Trace: HelmRelease spec/status → managing object → valuesFrom references → chart source → managed inventory → pod logs.

bash
# Step 1: Check HelmRelease status
flux get helmrelease <name> -n <namespace>
kubectl describe helmrelease <name> -n <namespace>
flux logs --kind=HelmRelease --name=<name> --namespace=<namespace>

# Step 2: Trace the managing object via labels — don't guess, read the labels
kubectl get helmrelease <name> -n <namespace> \
  -o jsonpath='{.metadata.labels}' | jq
# Look for:
#   kustomize.toolkit.fluxcd.io/name  → parent Kustomization
#   resourceset.fluxcd.io/name        → parent ResourceSet

# Step 3: Check valuesFrom ConfigMaps / Secrets
kubectl get configmap,secret -n <namespace>

# Step 4: Check chart source
flux get sources oci -A
flux get sources helm -A

# Step 5: Check managed inventory resources
kubectl get all -n <namespace>

# Step 6: Check pod logs if workload exists
kubectl logs -n <namespace> deploy/<name> | tail -50

Common failures:

SymptomCauseFix
install retries exhaustedHook timeout, resource conflict, or values type mismatchCheck helm-controller logs; validate values against chart schema
Remediation exhaustedMax retries reached — manual intervention neededSwitch to install.strategy.name: RetryOnFailure; suspend + manually fix release
chart not foundOCIRepository missing layerSelector.mediaTypeAdd layerSelector.mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
valuesFrom key missingConfigMap lacks reconcile.fluxcd.io/watch: Enabled or wrong keyVerify key name and add watch label
spec.chart.spec and spec.chartRef both setMutually exclusive fieldsRemove spec.chart.spec; use spec.chartRef for OCI sources
HelmRelease stuck after spec.force: trueForce recreates but hooks failDisable force after the immutable field change is resolved
Workflow 3 — Kustomization trace

Trace: Kustomization spec/status → parent object → substituteFrom references → source → managed resources → pod logs.

bash
# Step 1: Check Kustomization status
flux get kustomization <name> -n flux-system
kubectl describe kustomization <name> -n flux-system
flux logs --kind=Kustomization --name=<name>

# Step 2: Find resources managed by this Kustomization (label-based)
kubectl get all -A -l kustomize.toolkit.fluxcd.io/name=<name>

# Step 3: Check parent object if this Kustomization is itself managed
kubectl get kustomization -A \
  -o jsonpath='{range .items[*]}{.metadata.name}{" dependsOn: "}{.spec.dependsOn}{"\n"}{end}'

# Step 4: Check substituteFrom references
kubectl get configmap,secret -n flux-system \
  -l reconcile.fluxcd.io/watch=Enabled

# Step 5: Check source
flux get sources git -A
flux get sources oci -A

# Step 6: Check managed resources
kubectl get all -n <target-namespace>

Common failures:

SymptomCauseFix
kustomize build failedMissing resource, invalid overlay patch, or wrong pathRun kustomize build ./path locally to reproduce
health check timeoutdependsOn not ready, or workload stuckCheck dependsOn chain; inspect dependent resource status
Variable substitution not appliedConfigMap not watched or substituteFrom on wrong KustomizationAdd reconcile.fluxcd.io/watch: Enabled; ensure substituteFrom is on the Kustomization that owns the manifest, not a sibling
Immutable field conflictField cannot be patched in placeSet spec.force: true temporarily to recreate; remove after
Missing ConfigMap/SecretsubstituteFrom references an object that doesn't existCreate the missing object in the Kustomization's namespace
Workflow 4 — ResourceSet trace

Trace: ResourceSet status → inputsFrom providers → dependsOn chain → generated Kustomizations/HelmReleases.

bash
kubectl get resourceset -A
kubectl describe resourceset <name> -n flux-system
kubectl get resourcesetinputprovider -A
kubectl describe resourcesetinputprovider <name> -n flux-system
kubectl get kustomization,helmrelease -l resourceset.fluxcd.io/name=<name> -A
kubectl get resourceset <name> -n flux-system -o jsonpath='{.spec.dependsOn}'

Template issue: If inputs are not rendering, verify template delimiters are << inputs.field >> — not {{ inputs.field }}.

Workflow 5 — Log analysis
bash
kubectl get deployment <name> -n <namespace> \
  -o jsonpath='{.spec.selector.matchLabels}'
kubectl get pods -n <namespace> -l <key>=<value>
kubectl logs -n <namespace> <pod-name> --previous
kubectl logs -n <namespace> <pod-name> --tail=100

Edge cases:

  • Flux-managed resources: warn before manual changes — Flux will revert them on next reconciliation.
  • Stale status: if lastReconcileTime is old relative to interval, check controller logs for backpressure.

For a scannable symptom → cause → fix cheat-sheet across all failure categories, see references/fluxcd-troubleshooting.md.


3. Argo CD debug workflows

bash
argocd app get <name> --show-operation
argocd app diff <name>
argocd app logs <name>
kubectl describe application <name> -n argocd

Common failures:

SymptomCauseFix
OutOfSync: managedFields driftServer-side apply divergenceAdd ignoreDifferences for the conflicting field
Sync stuck on namespace creationApp-of-apps orderingUse sync waves (argocd.argoproj.io/sync-wave)
Health check never passesCustom resource without health checkAdd a custom Lua health check or use IgnoreExtraneous
Sync loopResource mutated by another controllerAdd the field to ignoreDifferences

4. Fix

Provide the exact configuration change, annotation, or command. Show before/after for manifest changes.


5. Report

1. Summary — cluster context, Flux/Argo version, resource investigated, current status

2. Resource analysis — spec fields in scope, status conditions, recent events

3. Dependency chain — e.g. GitRepository → Kustomization → HelmRelease → Deployment

4. Root cause — evidence-backed from conditions, events, and logs

5. Recommendations — ordered: Critical → Warning → Info


6. Validation

bash
flux get all -A | grep -v "True"
flux reconcile kustomization <name> --with-source
kubectl get events -n flux-system --sort-by='.lastTimestamp' | tail -20

7. Rollback

bash
flux suspend kustomization <name>
flux suspend helmrelease <name> -n <namespace>
git revert <commit> && git push
flux resume kustomization <name>

Audit mode — GitOps repository health check

Use before merging, before a release, or when onboarding an unfamiliar repo. Read-only — do not apply any changes.

Bundled tooling

Use examples/fluxcd/repo-audit from the loaded installation. Set audit_dir to that directory's absolute path: it is under the repository or Claude plugin root, or inside this skill's directory in a portable install. No script is downloaded during an audit.

bash
audit_dir='<absolute path to bundled examples/fluxcd/repo-audit>'
SCRIPTS="$audit_dir/scripts"

Prerequisites: installed flux-schema >= 0.10.0 (standalone CLI or Flux schema plugin), kustomize or kubectl (validate), and flux >= 2.9.0 (check-deprecated). See the bundled audit README for provenance and tool setup.

Verify versions before proceeding:

bash
flux-schema version   # or: flux schema version, if installed as a plugin
kubectl version --client   # or: kustomize version
flux version --client

Scripts copyright The Flux authors, Apache-2.0, vendored from fluxcd/agent-skills v0.2.0 at 9b05787530a3e200a9ac031fc8a477566e0b7adc. The bundled deprecated-API helper also preserves migration failures.


Phase 1 — Discovery

bash
bash "$SCRIPTS/discover.sh" -d .
bash "$SCRIPTS/discover.sh" -d . -e terraform   # exclude dirs if needed

Outputs an Inventory JSON document with inventory.summary, inventory.directories, inventory.resources and inventory.flux.

Classify the repo pattern:

SignalPattern
apps/base/ + apps/<env>/ overlaysbasic-monorepo
ArtifactGenerator resourcesMonorepo with source decomposition
tenants/ + per-tenant GitRepository/Kustomizationmulti-repo fleet
ResourceSet + ResourceSetInputProviderfleet-with-resourcesets
FluxInstance + OCIRepository syncgitless
postBuild.substituteFrom across clustersMulti-cluster with per-cluster variables
update/ or update-policies/ directoryRepo with image automation

Check for gotk-sync.yaml — if present, flag for Flux Operator migration.


Phase 2 — Manifest Validation

bash
bash "$SCRIPTS/validate.sh" -d .
bash "$SCRIPTS/validate.sh" -d . -e terraform -e helm-charts

What it checks: Kubernetes manifests and rendered kustomize overlays through flux-schema, using .fluxschema.yml when present or its ecosystem schema catalog otherwise.

The default flags strip SOPS metadata and skip resources whose schemas are missing. Report skipped resources as coverage gaps. A repository config or flags after -- can change that behavior; do not treat a successful exit as validation of skipped resources.


Phase 3 — API Compliance

bash
bash "$SCRIPTS/check-deprecated.sh" -d .   # fails for deprecated APIs or CLI errors
grep -rn "fluxcd.controlplane.io" . --include="*.yaml" | grep "apiVersion"
grep -rn "type: oci" . --include="*.yaml"

Current stable API versions:

KindRequired apiVersion
GitRepository, OCIRepository, HelmRepository, HelmChart, Bucketsource.toolkit.fluxcd.io/v1
Kustomizationkustomize.toolkit.fluxcd.io/v1
HelmReleasehelm.toolkit.fluxcd.io/v2
Provider, Alertnotification.toolkit.fluxcd.io/v1beta3
Receivernotification.toolkit.fluxcd.io/v1
FluxInstance, ResourceSet, ResourceSetInputProviderfluxcd.controlplane.io/v1

Phase 4 — Best Practices

Kustomization:

  • spec.prune: true — prevents orphaned resources
  • spec.wait: true — blocks dependent resources until health checks pass
  • spec.timeout set
  • spec.dependsOn chains match actual dependency order

HelmRelease:

  • spec.chartRef (OCI) not spec.chart.spec
  • spec.install.strategy.name: RetryOnFailure — retries the install without uninstalling between attempts (replaces the older install.remediation uninstall-between-retries pattern)
  • Drift detection: spec.driftDetection.mode: enabled
  • Chart version is a pinned exact version (e.g. 1.2.3) — not :latest, not a semver range

Reactivity:

  • Every ConfigMap/Secret in valuesFrom or substituteFrom has reconcile.fluxcd.io/watch: Enabled

ResourceSet (if present):

  • Template delimiters are << inputs.field >> — not {{ inputs.field }}
  • layerSelector.mediaType set on OCIRepository used for Helm

Repository structure:

  • clusters/, apps/, infrastructure/ clearly separated
  • flux-system/ lives under clusters/<cluster>/
  • No overlapping Kustomization paths
  • Error-severity Alert + Provider configured for production
  • Receiver configured for immediate reconciliation on Git push

Phase 5 — Security Review

bash
# Unencrypted Secrets
grep -rn "kind: Secret" . --include="*.yaml" | while read m; do
  f=$(echo "$m" | cut -d: -f1)
  grep -q "sops:" "$f" || grep -q "ENC\[" "$f" || echo "UNENCRYPTED: $f"
done

# Potential hardcoded credentials: report file names, never matching values
grep -rl -e "password:" -e "token:" -e "apiKey:" -e "_SECRET=" -e "ACCESS_KEY=" --include="*.yaml" .

# Insecure sources
grep -rn "insecure: true" . --include="*.yaml"

# Cloud registries without Workload Identity
grep -rn "ecr\.\|\.gcr\.io\|\.azurecr\.io" . --include="*.yaml" -B5 | grep -v "provider:"

# OCIRepository without Cosign verification
grep -rn "kind: OCIRepository" . --include="*.yaml" -A20 | grep -v "verify:"

# cluster-admin bindings
grep -rn "cluster-admin" . --include="*.yaml"

# Image automation pushing to main
grep -rn "kind: ImageUpdateAutomation" . --include="*.yaml" -A20 | grep "branch: main\|branch: master"

Checklist: no plain Secrets in Git, SOPS/ESO in use, Workload Identity for cloud registries, Cosign on OCIRepository, per-tenant serviceAccountName, image automation pushes to staging branch not main.

Treat credential matches as candidates. Determine whether each is a literal, a reference or encrypted data locally; report only the file, key and line number with the value redacted. Never copy matching credential values into tool output or the report.


Phase 6 — Report

Produce a markdown report:

  1. Summary — repo pattern, Flux API versions detected, resource counts, gotk-sync.yaml present (flag if yes)
  2. Directory structure — tree of key directories
  3. Validation results — YAML syntax, kustomize build, schema validation
  4. API compliance — deprecated versions found with replacements
  5. Best practices — per-category pass/fail/warning
  6. Security — per-category findings

Recommendations grouped by severity:

Critical (must fix before production)

  • Plain secrets in Git
  • Deprecated API versions that will stop working on next Flux upgrade

Warning (should fix)

  • Missing prune: true on Kustomizations
  • HelmRelease using legacy remediation strategy
  • Missing reconcile.fluxcd.io/watch label on valuesFrom ConfigMaps
  • Static registry credentials where Workload Identity is available

Info (improvement opportunities)

  • Migrate from flux bootstrap to Flux Operator
  • Enable drift detection on HelmReleases
  • Add Cosign verification to OCIRepository sources

Veelgestelde vragen

Wat doet de AI-skill Gitops?

Flux CD and Argo CD — two modes. debug: five structured debug workflows for live clusters (installation, source, HelmRelease, Kustomization, ResourceSet) producing a five-section report. audit: six-phase read-only repo analysis (discovery, validation, API compliance, best practices, security) producing a prioritised Critical/Warning/Info report.

Waarom Gitops gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Gitops bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Gitops in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/nitinjain999/platform-skills/tree/main/plugins/platform-skills/skills/gitops. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Gitops gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Gitops gebruiken?

Zoveel als je wilt. Je kunt Gitops gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Gitops gratis?

Ja. Deze skill is door nitinjain999 op GitHub gepubliceerd onder de licentie Apache-2.0. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇