File and extraConfigmapMounts configuration not read by Grafana for notification policies using helm

Hello all.

I’ve tried adding the notification policies from helm using a mounted configmap. When I use the first method of directly putting the file in helm, it works properly.

alerting:
  notifiaction-policies.yaml:  
    apiVersion: 1
    policies:
      - orgId: 1
        receiver: testingtest
        group_by: ['grafana','alertname']

However, when I use file, which is mounted using extraConfigmapMounts, the policy is not created, and in helm I get

notification-policies: "" as the value being read instead of the below:

alerting:
  notification-policies.yaml:
    file: alerting/shared/notification-policies.yaml

For reference, this is my extraConfigmapMounts configuration. I also verified that the file is mounted properly in the referenced directory.

extraConfigmapMounts:
  - name: grafana-alerting-config-volume
    mountPath: /var/lib/grafana/alerting/shared/
    subPath: ""
    configMap: grafana-alerting-config
    readOnly: false

And the actual notification policy in the configmap, which is the same as the one above:

apiVersion: v1
data:
  notification-policies.yaml: |-
    apiVersion: 1
    policies:
      - orgId: 1
        receiver: testingtest
        group_by: ['grafana','alertname']

Ok I found the issue. I needed to have all the alerting provisioning done in the configmap, then mount the entire directory in /etc/grafana/provisioning/alerting/ instead, and remove the entire alerting: section in helm.

  - name: grafana-alerting-config-volume
    mountPath: /etc/grafana/provisioning/alerting/
    subPath: ""
    configMap: grafana-alerting-config
    readOnly: false```