How to use k8s secrets for BasicAuth in OpenSearch Datascource in Grafana Helm chart Values file?

  • What Grafana version and what operating system are you using?

  • [v10.0.1 (5a30620b85)]

  • What are you trying to achieve?

  • How are you trying to achieve it?
    I’m trying to integrate AWS OpenSearch with self managed Grafana deployed via Helm charts for tracking application metrics.
    I created k8s generic secret and I want to use those secrets for openSearch datasource auth.

  • What happened?
    I’m not sure how to use k8s secrets for basic auth for OpenSearch integration with Grafana

  • What did you expect to happen?
    OpenSearch Datasource connection works fine

  • Can you copy/paste the configuration(s) that you are having problems with?

- name: OpenSearch
type: grafana-opensearch-datasource
basicAuth: true
basicAuthUser: esadmin
isDefault: false
tlsAuth: false
tlsSkipVerify: true
#osVersion: ‘OpenSearch_1.3’
database: ‘dashboard*’
interval: Daily
timeField: ‘@timestamp
version: ‘1.3.2’
flavor: ‘opensearch’