apiVersion: api.practice.com/v1alpha1 kind: JobFlow metadata: name: jobflow-example spec: jobs: - name: job1 dependencies: [] template: spec: containers: - image: busybox:1.28 command: - sh - -c - exit 1 # 模拟作业失败 imagePullPolicy: IfNotPresent name: nginx - name: job2 template: spec: containers: - image: busybox:1.28 command: - sh - -c - echo "Job 2 executed" imagePullPolicy: IfNotPresent name: nginx dependencies: - job1 - name: job3 template: spec: containers: - image: busybox:1.28 command: - sh - -c - echo "Job 3 executed" imagePullPolicy: IfNotPresent name: nginx dependencies: - job1 - job2 - name: job4 template: spec: containers: - image: busybox:1.28 command: - sh - -c - echo "Job 4 executed" imagePullPolicy: IfNotPresent name: nginx dependencies: - job1 - name: job5 dependencies: - job4 - job2 template: spec: containers: - image: busybox:1.28 command: - sh - -c - echo "Job 5 executed" imagePullPolicy: IfNotPresent name: nginx errorHandler: # 可设计为 当任一一个任务出错时,进行的业务逻辑 template: spec: containers: - image: <your-error-handler-image> # 调整为你的错误处理镜像 command: - sh - -c - echo "Error handler executed" imagePullPolicy: IfNotPresent name: error-handler
设计为 image or scipt type 类型
Activity
googs1025 commentedon Jan 14, 2024
googs1025 commentedon Jan 14, 2024
设计为 image or scipt type 类型