-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to replace variables in deployment's env definition #4337
Comments
We are expecting to deprecate and remove vars, I would encourage you to use For your case, to replace the variable in your secret, you would need something like: app-secrets.yaml
kustomization.yaml
Running
|
/kind support |
If there multiple keys would we have to repeat the replacements multiple times for each key. Could we do it in one go? |
You can provide multiple fieldpaths for a single target, e.g.
Does that answer your question? |
Yes. I will give it a go thanks |
All the above suggestions and examples worked @natasha41575 and thank you so much for the assistance. Is it possible to replace multiple variables in a line using
|
It is possible to replace multiple variables in a line using replacements, but what is not possible currently is to use replacements with values that are not delimited. Your above variable $(SPRING_PROFILE) has an |
Ok. Will continue to use |
Definition of Done - Consul template as part of base repo will have ENV as a placeholder so this task is to replace ENV placeholder with deployment target environment . Example for dev , it should replace ENV with DEV . Suggestion : Please use kustomize configmap which hold key value pair and replace dynamically in consul template container before actual application read it How would I achieve this by having a single ENV file as a template and change the environmental variables by DEV / QA /UAT |
kustomize yaml file namespace: oasis-dev
|
I have the following deployment manifest
I have a patch file with following contents
external secret with following contents
kustomization file with following contents
On running
kustomize build
the variable are not replaced.Is this expected? Or are there other ways to solve this?
The text was updated successfully, but these errors were encountered: