2.5.4. 예: 환경 라벨과 진행 중인 동기화


다음 예제에서는 환경 라벨을 사용하여 애플리케이션을 점진적으로 동기화하는 방법을 보여줍니다.

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: cluster-apps
  namespace: openshift-gitops
spec:
  strategy:
    type: RollingSync
    rollingSync:
      steps:
        - matchExpressions:
            - key: envLabel
              operator: In
              values:
                - env-dev
        - matchExpressions:
            - key: envLabel
              operator: In
              values:
                - env-prod
          maxUpdate: 10%
  generators:
    - list:
        elements:
          - cluster: dev-cluster
            url: https://dev-cluster.example.com
            envLabel: env-dev
          - cluster: prod-cluster
            url: https://prod-cluster.example.com
            envLabel: env-prod
  template:
    metadata:
      name: '{{cluster}}-app'
      labels:
        envLabel: '{{envLabel}}'
    spec:
      project: default
      source:
        repoURL: https://github.com/example/repo.git
        targetRevision: HEAD
        path: apps
      destination:
        server: '{{url}}'
        namespace: default

이 예제에서는 다음을 수행합니다.

  • 1단계는 envLabel: env-dev 레이블을 사용하여 애플리케이션을 업데이트합니다.
  • 2단계는 envLabel: env-prod 레이블로 애플리케이션을 업데이트하고, 최대 10%의 프로덕션 애플리케이션이 동시에 업데이트됩니다.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동