Skip to content

Instantly share code, notes, and snippets.

@larrycai
Created June 17, 2022 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larrycai/62b477c0482f9922659943a9d8800c29 to your computer and use it in GitHub Desktop.
Save larrycai/62b477c0482f9922659943a9d8800c29 to your computer and use it in GitHub Desktop.
argoworkflow templateref using variable
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: hello-world-at-v0.1.0
spec:
templates:
- name: hello-world
inputs:
parameters:
- name: msg
value: "hello world"
container:
image: docker/whalesay
command: [cowsay]
args: ["{{inputs.parameters.msg}}"]
---
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: hello-world-at-master
spec:
templates:
- name: hello-world
inputs:
parameters:
- name: msg
value: "hello world"
container:
image: docker/whalesay
command: [cowsay]
args: ["{{inputs.parameters.msg}}"]
---
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: hello-world-local-arg-
spec:
entrypoint: whalesay
arguments:
parameters:
- name: wftversion
value: master
templates:
- name: whalesay
steps:
- - name: hello-world
templateRef:
name: hello-world-at-${wftverion}
template: hello-world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment