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

일시 중단 (Suspending)

원문 보기 위키 갱신

워크플로우는 CLI로도, suspend 스텝으로도 일시 중단할 수 있어요. 승인 대기나 지연 삽입 같은 패턴을 만드는 방법을 살펴봐요.

출처: Argo Workflows 문서

본문

워크플로우는 다음 명령으로 일시 중단할 수 있어요

argo suspend WORKFLOW

또는 워크플로우에 suspend 스텝을 지정해서 중단할 수도 있어요:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: suspend-template-
spec:
  entrypoint: suspend
  templates:
  - name: suspend
    steps:
    - - name: build
        template: hello-world
    - - name: approve
        template: approve
    - - name: delay
        template: delay
    - - name: release
        template: hello-world

  - name: approve
    suspend: {}

  - name: delay
    suspend:
      duration: "20"    # Must be a string. Default unit is seconds. Could also be a Duration, e.g.: "2m", "6h"

  - name: hello-world
    container:
      image: busybox
      command: [echo]
      args: ["hello world"]

일시 중단되면 워크플로우는 재개(resume)될 때까지 새 스텝을 스케줄하지 않아요. 수동으로 재개할 수 있어요:

argo resume WORKFLOW

또는 위 예제처럼 duration 제한으로 자동 재개할 수도 있어요.

더 알아보기 (Learn more)