Skillpedia
النشر والسحابة (DevOps)48k · #4755

gitops-workflow

ما الذي تفعله

تساعد هذه المهارة على إعداد نظام يُسمى GitOps لإدارة عمليات نشر البرمجيات في بيئات Kubernetes. تؤتمت تحديث التطبيقات باستخدام Git كمصدر أساسي للحقيقة.

متى تستخدمها

  • ✓إعداد GitOps لأول مرة في عنقود Kubernetes.
  • ✓أتمتة نشر إصدارات جديدة من التطبيق من مستودع Git.
  • ✓إدارة كيفية تحديث التطبيقات تدريجياً أو على مراحل.

رابط المهارة

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/gitops-workflow/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/gitops-workflow/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“أعدّ GitOps لعنقود Kubernetes الخاص بي باستخدام ArgoCD، وأتمتة نشر تطبيقي من مستودع GitHub «my-repo».”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يراقب النظام مستودع Git الذي يحتوي على إعدادات تطبيقك. وعندما تحدّث Git، يكتشف النظام التغيير ويطبّق التحديثات تلقائياً على عنقود Kubernetes.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

GitOps Workflow

Complete guide to implementing GitOps workflows with ArgoCD and Flux for automated Kubernetes deployments.

Purpose

Implement declarative, Git-based continuous delivery for Kubernetes using ArgoCD or Flux CD, following OpenGitOps principles.

Use this skill when

  • Set up GitOps for Kubernetes clusters
  • Automate application deployments from Git
  • Implement progressive delivery strategies
  • Manage multi-cluster deployments
  • Configure automated sync policies
  • Set up secret management in GitOps

Do not use this skill when

  • You need a one-off manual deployment
  • You cannot manage cluster access or repo permissions
  • You are not deploying to Kubernetes

Instructions

  1. Define repo layout and desired-state conventions.
  2. Install ArgoCD or Flux and connect clusters.
  3. Configure sync policies, environments, and promotion flow.
  4. Validate rollbacks and secret handling.

Safety

  • Avoid auto-sync to production without approvals.
  • Keep secrets out of Git and use sealed or external secret managers.

OpenGitOps Principles

  1. Declarative - Entire system described declaratively
  2. Versioned and Immutable - Desired state stored in Git
  3. Pulled Automatically - Software agents pull desired state
  4. Continuously Reconciled - Agents reconcile actual vs desired state

ArgoCD Setup

1. Installation

# Create namespace
kubectl create namespace argocd

# Install ArgoCD
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

# Get admin password
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d

Reference: See references/argocd-setup.md for detailed setup

2. Repository Structure

gitops-repo/
├── apps/
│   ├── production/
│   │   ├── app1/
│   │   │   ├── kustomization.yaml
│   │   │   └── deployment.yaml
│   │   └── app2/
│   └── staging/
├── infrastructure/
│   ├── ingress-nginx/
│   ├── cert-manager/
│   └── monitoring/
└── argocd/
    ├── applications/
    └── projects/

3. Create Application

# argocd/applications/my-app.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-app
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/org/gitops-repo
    targetRevision: main
    path: apps/production/my-app
  destination:
    server: https://kubernetes.default.svc
    namespace: production
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
    - CreateNamespace=true

4. App of Apps Pattern

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: applications
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/org/gitops-repo
    targetRevision: main
    path: argocd/applications
  destination:
    server: https://kubernetes.default.svc
    namespace: argocd
  syncPolicy:
    automated: {}

Flux CD Setup

1. Installation

# Install Flux CLI
brew install fluxcd/tap/flux

# Alternative: download the official installer, inspect it, then execute it
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
curl -fsSLo "$tmpdir/flux-install.sh" https://fluxcd.io/install.sh
cat "$tmpdir/flux-install.sh"  # review the full installer before sudo
sudo bash "$tmpdir/flux-install.sh"

# Bootstrap Flux
flux bootstrap github \
  --owner=org \
  --repository=gitops-repo \
  --branch=main \
  --path=clusters/production \
  --personal

2. Create GitRepository

apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
  name: my-app
  namespace: flux-system
spec:
  interval: 1m
  url: https://github.com/org/my-app
  ref:
    branch: main

3. Create Kustomization

apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  name: my-app
  namespace: flux-system
spec:
  interval: 5m
  path: ./deploy
  prune: true
  sourceRef:
    kind: GitRepository
    name: my-app

Sync Policies

Auto-Sync Configuration

ArgoCD:

syncPolicy:
  automated:
    prune: true      # Delete resources not in Git
    selfHeal: true   # Reconcile manual changes
    allowEmpty: false
  retry:
    limit: 5
    backoff:
      duration: 5s
      factor: 2
      maxDuration: 3m

Flux:

spec:
  interval: 1m
  prune: true
  wait: true
  timeout: 5m

Reference: See references/sync-policies.md

…

الأسئلة الشائعة

ما هو GitOps؟

هو طريقة لإدارة البنية التحتية والتطبيقات باستخدام Git. يُوصف كل شيء في ملفات تعريفية وتُخزَّن في Git، ويطبّق وكيل في بيئتك هذه الإعدادات تلقائياً.

ما هما ArgoCD وFlux؟

ArgoCD وFlux أداتان شائعتان تساعدان على تطبيق GitOps. تراقبان مستودع Git وتضمنان تطابق البيئة (مثل Kubernetes) مع ما هو معرّف في Git.

كيف أدير الأسرار (كلمات المرور والمفاتيح) مع GitOps؟

من الضروري عدم وضع الأسرار مباشرة في Git. تُستخدم أدوات مثل «External Secrets» أو «Sealed Secrets» لتشفير الأسرار أو إدارتها بأمان خارج المستودع الرئيسي.

التفاصيل

الوصف الأصلي من المؤلف

Complete guide to implementing GitOps workflows with ArgoCD and Flux for automated Kubernetes deployments.

repo: sickn33/agentic-awesome-skills

الشعبية

نجوم GitHub
48k
الترتيب
#4755
الترخيص
MIT
آخر تحديث
15‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة