Skip to content

Commit be20726

Browse files
committed
chore(workflows): convert to k8s object triggers
Change the Argo Events Sensors to using the k8s object creation trigger instead of the argoWorkflow trigger which will require less permissions and to better specify the service accounts. ref: PUC-1125
1 parent 77c88a0 commit be20726

File tree

6 files changed

+18
-30
lines changed

6 files changed

+18
-30
lines changed

workflows/argo-events/sensors/alertmanager-webhook-sensor.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,9 @@ spec:
3131
triggers:
3232
- template:
3333
name: alertmanager-workflow-trigger
34-
# uses 'argo' CLI instead of 'kubectl'
35-
argoWorkflow:
36-
# sets the operation to 'argo submit'
37-
operation: submit
38-
34+
# creates workflow object directly via k8s API
35+
k8s:
36+
operation: create
3937
parameters:
4038
- src:
4139
dependencyName: alertmanager-dep

workflows/openstack/sensors/sensor-ironic-node-port.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,9 @@ spec:
4545
triggers:
4646
- template:
4747
name: ironic-node-port
48-
# uses 'argo' CLI instead of 'kubectl'
49-
argoWorkflow:
50-
# sets the operation to 'argo submit'
51-
operation: submit
52-
# edits source section
48+
# creates workflow object directly via k8s API
49+
k8s:
50+
operation: create
5351
parameters:
5452
# first parameter is the parsed oslo.message
5553
- dest: spec.arguments.parameters.0.value

workflows/openstack/sensors/sensor-ironic-node-update.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,9 @@ spec:
4545
triggers:
4646
- template:
4747
name: ironic-node-update
48-
# uses 'argo' CLI instead of 'kubectl'
49-
argoWorkflow:
50-
# sets the operation to 'argo submit'
51-
operation: submit
52-
# edits source section
48+
# creates workflow object directly via k8s API
49+
k8s:
50+
operation: create
5351
parameters:
5452
# first parameter's value is replaced with the uuid
5553
- dest: spec.arguments.parameters.0.value

workflows/openstack/sensors/sensor-ironic-reclean.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,9 @@ spec:
3535
triggers:
3636
- template:
3737
name: ironic-reclean
38-
# uses 'argo' CLI instead of 'kubectl'
39-
argoWorkflow:
40-
# sets the operation to 'argo submit'
41-
operation: submit
42-
# edits source section
38+
# creates workflow object directly via k8s API
39+
k8s:
40+
operation: create
4341
parameters:
4442
# first parameter's value is replaced with the uuid
4543
- dest: spec.arguments.parameters.0.value

workflows/openstack/sensors/sensor-keystone-event-project.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,9 @@ spec:
4949
triggers:
5050
- template:
5151
name: keystone-event-project
52-
# uses 'argo' CLI instead of 'kubectl'
53-
argoWorkflow:
54-
# sets the operation to 'argo submit'
55-
operation: submit
56-
# edits the source section
52+
# creates workflow object directly via k8s API
53+
k8s:
54+
operation: create
5755
parameters:
5856
# first parameter's value is replaced with the event type
5957
- dest: spec.arguments.parameters.0.value

workflows/openstack/sensors/sensor-neutron-event-network-segment-range.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,9 @@ spec:
4646
triggers:
4747
- template:
4848
name: neutron-event-network-segment-range
49-
# uses 'argo' CLI instead of 'kubectl'
50-
argoWorkflow:
51-
# sets the operation to 'argo submit'
52-
operation: submit
53-
# edits the source section
49+
# creates workflow object directly via k8s API
50+
k8s:
51+
operation: create
5452
parameters:
5553
- dest: spec.arguments.parameters.0.value
5654
src:

0 commit comments

Comments
 (0)