How to deal with common code in multiple HelmReleases? #5164
Unanswered
joelperez98
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Use kustomize to have a base for the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I want to add new annotations and tolerations to all my HelmReleases, starting first with some apps, then with all apps at dev and then with all apps on prod.
So my manager has told me to just do something like this for every app:
Which is obviously not a clever solution as I need to repeat the affinity and tolerations every time for every pod.
After reading #2919, I've managed to setup a configMapGenerator for my HelmRelease, something like this:
However, I'm hitting the same problem as I have to hardcode the annotations every time for each pod. What I'd like to is to just have one single common-values.yaml file, like this:
And then just use it from the required values.yaml files doing something similar to
For each HelmRelease. And it would be also nice if then I could easily path those values for each
cluster/stage
.However, I don't manage to merge the values.yaml file with my common-values.yaml file and create a
ConfigMap
from those 2 bases files. I'm pretty sure there must be a way to achieve this. I don't know ifconfigMapgenerator
is suitable for that, or I'd have to usepatch
or maybe I'm missing something.I have tried the
behaviour: merge
for the configMapGenerator but it's failing:Error message:
I don't have more ideas about what could I try or read.
Thank you for your time
Beta Was this translation helpful? Give feedback.
All reactions