-
Notifications
You must be signed in to change notification settings - Fork 392
Patch environment variable in devspace file #2736
Unanswered
JeTondsLeGazon
asked this question in
Q&A
-
I would like to patch some container environment variable for all my deployments in my devspace.yml
using the operator replace
.
Example of deployment:
deployments:
my-deployment
helm:
values:
containers:
- image: my-image
env:
- name: MY_VARIABLE
value: "true"
my-other-deployment
helm:
values:
containers:
- image: my-other-image
env:
- name: MY_VARIABLE
value: "true"
So far I have come up with this:
patches:
- op: replace
path: deployments..[?(@)].helm.values.containers.container-0.env.name=MY_VARIABLE.value
value: false
Unfortunately with no success. I have tried other jsonpaths:
deployments..[?(@)].helm.values.containers[0].env.name=MY_VARIABLE.value
deployments..helm.values.containers[0].env.name=MY_VARIABLE.value
..helm.values.containers[0].env.name=MY_VARIABLE.value
..env.name=MY_VARIABLE.value
They did work work either. Any idea which jsonpath yields success to modify this?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment