v2.7 and after
Default Workflow spec values can be set at the controller config map that will apply to all Workflows executed from said controller. If a Workflow has a value that also has a default value set in the config map, the Workflow's value will take precedence.
Default Workflow values can be specified by adding them under the workflowDefaults
key in the workflow-controller-configmap
.
Values can be added as they would under the Workflow.spec
tag.
For example, to specify default values that would partially produce the following Workflow
:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: gc-ttl-
annotations:
argo: workflows
labels:
foo: bar
spec:
ttlStrategy:
secondsAfterSuccess: 5 # Time to live after workflow is successful
parallelism: 3
The following would be specified in the Config Map:
# This file describes the config settings available in the workflow controller configmap
apiVersion: v1
kind: ConfigMap
metadata:
name: workflow-controller-configmap
data:
# Default values that will apply to all Workflows from this controller, unless overridden on the Workflow-level
workflowDefaults: |
metadata:
annotations:
argo: workflows
labels:
foo: bar
spec:
ttlStrategy:
secondsAfterSuccess: 5
parallelism: 3