-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Labels
area/templatingTemplating with `{{...}}`Templating with `{{...}}`
Description
Hello,
I am trying to use a parameter for the timeoutSeconds attribute of the HTTP template
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: api-call
spec:
entrypoint: main
templates:
- name: main
inputs:
parameters:
- name: url
- name: method
- name: timeoutSeconds
default: 1800 # 30 min * 60s
http:
timeoutSeconds: '{{= asInt(inputs.parameters.timeoutSeconds) }}'
url: '{{ inputs.parameters.url }}'
method: '{{ inputs.parameters.method }}'Unfortunately when deploying such a resource, I am getting the following error in Argo Workflows UI:
json: cannot unmarshal string into Go struct field HTTP.items.spec.templates.http.timeoutSeconds of type int64
The problem is, that I need the quotes around the Go template that resolves the parameter - but in turn they set the datatype to string causing deserialization to fail.
Has anyone a suggestion on how I can fix / work around this?
Metadata
Metadata
Assignees
Labels
area/templatingTemplating with `{{...}}`Templating with `{{...}}`