Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

KJH

ArgoCD App of Apps 본문

DevOps

ArgoCD App of Apps

모이스쳐라이징 2025. 5. 2. 02:04

App of Apps 패턴은 ArgoCD에서 여러 애플리케이션을 계층적으로 관리할 수 있는 구조이다.

루트 폴더에 Application.yaml들의 집합체로 구성이 되어 있다.

 

gitops-repo에 apps 폴더가 있어야 한다.

# 루트 애플리케이션 예시
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: root-app
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/your-org/gitops-repo.git
    targetRevision: HEAD
    path: apps
  destination:
    server: https://kubernetes.default.svc
    namespace: argocd
  syncPolicy:
    automated: {}

 

 

apps 폴더 아래에는 여러 Application yaml을 배치한다.

gitops-repo/
├── apps
│   ├── bookinfo.yaml
│   ├── istio-base.yaml
│   ├── istio-egressgateway.yaml
│   ├── istio-ingressgateway.yaml
│   ├── istio-resources.yaml
│   ├── istiod-1-24-3.yaml
│   └── todo-api.yaml

 

실무에선 apps를 cluster 단위로 분리할 수 있다.

gitops-repo/
├── clusters/
│   ├── dev/
│   │   └── apps/
│   │       ├── app1.yaml
│   │       └── app2.yaml
│   ├── staging/
│   │   └── apps/
│   │       ├── app1.yaml
│   │       └── app2.yaml
│   └── prod/
│       └── apps/
│           ├── app1.yaml
│           └── app2.yaml

 

argoCD에선 하나의 Application yaml로 여러 Applcation을 손쉽게 배포할 수 있다.

 

 

※ 참고 bookinfo.yaml

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: bookinfo
  namespace: argocd
spec:
  project: dev
  source:
    repoURL: https://github.com/your-org/gitops-repo.git
    targetRevision: test
    path: charts/python-1.0.0
    helm:
      releaseName: bookinfo
      valueFiles:
        - dev-values.yaml
  destination:
    name: dev
    namespace: bookinfo
  syncPolicy:
    automated:
      prune: false
      selfHeal: true
    syncOptions:
      - CreateNamespace=true

'DevOps' 카테고리의 다른 글

GPU Exporter (/w windows)  (0) 2025.04.21
Jmeter websocket 테스트 (/w nginx)  (0) 2025.04.18
Github 특정 Tag를 Fork하기  (0) 2025.04.16
Terraform GitOps(/w Atlantis)  (0) 2025.04.13
Nginx Ingress Controller OCSP 설정  (0) 2025.04.13