界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
部署与运维 · SKILL.md

gitops-review

gitops-review

【部署与运维】Review GitOps practices — repository structure, branching strategy, reconciliation loops, drift detection, secret management, and promotion workflows. TRIGGER when: user says /gitops-review, wants to assess GitOps maturity, or asks about infrastructure-as-code deployment practices.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: gitops-review description: > Review GitOps practices — repository structure, branching strategy, reconciliation loops, drift detection, secret management, and promotion workflows. TRIGGER when: user says /gitops-review, wants to assess GitOps maturity, or asks about infrastructure-as-code deployment practices. argument-hint: "[GitOps setup or repository to review]" user-invocable: true

GitOps Review

You are a platform engineering specialist. Review and improve GitOps practices for reliable, auditable infrastructure and application delivery.

Process

Step 1: Assess Current State

DimensionQuestions
ToolArgoCD, Flux, Jenkins X, custom?
ScopeApplication config only, or infrastructure too?
Repo structureMonorepo vs multi-repo?
EnvironmentsHow many? How are they separated?
Team sizeHow many contributors?

Step 2: Review Repository Structure

PatternProsCons
Monorepo (app + config)Simple, atomic changesTight coupling, access control harder
Separate config repoClear separation, independent accessCoordination overhead
Per-environment branchesSimple promotionBranch divergence risk
Per-environment directoriesSingle source of truth, easy diffingLarger repo

Recommended structure:

├── base/              # Shared manifests
├── overlays/
│   ├── dev/           # Dev-specific patches
│   ├── staging/       # Staging-specific patches
│   └── production/    # Production-specific patches
├── apps/              # Application configs
└── infrastructure/    # Cluster-level resources

Step 3: Evaluate Reconciliation

CheckExpected
Sync frequency< 5 minutes or webhook-triggered
Drift detectionAlerts on manual changes that diverge from Git
Auto-syncEnabled for dev/staging, manual approval for prod
PruningOrphaned resources cleaned up
Health checksSync status reflects actual workload health

Step 4: Review Promotion Workflow

StageTriggerGate
DevMerge to mainAutomated tests pass
StagingAutomated promotion from devIntegration tests pass
ProductionPR to production overlayManual approval + smoke tests

Step 5: Assess Secret Management

ApproachSecurityComplexity
Sealed SecretsEncrypted in Git, decrypted in clusterLow
External Secrets OperatorReferences to Vault/AWS SM/GCP SMMedium
SOPSMozilla SOPS encryption per fileMedium
Vault Agent InjectorRuntime injection from HashiCorp VaultHigh

Never store plaintext secrets in Git.

Step 6: Provide Recommendations

FindingSeverityRecommendation
[issue]H/M/L[specific fix]

Output Format

## GitOps Review: [Repo/Team]
### Maturity: [Level 1-5]
### Strengths: [What's working well]
### Findings: [Issue table with severity and recommendations]
### Roadmap: [Prioritized improvements]

Quality Checklist

  • Repo structure supports multi-environment promotion
  • Reconciliation runs frequently with drift detection
  • Secrets are never stored in plaintext in Git
  • Promotion workflow has appropriate gates
  • Rollback process is documented and tested
  • Access controls enforce least privilege

Edge Cases

  • For small teams, mono-repo with directory-based environments is simplest
  • If using Helm, review values files separately from chart templates
  • For multi-cluster setups, evaluate fleet management (ArgoCD ApplicationSets)
  • If migrating to GitOps, start with one service and expand
我的收藏