【发布时间】:2019-07-17 16:11:52
【问题描述】:
我在 argoproj 工作流中编写了一个工作流,我想每隔 1 小时执行一次。在平面 k8s 中,我会使用 CronJob 类型来完成这项任务。我应该使用什么?
【问题讨论】:
我在 argoproj 工作流中编写了一个工作流,我想每隔 1 小时执行一次。在平面 k8s 中,我会使用 CronJob 类型来完成这项任务。我应该使用什么?
【问题讨论】:
Argo 2.5 introduced 一个新的"CronWorkflow" type。
他们的示例工作流的这种细微变化将每小时运行一次:
apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
name: test-cron-wf
spec:
schedule: "0 * * * *"
concurrencyPolicy: "Replace"
startingDeadlineSeconds: 0
workflowSpec:
entrypoint: whalesay
templates:
- name: whalesay
container:
image: alpine:3.6
command: [sh, -c]
args: ["date; sleep 90"]
【讨论】: