Argo Workflows CRD
Workflow and WorkflowTemplate
apiVersion: argoproj.io/v1alpha1
kind: Workflow # Workflow|WorkflowTemplate|ClusterWorkflowTemplate
metadata:
generateName: hello-world-
spec:
entrypoint: <templateName> # 처음 시작되어야 할 템플릿 이름
templates:
- <template>
serviceAccountName
: workflow에 의해 실행되는 Pod의 ServiceAccount
info
Workflow와 WorkflowTemplate는 .status
필드만 다릅니다.
entrypoint
and templates
Variables
podGC
spec:
podGC:
labelSelector: {}
strategy: OnPodCompletion # OnPodCompletion|OnPodSuccess|OnWorkflowCompletion|OnWorkflowSuccess
podGC
- 선언하지 않으면 Pod는 삭제되지 않습니다.
labelSelector
- 선언하지 않으면 실행되는 모든 템플릿의 Pod이 삭제됩니다.
volumes
container
가 마운트할 수 있는 볼륨 목록을 선언할 수 있습니다.
spec:
volumes:
- name: <volumeName>
persistentVolumeClaim:
claimName: <existingPvcName>
templates:
- name: <templateName>
container:
image: ubuntu:20.04
command:
- ls
args:
- /mnt/vol
volumeMounts:
- name: <volumeName>
mountPath: /mnt/vol
spec:
volumeClaimGC:
strategy: OnWorkflowSuccess # OnWorkflowSuccess | OnWorkflowCompletion
volumeClaimTemplates:
- metadata:
name: <pvcSuffix> # PersistentVolumeClaim 이름은 <workflowName>-<pvcSuffix> 형태로 생성됩니다.
spec:
accessModes: [ReadWriteOnce]
resources:
requests:
storage: 1Gi
templates:
- name: <templateName>
container:
image: ubuntu:20.04
command:
- ls
args:
- /mnt/vol
volumeMounts:
- name: <pvcSuffix>
mountPath: /mnt/vol
Reference
- https://argoproj.github.io/argo-workflows/workflow-concepts/
- https://argoproj.github.io/argo-workflows/fields/