Argo workflows plugins for slack
apiVersion: apps/v1
kind: Deployment
metadata:
name: workflow-controller
spec:
template:
spec:
containers:
- name: workflow-controller
env:
- name: ARGO_EXECUTOR_PLUGINS
value: "true"
https://argoproj.github.io/argo-workflows/workflow-inputs/
The name need to include -executor-plugin
which will be cut away. Thus when naming things we need to adjust for this.
strings.TrimSuffix(cm.Name, "-executor-plugin")
Trigger the api flow
curl http://localhost:4355//api/v1/template.execute -d \
'{
"workflow": {
"metadata": {
"name": "my-wf"
}
},
"template": {
"name": "my-tmpl",
"inputs": {},
"outputs": {},
"plugin": {
"hello": {}
}
}
}'
# ...
HTTP/1.1 200 OK
{
"node": {
"phase": "Succeeded",
"message": "Hello template!"
}
}
curl http://localhost:4355/api/v1/template.execute -d \
{
"workflow": {
"metadata": {
"name": "my-wf"
}
},
"template": {
"name": "my-tmpl",
"inputs": {},
"outputs": {},
"plugin": {
"test": {
"channel": "C035Q8CELGM",
"text": "Hello Niklas"
}
}
}
}