You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chart Info and Environment
Chart Name: grafana/grafana
Chart Version: 8.8.2
App Version: 11.4.0
Kubernetes: AKS v1.28.x
Parent Chart: kube-prometheus-stack (chart version: 67.10.0, app version: v0.79.2)
I encountered this issue while using the Grafana Helm chart as a dependency of the kube-prometheus-stack Helm chart, which led me to write this post.
Why is this needed
Currently, when using Grafana as a StatefulSet, we may need to delete the existing Grafana and reinstall it. Even if the PV's Reclaim Policy is set to 'Retain' and we manually restore the PV, we cannot reuse the recovered PV because the volumeName field is missing in the statefulset.yaml
What would you like to be added
I worked around the issue and solved it as follows.
First, I revised the chart myself.
In charts/grafana/templates/statefulset.yaml, add the volumeName entry as follows.
volumeClaimTemplates:
- apiVersion: v1kind: PersistentVolumeClaimmetadata:
name: storagespec:
accessModes: {{ .Values.persistence.accessModes }}storageClassName: {{ .Values.persistence.storageClassName }}volumeName: {{ .Values.persistence.volumeName | quote }} # This is an added new line...
Then, I specified the existing PV name in the user values and reinstalled the chart.
This allowed me to successfully reuse the existing PV.
Who is this feature for?
If this is added, I think it will make it easier for those who run Grafana with StatefulSet and have created custom dashboards but have to delete and reinstall Grafana due to unavoidable circumstances to preserve existing dashboards.
If I have misunderstood something or if the feature already exists but I have overlooked it, I would appreciate it if you could let me know.
The text was updated successfully, but these errors were encountered:
hyukjuns
changed the title
[Grafana] Suggest adding persistence.volumeName helm value setting item to reuse existing PV
[Grafana] Suggest adding a persistence.volumeName Helm value setting to allow reusing an existing PV
Jan 22, 2025
Chart Info and Environment
Chart Name: grafana/grafana
Chart Version: 8.8.2
App Version: 11.4.0
Kubernetes: AKS v1.28.x
Parent Chart: kube-prometheus-stack (chart version: 67.10.0, app version: v0.79.2)
I encountered this issue while using the Grafana Helm chart as a dependency of the kube-prometheus-stack Helm chart, which led me to write this post.
Why is this needed
Currently, when using Grafana as a StatefulSet, we may need to delete the existing Grafana and reinstall it. Even if the PV's Reclaim Policy is set to 'Retain' and we manually restore the PV, we cannot reuse the recovered PV because the volumeName field is missing in the statefulset.yaml
What would you like to be added
I worked around the issue and solved it as follows.
First, I revised the chart myself.
In charts/grafana/templates/statefulset.yaml, add the volumeName entry as follows.
Then, I specified the existing PV name in the user values and reinstalled the chart.
This allowed me to successfully reuse the existing PV.
Who is this feature for?
If this is added, I think it will make it easier for those who run Grafana with StatefulSet and have created custom dashboards but have to delete and reinstall Grafana due to unavoidable circumstances to preserve existing dashboards.
If I have misunderstood something or if the feature already exists but I have overlooked it, I would appreciate it if you could let me know.
The text was updated successfully, but these errors were encountered: