Skip to content

function "inputs" not defined when templating manifests with Skaffold/Helm/etc #6067

Closed Locked Answered by agilgur5
kerthcet asked this question in Q&A
Discussion options

You must be logged in to vote

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:

# ...
      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 …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@Martijn-Y-ai
Comment options

@KPhans
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by agilgur5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area/templating Templating with `{{...}}` type/support User support issue - likely not a bug area/downstream This is an issue downstream (e.g. Helm Charts, KFP, Metaflow, etc), and not with Argo itself
4 participants