Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to escape "{{" and "}}" in argo workflow

I want to run one argo workflow in which a value is surrounded with double braces. Argo tries to resolve it but I don't want argo to resolve it.

Following is a fraction of katib studyjob workflow manifest.

workerSpec: 
  goTemplate: 
    rawTemplate: |-
        apiVersion: "kubeflow.org/v1beta1"
        kind: TFJob
        metadata:
          name: {{.WorkerID}}
          namespace: kubeflow

Here argo tries to resolve {{.WorkerID}}. But I don't want argo to resolve it.

How can I do this? How can I escape "{{" and "}}"?

like image 450
shabbir Avatar asked Oct 15 '22 14:10

shabbir


1 Answers

Using the {% raw %} tag:

{% raw %} {{.WorkerID}} {% endraw %}

Jinja2 Reference

like image 127
Azza292 Avatar answered Oct 21 '22 03:10

Azza292