| giolekva | 73d3126 | 2020-04-11 15:24:33 +0400 | [diff] [blame] | 1 | apiVersion: argoproj.io/v1alpha1 |
| 2 | kind: Sensor |
| 3 | metadata: |
| 4 | name: minio-sensor |
| 5 | labels: |
| 6 | # sensor controller with instanceId "argo-events" will process this sensor |
| 7 | sensors.argoproj.io/sensor-controller-instanceid: argo-events |
| 8 | spec: |
| 9 | template: |
| 10 | spec: |
| 11 | containers: |
| 12 | - name: sensor |
| 13 | image: argoproj/sensor:v0.13.0 |
| 14 | imagePullPolicy: Always |
| 15 | serviceAccountName: argo-events-sa |
| 16 | subscription: |
| 17 | http: |
| 18 | port: 9300 |
| 19 | dependencies: |
| 20 | - name: test-dep |
| 21 | gatewayName: minio-gateway |
| 22 | eventName: example |
| 23 | triggers: |
| 24 | - template: |
| 25 | name: minio-workflow-trigger |
| 26 | k8s: |
| 27 | group: argoproj.io |
| 28 | version: v1alpha1 |
| 29 | resource: workflows |
| 30 | operation: create |
| 31 | source: |
| 32 | resource: |
| 33 | apiVersion: argoproj.io/v1alpha1 |
| 34 | kind: Workflow |
| 35 | metadata: |
| 36 | generateName: artifact-workflow-2- |
| 37 | spec: |
| 38 | entrypoint: whalesay |
| 39 | templates: |
| 40 | - name: whalesay |
| 41 | container: |
| 42 | command: |
| 43 | - cowsay |
| 44 | image: docker/whalesay:latest |
| 45 | args: |
| 46 | - THIS_WILL_BE_REPLACED |
| 47 | # The container args from the workflow are overridden by the s3 notification key |
| 48 | parameters: |
| 49 | - src: |
| 50 | dependencyName: test-dep |
| 51 | dataKey: notification.0.s3.object.key |
| 52 | dest: spec.templates.0.container.args.0 |