feat(bitmagnet): automatically add grafana dashboard and datasource

This commit is contained in:
Kjeld Schouten 2024-03-01 09:35:45 +01:00
parent e28ce6d5cc
commit 4d41312666
3 changed files with 1448 additions and 1 deletions

View File

@ -35,4 +35,4 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/bitmagnet
- https://ghcr.io/bitmagnet-io/bitmagnet
type: application
version: 1.2.0
version: 1.3.0

File diff suppressed because it is too large Load Diff

View File

@ -74,3 +74,37 @@ metrics:
targetSelector: main
prometheusRule:
enabled: false
configmap:
dashboard:
enabled: true
labels:
grafana_dashboard: "1"
data:
bitmagnet.json: >-
{{ .Files.Get "dashboard.json" | indent 8 }}
datasource:
enabled: true
labels:
grafana_datasources: "1"
data:
bitmagnetpsql.yaml: |-
apiVersion: 1
datasources:
- name: BitmagnetPostgres
type: postgres
uid: bitmagnetpostgres
url: {{ printf "%s.%s:5432" (.Values.cnpg.main.creds.host | trimAll "\"") .Release.Namespace }}
access: proxy
user: {{ .Values.cnpg.main.user }}
secureJsonData:
password: {{ .Values.cnpg.main.creds.password | default "na" }}
jsonData:
database: {{ .Values.cnpg.main.database }}
sslmode: 'disable' # disable/require/verify-ca/verify-full
maxOpenConns: 100 # Grafana v5.4+
maxIdleConns: 100 # Grafana v5.4+
maxIdleConnsAuto: true # Grafana v9.5.1+
connMaxLifetime: 14400 # Grafana v5.4+
postgresVersion: 1500 # 903=9.3, 904=9.4, 905=9.5, 906=9.6, 1000=10
timescaledb: false