-
Notifications
You must be signed in to change notification settings - Fork 16.9k
[stable/grafana] Enable extra init containers and extra emptyDir mounts #12343
[stable/grafana] Enable extra init containers and extra emptyDir mounts #12343
Conversation
Hi @jokogr. Thanks for your PR. I'm waiting for a helm member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@zanhsieh thanks for reviewing this. I also agree that this PR adds complexity, but the Grafana chart is already complex: there are already other init containers and a fine-grained selection of volumes and their respective mounts (e.g. from ConfigMaps, secrets). I am not aware of Jaeger and I do not have any other services auto-injecting Grafana pods. I came up with this PR because it suits to my case as explained above (and below). If you have a better way, just let me know. @maorfr thanks for providing the PRs, I actually missed #12184, which does the first half of this PR. However, this PR is still needed to define and mount the emptyDir volume, as @zanhsieh pointed out. Let me explain once again the reasoning behind this PR:
I am going to rebase this PR and update the Chart version number. |
e853162
to
cc26d8a
Compare
Rebase is done, chart version number got updated. If you think so, I can skip the first commit (which introduces the extra init containers) and wait for #12184 to be merged. Just let me know here. |
/assign hey @jokogr, thanks for getting involved! as I was stating in #12184, I am not fond of such general fields such as What do you think? |
Hey @maorfr, I share your concerns over over-generalizing the charts, but I have yet to find a more elegant way to avoid doing so. From one hand, I would like to introduce some custom stuff that are possibly not interesting to anyone outside my company. On the other hand, I would like to use the official public charts, so that my deployments are up-to-date with minimal effort. As such, my current approach is to use official, public charts stated in the requirements of a custom chart (so to have them as subcharts). If I want to make any expansions, e.g. write my own config maps, then I just add a new template in the custom chart I maintain. If I have to make a change in a pre-existing template, then eventually I have to rely on the subchart's (aka the official chart's) values to do so. What do you think? Is there a more easy / elegant way to achieve what I am describing? |
Signed-off-by: Ioannis Koutras <ioannis.koutras@gmail.com>
Signed-off-by: Ioannis Koutras <ioannis.koutras@gmail.com>
cc26d8a
to
da324d9
Compare
as i understand, and please correct me if i am wrong - my proposed solution would be - in this is indeed the case, you can use the extraSecretMounts field which already exists in the chart! if this is not sufficient, this can be easily exposed using a single field in values.yaml, maybe under the notifiers section? let me know what you think! :) |
@maorfr what you propose is indeed a valid option, i.e. to create the complete notifiers files as a Kubernetes secret and then mount it via Unfortunately I am currently against it, as I stated before:
The reason for this is that Kubernetes secrets on my production environment are handled manually / outside of the Helm scope. Maintaining a big notifiers file as a secret would be a bigger burden for me. Anyway, I am adding one last point to backup this PR: Several official charts from stable repo share the same practice:
If you still find this PR unwanted, please feel free to close it; no hard feelings. After all you are one of the maintainers, so I understand your burden and thank you for your time evaluating my PR :) |
/hold cancel important to say - i am not so much against it, but i do feel that anyone who brings up a problem is likely representing more users who are having it as well. my approach is to simplify as much as possible. it is obvious that you have given this much more thought then i have, and as a maintainer, one of the things that is in my top priorities is that this chart will be used! lets go ahead and merge your change :) |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jokogr, maorfr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…ts (helm#12343) * [stable/grafana] add extraInitContainers Signed-off-by: Ioannis Koutras <ioannis.koutras@gmail.com> * [stable/grafana] add extraEmptyDirMounts Signed-off-by: Ioannis Koutras <ioannis.koutras@gmail.com>
…ts (helm#12343) * [stable/grafana] add extraInitContainers Signed-off-by: Ioannis Koutras <ioannis.koutras@gmail.com> * [stable/grafana] add extraEmptyDirMounts Signed-off-by: Ioannis Koutras <ioannis.koutras@gmail.com>
…ts (helm#12343) * [stable/grafana] add extraInitContainers Signed-off-by: Ioannis Koutras <ioannis.koutras@gmail.com> * [stable/grafana] add extraEmptyDirMounts Signed-off-by: Ioannis Koutras <ioannis.koutras@gmail.com> Signed-off-by: Kevin Duane <duank001@apps.disney.com>
Hi @jokogr , as now this change is live, do you have by any chance example how to use this, to create notifications file as you described? |
…ts (helm#12343) * [stable/grafana] add extraInitContainers Signed-off-by: Ioannis Koutras <ioannis.koutras@gmail.com> * [stable/grafana] add extraEmptyDirMounts Signed-off-by: Ioannis Koutras <ioannis.koutras@gmail.com>
What this PR does / why we need it:
This PR introduces two new parameters for the Grafana chart, extraInitContainers and extraEmptyDirMounts.
Since Grafana v6.0.0, it is possible to provision notification channels. These channels might have some sensitive parts (i.e. tokens) and therefore I would like to be able to have an init container which initializes somehow the necessary yaml files. The values can then be shared with the actual Grafana container via emptyDir volumes.
cc @zanhsieh @rtluckie @maorfr
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]