I want to use parameter with default value. #12981
-
Hi I am beginner of argo workflow. I created yaml like this. apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
name: batch-dev
spec:
workflowMetadata:
labels:
name: batch-dev
stage: dev
schedule: "0 */6 * * *"
concurrencyPolicy: "Forbid"
arguments:
parameters:
- name: forceGenerateCreatives
value: false
- name: uid
value: ''
workflowSpec:
serviceAccountName: admin
entrypoint: batch
templates:
- name: batch
retryStrategy:
limit: "2"
retryPolicy: "Always"
container:
image: 'image_url'
args: ["{{workflow.parameters.forceGenerateCreatives}}", "{{workflow.paramters.uid}}"] and I try to start cron workflow on web-ui. Can you figure out why this happened? Also, I'm wondering if it's correct to always write the value of the parameter when submitting in web-ui, even though I set the default value in yaml. And how can I set null for the default value? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
https://argo-workflows.readthedocs.io/en/latest/fields/#cronworkflowspec However, moving apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
name: batch-dev
spec:
schedule: "0 */6 * * *"
concurrencyPolicy: "Forbid"
workflowSpec:
serviceAccountName: admin
entrypoint: batch
arguments:
parameters:
- name: forceGenerateCreatives
value: "false"
- name: uid
value: ""
templates:
- name: batch
retryStrategy:
limit: "2"
retryPolicy: "Always"
container:
image: 'image_url'
args:
- "{{workflow.parameters.forceGenerateCreatives}}"
- "{{workflow.parameters.uid}}" https://argo-workflows.readthedocs.io/en/latest/fields/#workflowspec |
Beta Was this translation helpful? Give feedback.
@jeongsik-woo
arguments
andparameters
are not in theCronWorkflowSpec
.https://argo-workflows.readthedocs.io/en/latest/fields/#cronworkflowspec
However, moving
arguments
andparameters
insideworkflowSpec
and separating thearguments
would work.