Migrate grafana to postgres db
Signed-off-by: Nikolai Rodionov <allanger@badhouseplants.net>
This commit is contained in:
parent
966a693d67
commit
b4bcb0eb28
@ -35,6 +35,25 @@ datasources:
|
|||||||
httpHeaderName1: 'X-Scope-OrgID'
|
httpHeaderName1: 'X-Scope-OrgID'
|
||||||
secureJsonData:
|
secureJsonData:
|
||||||
httpHeaderValue1: 'badhouseplants'
|
httpHeaderValue1: 'badhouseplants'
|
||||||
|
envFromSecret: grafana-db-creds
|
||||||
|
extraObjects:
|
||||||
|
- apiVersion: kinda.rocks/v1beta1
|
||||||
|
kind: Database
|
||||||
|
metadata:
|
||||||
|
name: grafana-postgres17
|
||||||
|
spec:
|
||||||
|
backup:
|
||||||
|
cron: '0 0 * * *'
|
||||||
|
enable: false
|
||||||
|
credentials:
|
||||||
|
templates:
|
||||||
|
- name: DB_HOST
|
||||||
|
secret: true
|
||||||
|
template: '{{ `{{ .Hostname }}:{{ .Port }}` }}'
|
||||||
|
deletionProtected: true
|
||||||
|
instance: postgres17
|
||||||
|
postgres: {}
|
||||||
|
secretName: grafana-db-creds
|
||||||
grafana.ini:
|
grafana.ini:
|
||||||
server:
|
server:
|
||||||
root_url: https://grafana.badhouseplants.net
|
root_url: https://grafana.badhouseplants.net
|
||||||
@ -51,3 +70,12 @@ grafana.ini:
|
|||||||
api_url: "https://authentik.badhouseplants.net/application/o/userinfo/"
|
api_url: "https://authentik.badhouseplants.net/application/o/userinfo/"
|
||||||
# Optionally map user groups to Grafana roles
|
# Optionally map user groups to Grafana roles
|
||||||
role_attribute_path: contains(groups, 'Admins') && 'Admin' || contains(groups, 'DevOps') && 'Editor' || 'Viewer'
|
role_attribute_path: contains(groups, 'Admins') && 'Admin' || contains(groups, 'DevOps') && 'Editor' || 'Viewer'
|
||||||
|
database:
|
||||||
|
type: postgres
|
||||||
|
host: ${DB_HOST}
|
||||||
|
name: ${POSTGRES_DB}
|
||||||
|
user: ${POSTGRES_USER}
|
||||||
|
password: ${POSTGRES_PASSWORD}
|
||||||
|
ssl_mode: disable
|
||||||
|
max_open_conn: 10
|
||||||
|
max_idle_conn: 5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user