Replies: 1 comment
-
@jhuu32 any update? did you find the solution? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
I tried to define a workflow whose step creates a custom resource with parameterized spec (namely size field)
This size field is defined from workflow parameter
Here's the YAM file where the input parameter is converted into integer with asInt() function.
I got this error unexpectedly from the Argo submission UI
Internal Server Error: templates.main.steps[0].submit-resource templates.create-memcached.resource.manifest must be a valid yaml
What's wrong? Does complex expression evaluation work properly in resource manifest definition?
When I removed the asInt(), I got a CR validation error (expected int instead of string)
Thanks
Jacques
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: toto
spec:
entrypoint: main
templates:
- name: main
steps:
- - name: submit-resource
arguments:
parameters:
- name: size
value: 5
template: create-memcached
- name: create-memcached
serviceAccountName: argo
inputs:
parameters:
- name: size
resource:
action: create
flags:
- '-n'
- argo
manifest: |
apiVersion: cache.example.com/v1alpha1
kind: Memcached
metadata:
name: memcached-sample20
spec:
size: {{=asInt(inputs.parameters.size)}}
Beta Was this translation helpful? Give feedback.
All reactions