Skip to content

Commit

Permalink
feat: add influxdb connection if component enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
tfoldi committed Jul 12, 2023
1 parent 82e9e5b commit 27ea79a
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions deployment/kubernetes/grafana.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,37 @@ def deploy():
"existingSecret": "grafana-admin",
}

if component_enabled("influxdb2"):
# TODO: append to existing datasources.yaml if exists
grafana_helm_values["datasources"] = {
"datasources.yaml": {
"apiVersion": 1,
"datasources": [
{
"name": "InfluxDB",
"type": "influxdb",
"access": "proxy",
"url": "http://influxdb2:80",
"jsonData": {
"version": "Flux",
"organization": config.get(
"/influxdb2/helm-values/adminUser/organization"
),
"defaultBucket": config.get(
"/influxdb2/helm-values/adminUser/bucket", "default"
),
"tlsSkipVerify": True,
},
"secureJsonData": {
"token": config.get(
"/influxdb2/helm-values/adminUser/token"
)
},
}
],
}
}

grafana_release = Release(
"grafana",
ReleaseArgs(
Expand Down

0 comments on commit 27ea79a

Please sign in to comment.