metadata.generateName or metadata.name should allow variables in their definition
if I try some variable within these values they complain about { is not a valid alphanumeric
I don’t think you can substitute these.
This is not possible when submiting a Workflow directly, because the name must be know at submission time.
But what about WorkflowTemplate? We could do something like this:
kind: WorkflowTemplate
spec:
workflowMetadata:
name:
valueFrom:
expression: "my-expression"
@alexec does your example work in released version or is it a proposal?
It is proposal.
any workarounds? as workflow that runs often is getting name collisions so it can't be archived
there is workaround:
- src:
dependencyName: test-dep
dataTemplate: "{{ .Input.body.pull_request.number }}-{{ .Input.body.pull_request.head.sha | substr 0 7 }}"
dest: metadata.name
from here
@raven-wing that is only for argo-events objects?
there is workaround:
You can also use the Workflow of Workflows pattern with a wrapper Workflow to do something similar. That's potentially the easiest way to do it with Argo Workflows alone (i.e. without Events etc).
Otherwise this isn't possible to do directly, as mentioned above
i think longer randomized string + timestamp (for wftemplate and cronwf) is most important when submitted via ui since it has no option to append