incubator-devlake-helm-chart icon indicating copy to clipboard operation
incubator-devlake-helm-chart copied to clipboard

Bug: Issue with Mounting Certificate from ConfigMap in Grafana

Open ChristianFehlinger opened this issue 10 months ago • 5 comments
trafficstars

Problem

We need to mount a certificate from a ConfigMap. However, in the currently used Grafana version, an empty directory is mounted instead.

Analysis

The issue seems to be caused by the Grafana version being a bit older. Specifically, the problem originates from this line of code:

{{- range .Values.extraVolumeMounts }}
# It should instead use
{{- range .Values.extraVolumes }}

This issue appears to have been addressed in this issue in the grafana community Helm charts.

Solution

We have two potential solutions to address this:

  • Fix the issue in the current Grafana version by modifying the template.
  • Upgrade to a newer Grafana version where this issue has already been resolved.

Would you prefer a fix in the current version or an update to a fixed version?

ChristianFehlinger avatar Jan 13 '25 09:01 ChristianFehlinger

I personally would prefer the former. @matrixji @JorgeGar What do you guys think?

klesh avatar Jan 14 '25 08:01 klesh

I'd be fine with the first option as a quick fix, since updating Grafana version may come with more issues to solve. I would be good to update Garana in the long run too.

JorgeGar avatar Jan 14 '25 08:01 JorgeGar

I just created an PR

ChristianFehlinger avatar Jan 22 '25 19:01 ChristianFehlinger

Hello all,

I have exactly same issue, I am using following versions for helm chars.

apiVersion: v2
name: grafana
version: 8.10.1
appVersion: 11.5.2
kubeVersion: "^1.8.0-0"

I am trying to mount secret for certificates, here is my values.yaml.

extraVolumeMounts:
  - name: grafana-tls-volume
    mountPath: /etc/grafana/certs
    readOnly: true

## Additional Grafana server volumes
extraVolumes:
    - name: grafana-tls-volume
      secret:
        defaultMode: 420
        secretName: grafana-lab-secret

When I do helm template or try to upgrade I see following.

      volumes:
        - name: config
          configMap:
            name: bguliyev-grafana
        - name: storage
          persistentVolumeClaim:
            claimName: bguliyev-grafana
        - name: grafana-tls-volume
          emptyDir: {}

Any help is appreciated !

ghost avatar Feb 21 '25 23:02 ghost

This should be fixed by #346 - the updated helm chart supports configmap mounts. Could you please re-test?

jekader avatar Sep 01 '25 14:09 jekader