I'm using Grafana based on the helm chart, at the moment I have all the configurations as code, the main configuration is placed into the vales.yaml
as part of the grafana.ini
values, the dashboards and datasources are placed into configmaps per each datasource or dashboard and the sidecar container is in charge of taking them based on the labels.
Now I want to use apps and the first app I'm trying is the Cloudflare app from here, the app is installed correctly using the plugins section in the chart values.yaml
but I don't see any documentation of how to pass the email and token of CloudFlare API by configMap or json.
Is it possible? or do I have to configure it manually inside the app settings?
Grafana plugins are provisionable datasources.
The CloudFlare App plugin uses "{{.SecureJsonData.token}}"
for X-Auth-Key
and "{{.JsonData.email}}"}
for X-Auth-Email
.
You could provision the Cloudflare app plugin datasource with jsonData
and secureJsonData
you like to use.
The datasource name
is the id
given in Cloudflare app plugin plugin.yaml
file.
You may configure jsonData
and secureJsonData
for this datasource in datasources
field in values.yaml
.
For example,
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: cloudflare-app
jsonData:
email: [email protected]
secureJsonData:
token: extra-tolkien
To update this answer, this plugin began support of API tokens in December 2020. In order to have the Grafana provisioner pick up your token, if you're using an API token instead of the email/API key, you must specify:
jsonData:
bearerSet: true
secureJsonData:
bearer: "your-api-token"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With