Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Patch environment variable in devspace file #2736

Unanswered
JeTondsLeGazon asked this question in Q&A
Discussion options

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?

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /