将多个模板化输入传递到Argo工作流值中



我在下面为Argo写了一个工作流,它由一个(基于容器的(模板和一个DAG组成。DAG应该将可变数量的值传递到模板的输入参数中。

这可能吗?

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: dag-
spec:
entrypoint: do-something
templates:
- name: something
inputs:
parameters:
- name: values
container:
image: some-image
args: ["{{inputs.parameters.values}}"]  # This field must be converted to ["1", "3", "6", "9"]
- name: do-something
dag:
tasks:
- name: do-it
template: something
arguments:
parameters:
- name: values
value: [1, 3, 6, 9]

我提出了一个问题,但这是不可能的。建议的解决方法是创建一个层,将字符串解析为列表:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: dag-
spec:
entrypoint: do-something
templates:
- name: something
inputs:
parameters:
- name: values
container:
image: alpine:latest
command: [sh, -c]
args: ["parselist {{inputs.parameters.values}}"]
- name: do-something
dag:
tasks:
- name: do-it
template: something
arguments:
parameters:
- name: values
value: '["1", "3", "6", "9"]'

相关内容

  • 没有找到相关文章

最新更新