Argo Events sensor resubmit workflow

之前我们曾经创建过一个名叫 buildkit-vw57w 的 workflow template,这里如果想使用其他的template,也可以在sensor中配置

参考

https://github.com/argoproj/argo-events/tree/master/examples/sensors

https://github.com/argoproj/argo-events/discussions/1032

Event sensor 可以通过 trigger 对系统中既存的 workflow 进行 resubmit

例如,目前我们系统中存在一个 workflow template

然后我使用这个 workflow template来触发一个 workflow

然后我们使用 sensor 的trigger 来 resubmit 这个 workflow buildkit-vw57w-dwd7j

apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
  name: webhook
spec:
  template:
    serviceAccountName: operate-workflow-sa
  dependencies:
    - name: test-dep
      eventSourceName: webhook
      eventName: example
  triggers:
    - template:
        name: argo-workflow-trigger
        argoWorkflow:
          group: argoproj.io
          version: v1alpha1
          resource: workflows
          operation: resubmit
          source:
            resource:
              apiVersion: argoproj.io/v1alpha1
              kind: Workflow
              metadata:
                name: buildkit-vw57w-dwd7j
                namespace: argo
Send a Message