Command Palette

Search for a command to run...

Назад к скиллам
скилл № 86659

gitops

Use when the user asks about GitOps, Flux, Git as the source of truth, drift detection, multi-environment promotion, Kustomize overlays, secrets in GitOps, or…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить gitops в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

GitOps

Purpose

Manage Kubernetes deployments using Git as the single source of truth with ArgoCD or Flux. Covers repository structure, application definitions, sync policies, environment promotion, drift detection, and secret management.

Framework and Methodology

GitOps Principles

  1. Declarative Description: The entire system is described declaratively.
  2. Version Controlled and Immutable: The desired state is stored in Git.
  3. Automatically Applied: Software agents pull changes from Git.
  4. Continuously Reconciled: Agents correct drift between desired and actual state.

Reconciliation Loop

Git (desired state) -> GitOps Controller watches repo
  -> Compares with cluster state
  -> Detects drift (manual change or config divergence)
  -> Applies desired state to cluster
  -> Reports sync status
  -> Loops continuously (default every 3-5 minutes)

Pull vs Push Model

Pull-based (GitOps native): Agent in cluster pulls from Git. Cluster initiates all changes. No external access to cluster API needed. More secure.

Push-based (CI/CD traditional): CI system pushes to cluster. Cluster API exposed to CI system. Higher blast radius (CI compromise = cluster compromise).

Recommendation: Always use pull-based for production.

Agent Protocol

Trigger

Exact user phrases: "GitOps", "ArgoCD", "Flux", "Git as source of truth", "sync policy", "drift detection", "Application CRD", "sync waves".

Input Context

  • GitOps tool (ArgoCD vs Flux).
  • Cluster access (kubeconfig, OIDC, AWS EKS).
  • Deployment structure (monorepo vs multi-repo, Kustomize vs Helm).
  • Environment promotion model (staging to prod).

Output Artifact

Application CRDs, Flux Kustomization/HelmRelease YAMLs, sync policies, directory structure.

Response Format

YAML manifests with no extraneous explanation.

No preamble. No postamble. No explanations.

Completion Criteria

  • GitOps tool configured (ArgoCD Application or Flux Kustomization).
  • Sync policy defined (auto-sync with prune, self-heal).
  • Source repository and path configured.
  • Destination cluster and namespace set.
  • Drift detection and remediation configured.

Architecture / Decision Trees

Tool Selection: ArgoCD vs Flux

Feature ArgoCD Flux
Reconciliation Every 3 min (default) Configurable interval
UI Rich web UI, SSO CLI-only (no GUI)
Sync Waves Annotations depends-on
Rollback One-click via UI git revert
Multi-cluster ApplicationSet CRD Kustomization per cluster
Secret encryption SOPS plugin SOPS native
Blue/green, canary AnalysisTemplate + Argo Rollouts None (requires Flagger)
SSO Built-in (OIDC, Dex, GitHub, GitLab) Dex/External
RBAC Project-level, fine-grained K8s RBAC
Weight Medium (CRD-heavy) Lightweight
Community Large, CNCF graduated Large, CNCF graduated
Learning curve Moderate Lower

Repository Structure Decision Tree

  • Monorepo (single repo for all environments): Recommended for most teams.
    • base/ (common config shared across environments)
    • overlays/dev/, overlays/staging/, overlays/prod/ (env-specific)
  • Multi-repo (separate repo per environment): Stronger isolation, more management overhead.
    • infra-dev/, infra-prod/
  • App config + app source in same repo: Simple, but couples CI/CD.
  • App config separate from app source: Recommended. GitOps repo only has deployment config.

Environment Promotion Strategy

Method Description Best For
Branch per env dev branch = dev cluster, main = prod Simple, clear separation
Path per env Single branch, overlays/dev = dev cluster Kustomize native
Tag-based Git tag triggers promotion to next env Release engineering
PR-based PR merges promote between environments Review-driven

Secret Management Decision Tree

  • External Secrets Operator + cloud provider (AWS Secrets Manager, GCP Secret Manager): Best for cloud-native, syncs secrets automatically.
  • SealedSecrets: Encrypt secrets in Git, decrypt at cluster. Good for offline GitOps.
  • SOPS: Encrypt individual fields in YAML. Works with ArgoCD and Flux. Flexible but manual.
  • Vault (HashiCorp): Full secret management, dynamic secrets, rotation. Complex setup.

Core Workflow

Step 1: Repository Structure (Kustomize)

infra-repo/
  base/
    kustomization.yaml
    deployment.yaml
    service.yaml
    ingress.yaml
    configmap.yaml
  overlays/
    dev/
      kustomization.yaml
      deployment-patch.yaml
      configmap-dev.yaml
    staging/
      kustomization.yaml
      deployment-patch.yaml
      configmap-staging.yaml
    prod/
      kustomization.yaml
      deployment-patch.yaml
      configmap-prod.yaml
      hpa.yaml

Step 2: ArgoCD Application

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-app-dev
  namespace: argocd
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  project: default
  sour
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/argocd-architecture.md
  • references/argocd-setup.md
  • references/flux-setup.md
  • references/gitops-advanced.md
  • references/gitops-fundamentals.md
  • references/gitops-principles.md
  • references/gitops-security.md
  • references/merged-cloud-native-argocd-reconciliation.md
  • references/merged-cloud-native-gitops-workflows.md
  • references/progressive-delivery-flagger.md
  • references/secrets-management-eso.md
  • references/sync-strategies.md

FAQ

Что делает скилл gitops?

Use when the user asks about GitOps, Flux, Git as the source of truth, drift detection, multi-environment promotion, Kustomize overlays, secrets in GitOps, or how to sync cluster state from git with Argo CD or Flux. Produces GitOps repo layouts and promotion flows. Not for Argo CD specifics (use argo-cd) or ApplicationSets at scale (use devops-gitops-advanced).

Как установить скилл gitops?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл gitops запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить gitops с