본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

아티팩트 저장소 참조 (Artifact Repository Ref)

원문 보기 위키 갱신

v2.9 이상

여러 워크플로가 접근할 수 있는 저장소를 설정하면 템플릿의 중복을 줄일 수 있습니다. 이로써 민감한 정보를 템플릿에서 제거할 수도 있습니다.

출처: Argo Workflows 문서

본문

적합한 config map을 (a) 워크플로의 네임스페이스 또는 (b) 관리 대상 네임스페이스(managed namespace)에 만듭니다:

apiVersion: v1
kind: ConfigMap
metadata:
  # If you want to use this config map by default, name it "artifact-repositories". Otherwise, you can provide a reference to a
  # different config map in `artifactRepositoryRef.configMap`.
  name: my-artifact-repository
  annotations:
    # v3.0 and after - if you want to use a specific key, put that key into this annotation.
    workflows.argoproj.io/default-artifact-repository: default-v1-s3-artifact-repository
data:
  default-v1-s3-artifact-repository: |
    s3:
      bucket: my-bucket
      endpoint: minio:9000
      insecure: true
      accessKeySecret:
        name: my-minio-cred
        key: accesskey
      secretKeySecret:
        name: my-minio-cred
        key: secretkey
  v2-s3-artifact-repository: |
    s3:
      ...

다음과 같이 워크플로별로 아티팩트 저장소를 재정의(override)할 수 있습니다:

spec:
  artifactRepositoryRef:
    configMap: my-artifact-repository # default is "artifact-repositories"
    key: v2-s3-artifact-repository # default can be set by the `workflows.argoproj.io/default-artifact-repository` annotation in config map.

이 기능은 키 전용 아티팩트(key-only artifacts)와 함께 사용할 때 최대 효과를 발휘합니다.

참조(Reference).

더 알아보기 (Learn more)

  • 기본으로 쓰려면 config map 이름을 artifact-repositories로 지정하고, 그렇지 않으면 artifactRepositoryRef.configMap으로 참조합니다.
  • 기본 키는 어노테이션 workflows.argoproj.io/default-artifact-repository로 지정할 수 있습니다.
  • 버킷·시크릿 같은 민감한 정보를 템플릿 밖 config map으로 옮기는 것이 핵심 이점입니다.