Conditionally add environment variable to container Argo Workflow

133 Views Asked by At

I have a container template:

inputs:
  parameters: 
    - name: a
      value: nil
container:
  image: ######
  env: 
  - name: var
    value: '{{inputs.parameters.a}}'

I'd like to create an environment variable var in the container if it's value is anything but nil (the default value). Is there any way to conditionally create an environment variable if a user submits a workflow where inputs.parameters.a is supplied with a value?

0

There are 0 best solutions below