From deca0626a12d0e6c4c33b8c964ab0b7322e493dd Mon Sep 17 00:00:00 2001 From: Christian Fehlinger <3738607+ChristianFehlinger@users.noreply.github.com> Date: Wed, 22 Jan 2025 20:37:01 +0100 Subject: [PATCH 1/2] fix: add option for Grafana server volumes --- charts/devlake/charts/grafana/values.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/charts/devlake/charts/grafana/values.yaml b/charts/devlake/charts/grafana/values.yaml index a6d8aec3..28a31fa8 100644 --- a/charts/devlake/charts/grafana/values.yaml +++ b/charts/devlake/charts/grafana/values.yaml @@ -507,6 +507,22 @@ extraSecretMounts: [] # nodePublishSecretRef: # Only required when using service principal mode # name: grafana-akv-creds # Only required when using service principal mode +## Additional Grafana server volumes +extraVolumes: [] + # - name: extra-volume-0 + # existingClaim: volume-claim + # - name: extra-volume-1 + # hostPath: + # path: /usr/shared/ + # type: "" + # - name: grafana-secrets + # csi: + # driver: secrets-store.csi.k8s.io + # readOnly: true + # volumeAttributes: + # secretProviderClass: "grafana-env-spc" + + ## Additional grafana server volume mounts # Defines additional volume mounts. extraVolumeMounts: [] From 8384a71e5f4e6a42785cf46e72278fa66eaffb34 Mon Sep 17 00:00:00 2001 From: Christian Fehlinger <3738607+ChristianFehlinger@users.noreply.github.com> Date: Wed, 22 Jan 2025 20:39:20 +0100 Subject: [PATCH 2/2] fix: use extraVolumes instead of extraVolumeMounts The wrong variable was used --- charts/devlake/charts/grafana/templates/_pod.tpl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/charts/devlake/charts/grafana/templates/_pod.tpl b/charts/devlake/charts/grafana/templates/_pod.tpl index 762603d8..2954c190 100644 --- a/charts/devlake/charts/grafana/templates/_pod.tpl +++ b/charts/devlake/charts/grafana/templates/_pod.tpl @@ -1134,17 +1134,20 @@ volumes: {{- toYaml .csi | nindent 6 }} {{- end }} {{- end }} - {{- range .Values.extraVolumeMounts }} + {{- range .Values.extraVolumes }} - name: {{ .name }} {{- if .existingClaim }} persistentVolumeClaim: claimName: {{ .existingClaim }} {{- else if .hostPath }} hostPath: - path: {{ .hostPath }} + {{ toYaml .hostPath | nindent 6 }} {{- else if .csi }} csi: {{- toYaml .data | nindent 6 }} + {{- else if .configMap }} + configMap: + {{- toYaml .configMap | nindent 6 }} {{- else }} emptyDir: {} {{- end }}