From 8cb7c2490a13b835dfe27270717e052e5a65424b Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Sun, 25 Feb 2024 15:23:19 +0100 Subject: [PATCH] feat(grafana): BREAKING CHANGE use postgresql for HA (#18561) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Appearently Grafana can use postgresql instead of sqllite for its internal database. meanshile sqllite is causing issues without our HA grafana setup **โš™๏ธ Type of change** - [x] โš™๏ธ Feature/App addition - [ ] ๐Ÿช› Bugfix - [x] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] ๐Ÿ”ƒ Refactor of current code **๐Ÿงช How Has This Been Tested?** **๐Ÿ“ƒ Notes:** **โœ”๏ธ Checklist:** - [ ] โš–๏ธ My code follows the style guidelines of this project - [ ] ๐Ÿ‘€ I have performed a self-review of my own code - [ ] #๏ธโƒฃ I have commented my code, particularly in hard-to-understand areas - [ ] ๐Ÿ“„ I have made corresponding changes to the documentation - [ ] โš ๏ธ My changes generate no new warnings - [ ] ๐Ÿงช I have added tests to this description that prove my fix is effective or that my feature works - [ ] โฌ†๏ธ I increased versions for any altered app according to semantic versioning **โž• App addition** If this PR is an app addition please make sure you have done the following. - [ ] ๐Ÿ–ผ๏ธ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --- charts/enterprise/grafana/Chart.yaml | 2 +- charts/enterprise/grafana/values.yaml | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/charts/enterprise/grafana/Chart.yaml b/charts/enterprise/grafana/Chart.yaml index cca01e3f898..0025731c3c6 100644 --- a/charts/enterprise/grafana/Chart.yaml +++ b/charts/enterprise/grafana/Chart.yaml @@ -38,4 +38,4 @@ sources: - https://hub.docker.com/r/grafana/grafana - https://quay.io/kiwigrid/k8s-sidecar type: application -version: 13.1.2 +version: 14.0.0 diff --git a/charts/enterprise/grafana/values.yaml b/charts/enterprise/grafana/values.yaml index 88032171024..7d612fb2f2e 100644 --- a/charts/enterprise/grafana/values.yaml +++ b/charts/enterprise/grafana/values.yaml @@ -31,6 +31,18 @@ workload: GF_AUTH_LDAP_ENABLED: "false" GF_AUTH_LDAP_ALLOW_SIGN_UP: "false" GF_SERVER_HTTP_PORT: 3000 + GF_DATABASE_TYPE: postgres + GF_DATABASE_NAME: "{{ .Values.cnpg.main.user }}" + GF_DATABASE_USER: "{{ .Values.cnpg.main.database }}" + GF_DATABASE_SSL_MODE: disable + GF_DATABASE_HOST: + secretKeyRef: + name: cnpg-main-urls + key: host + GF_DATABASE_PASSWORD: + secretKeyRef: + name: cnpg-main-user + key: password probes: liveness: path: "/api/health" @@ -326,3 +338,9 @@ serviceAccount: podOptions: automountServiceAccountToken: true + +cnpg: + main: + enabled: true + user: grafana + database: grafana \ No newline at end of file