podSpecPatch
for init
container
#9203
-
Hi, I am trying to understand how to use When submitting: apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: pod-spec-patch-
spec:
entrypoint: whalesay
arguments:
parameters:
- name: cpu-limit
value: 100m
templates:
- name: whalesay
podSpecPatch: '{"containers":[{"name":"init", "resources":{"limits":{"cpu": "{{workflow.parameters.cpu-limit}}" }}}]}'
container:
image: docker/whalesay:latest
command: [cowsay]
args: ["hello world"]
resources:
limits:
cpu: 200m
memory: 200Mi I'm seeing the error:
I would assume that a apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: pod-spec-patch-
spec:
entrypoint: whalesay
arguments:
parameters:
- name: cpu-limit
value: 100m
templates:
- name: whalesay
podSpecPatch: '{"containers":[{"name":"init", "image":<ARGOEXEC_IMAGE>, "command": ["init"], "resources":{"limits":{"cpu": "{{workflow.parameters.cpu-limit}}" }}}]}'
container:
image: docker/whalesay:latest
command: [cowsay]
args: ["hello world"]
resources:
limits:
cpu: 200m
memory: 200Mi and got the error:
I was wondering how to use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Init container live under Working spec: apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: pod-spec-patch-
spec:
entrypoint: whalesay
arguments:
parameters:
- name: cpu-limit
value: 100m
templates:
- name: whalesay
podSpecPatch: '{"initContainers":[{"name":"init", "resources":{"limits":{"cpu": "{{workflow.parameters.cpu-limit}}" }}}]}'
container:
image: docker/whalesay:latest
command: [cowsay]
args: ["hello world"]
resources:
limits:
cpu: 200m
memory: 200Mi |
Beta Was this translation helpful? Give feedback.
Init container live under
initContainers
notcontainers
.Working spec: