-
Notifications
You must be signed in to change notification settings - Fork 535
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
Option to override default volumeclaimtemplate for statefulsets #2554
Option to override default volumeclaimtemplate for statefulsets #2554
Conversation
Hi, thank you for the contribution, what is it that you're trying to achieve ? Is it adding an extra PVC or replacing the current "storage" claim with something different ? thanks, krajo |
Yes, the idea is to have the ability to replace the original claims and/or be able to add more claims directly into the sts template. I do understand that there is a possibility to make an override for directories where Mimir writes + to make additional attachments + self-made claims, but I believe if it's all nested into original sts it's far easier to manage since everything is in one place. |
An alternative I see to this is to extend the configuration set under
@ThelonKarrde in your PR description you mention that you cannot use local volume storage. Is it the volumeName or the selectors that you need to be able to use local volumes? Or is it something I missed? |
@@ -18,6 +18,10 @@ spec: | |||
{{- toYaml .Values.alertmanager.statefulStrategy | nindent 4 }} | |||
serviceName: {{ template "mimir.fullname" . }}-alertmanager | |||
{{- if .Values.alertmanager.persistentVolume.enabled }} | |||
{{- if .Values.alertmanager.persistentVolume.volumeClaimTemplates }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be more consistent (with extraEnv, extraEnvFrom, etc, etc) the new value (if we decide to do add it) should be called extraVolumeClaimTemplates and it should be added after the existing conditional section.
If could be added from line 42 (original) as something like:
{{- with .Values.alertmanager.persistentVolume.extraVolumeClaimTemplates }}
{{- toYaml . | nindent 4 }}
{{- end }}
also for the other components.
@dimitarvdimitrov actually that's my bad. I mixed PVs and PVCs so with an initial goal this PR is pointless since I'm able to do what I need to. Essentially generate local-volume PVs for PVCs as I can in a separate template. But maybe I should include it here as an option to generate one with correct naming aka Other than that, I can refactor PR to what @krajorama suggested and just keep it as |
Aren't PVs resources that k8s operators manage outside of PVCs? My impression was that the separation between PVs and PVCs exists so that they can be decoupled. Having said that, I don't think PVs are in scope of the mimir helm chart. But my k8s understanding is not super up-to-date, I'm happy to be corrected. |
Yes, generally PVs are managed outside of the installation. I'm only considering a specific case when it's a local mount with directories from the host.
The only reason why it's nice to have in the main chart it's the ability to reuse naming strings But that is a very specific use case I think so overall this PR can be closed if not to just use as add option |
@dimitarvdimitrov @krajorama just a follow-up here if this should be closed or remain open with changes to discuss? |
I think we are ok to close this since it affects your use case only marginally. If it turns out that there's a bigger need for it, we can consider reopening and merging. Thanks for the proposal and patience :) |
Please excuse the necro-bump, this was the only remotely related topic I could find for an issue that I am facing. I am struggling to configure our Mimir deployment on EKS with Fargate profiles - EBS volumes can't be used, and so I have set-up EFS. I have also created the PVs in advance for the Mimir components that need it (alert manager, compactor, ingester, and store gateway). The problem is, that I am unable to provide the Thank you for any and all inputs in advance. Snippet of the alertmanager:
persistentVolume:
enabled: true
storageClassName: efs-sc
volumeName: mimir-alertmanager |
What this PR does
Adding an option to helm chart to be able to override the default
volumeClaimTemplates
which is very limited in terms of customization and you can't apply for example local-volume storage or so.This is not a breaking change and it's fully compatible with current installations.
Which issue(s) this PR fixes or relates to
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]