【问题标题】:How to schedule a workflow in argoproj?如何在 argoproj 中安排工作流程?
【发布时间】:2019-07-17 16:11:52
【问题描述】:

我在 argoproj 工作流中编写了一个工作流,我想每隔 1 小时执行一次。在平面 k8s 中,我会使用 CronJob 类型来完成这项任务。我应该使用什么?

【问题讨论】:

    标签: argoproj argo-workflows


    【解决方案1】:

    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"]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-09-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-11
      • 2012-09-10
      • 1970-01-01
      相关资源
      最近更新 更多