argo-workflows: PodSpecPatch cannot patch `env` variables
Checklist
- Double-checked my configuration.
- Tested using the latest version.
- Used the Emissary executor.
Summary
What happened/what you expected to happen?
PodSpecPatch should work for env vars. I want all my pods to be configured the same way, but this doesn’t work so I have to resort to copying the env
block into each template.
What version are you running?
Diagnostics
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: my-template
generateName: my-template-
spec:
podSpecPatch: |
containers:
- name: main
env:
- name: FOO
valueFrom:
configMapKeyRef:
name: "my-config"
key: foo_key
Any pod inside this template will not have the env
values set from the patch.
Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 4
- Comments: 17 (7 by maintainers)
I spoke with @sarabala1979 in a support chat on this, the suggestion here is instead of using
podSpecPatch
to usetemplateDefaults
.@alexec It shows up in my ide using the json schema for workflows. Perhaps there’s a bug ij the schema then?
Regardless of that, if this is the case how do you recommend I go about structuring these workflow templates?