-
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: hello-world-parameters-
spec:
# invoke the whalesay template with
# "hello world" as the argument
# to the message parameter
entrypoint: whalesay
arguments:
parameters:
- name: message
value: hello world
templates:
- name: whalesay
inputs:
parameters:
- name: message # parameter declaration
container:
# run cowsay with that message input parameter as args
image: docker/whalesay
command: [cowsay]
args: ["{{inputs.parameters.message}}"] I deployed an official demo, but print error |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
well, it's a bug from skaffold. |
Beta Was this translation helpful? Give feedback.
-
That error is not from Argo, but from a templating engine such as Helm (or Skaffold or another). If you're using Helm templating (or others), you need to escape Argo's own templating. # ...
args: ["{{`{{inputs.parameters.message}}`}}"] The links above describe how this works in detail, but basically the backticks tell Helm (et al) to render the inner string as-is as a literal. That makes Helm render the Argo syntax out properly. Copied and slightly modified from my own answer in #11539 |
Beta Was this translation helpful? Give feedback.
That error is not from Argo, but from a templating engine such as Helm (or Skaffold or another).
If you're using Helm templating (or others), you need to escape Argo's own templating.
helm/helm#2798 lists several ways of doing so. The one I am most familiar with is "Option 1" from this SO answer (written by an Argo CD maintainer and Workflows contributor).
Here's how you could use that for your template:
The links above describe how this works in detail, but basically the backticks tell Helm (et al) to render the inner string as-is as a literal. That makes Helm render the Argo syntax out properly.
Copied and slightly modified from …