-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 新增 例如任务失败处理逻辑 #2
Labels
enhancement
New feature or request
Comments
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 类型 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: