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

하드와이어드 아티팩트 (Hardwired Artifacts)

원문 보기 위키 갱신

어떤 컨테이너 이미지로도 아무 종류의 아티팩트나 만들 수 있지만, 실전에서 자주 쓰이는 아티팩트 유형은 기본 지원이 준비돼 있어요. git, HTTP, GCS, S3 아티팩트를 선언만으로 가져오는 방법을 살펴봐요.

출처: Argo Workflows 문서

본문

어떤 컨테이너 이미지를 쓰든 어떤 종류의 아티팩트든 생성할 수 있어요. 다만 실전에서는 특정 유형의 아티팩트가 매우 자주 쓰이기 때문에 git, HTTP, GCS, S3 아티팩트에는 기본 제공 지원이 마련돼 있어요.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: hardwired-artifact-
spec:
  entrypoint: hardwired-artifact
  templates:
  - name: hardwired-artifact
    inputs:
      artifacts:
      # Check out the main branch of the argo repo and place it at /src
      # revision can be anything that git checkout accepts: branch, commit, tag, etc.
      - name: argo-source
        path: /src
        git:
          repo: https://github.com/argoproj/argo-workflows.git
          revision: "main"
      # Download kubectl 1.8.0 and place it at /bin/kubectl
      - name: kubectl
        path: /bin/kubectl
        mode: 0755
        http:
          url: https://storage.googleapis.com/kubernetes-release/release/v1.8.0/bin/linux/amd64/kubectl
      # Copy an s3 compatible artifact repository bucket (such as AWS, GCS and MinIO) and place it at /s3
      - name: objects
        path: /s3
        s3:
          endpoint: storage.googleapis.com
          bucket: my-bucket-name
          key: path/in/bucket
          accessKeySecret:
            name: my-s3-credentials
            key: accessKey
          secretKeySecret:
            name: my-s3-credentials
            key: secretKey
    container:
      image: debian
      command: [sh, -c]
      args: ["ls -l /src /bin/kubectl /s3"]

더 알아보기 (Learn more)