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

커스텀 템플릿 변수 참조 (Custom Template Variable Reference)

원문 보기 위키 갱신

Argo의 허용된 접두사로 시작하지 않는 변수는 검증 없이 그대로 템플릿 언어에 전달돼요. Jinja 같은 다른 템플릿 언어의 변수 참조를 함께 쓰는 방법을 살펴봐요.

출처: Argo Workflows 문서

본문

이 예제에서는 Argo 워크플로우 템플릿 안에서 다른 템플릿 언어의 변수 참조(예: Jinja)를 활용하는 방법을 볼 수 있어요. Argo는 Argo 허용 접두사 {"item", "steps", "inputs", "outputs", "workflow", "tasks"} 로 시작하는 변수만 검증하고 해석해요.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: custom-template-variable-
spec:
  entrypoint: hello-hello-hello

  templates:
    - name: hello-hello-hello
      steps:
        - - name: hello1
            template: print-message
            arguments:
              parameters: [{name: message, value: "hello1"}]
        - - name: hello2a
            template: print-message
            arguments:
              parameters: [{name: message, value: "hello2a"}]
          - name: hello2b
            template: print-message
            arguments:
              parameters: [{name: message, value: "hello2b"}]

    - name: print-message
      inputs:
        parameters:
          - name: message
      container:
        image: busybox
        command: [echo]
        args: ["{{user.username}}"]

더 알아보기 (Learn more)