From e1029181ebc5d5fe706a3a9e7375d21a6ab6de2d Mon Sep 17 00:00:00 2001 From: Jazzlyn <9011011+jazzlyn@users.noreply.github.com> Date: Wed, 3 Apr 2024 23:07:15 +0200 Subject: [PATCH] fix(grafana): move grafana.ini to hr --- .../grafana/app/config/grafana.ini | 29 ------------------- .../grafana/app/helm-release.yaml | 28 +++++++++++++----- .../grafana/app/kustomization.yaml | 3 -- 3 files changed, 20 insertions(+), 40 deletions(-) delete mode 100644 kubernetes/talos-flux/apps/observability/grafana/app/config/grafana.ini diff --git a/kubernetes/talos-flux/apps/observability/grafana/app/config/grafana.ini b/kubernetes/talos-flux/apps/observability/grafana/app/config/grafana.ini deleted file mode 100644 index a783672eb..000000000 --- a/kubernetes/talos-flux/apps/observability/grafana/app/config/grafana.ini +++ /dev/null @@ -1,29 +0,0 @@ -;https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/ -[analytics] -check_for_updates = false -[auth.google] -enabled = true -allow_sign_up = true -allowed_domains = techtales.io -auth_url = https://accounts.google.com/o/oauth2/auth -scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email -token_url = https://accounts.google.com/o/oauth2/token -[date_formats] -use_browser_locale = true -[explore] -enabled = true -[log] -mode = console -level = info -[panels] -disable_sanitize_html = true -[paths] -data = /var/lib/grafana/ -logs = /var/log/grafana -plugins = /var/lib/grafana/plugins -provisioning = /etc/grafana/provisioning -[server] -domain = grafana.techtales.io -root_url = https://grafana.techtales.io -[users] -auto_assign_org_role = Admin diff --git a/kubernetes/talos-flux/apps/observability/grafana/app/helm-release.yaml b/kubernetes/talos-flux/apps/observability/grafana/app/helm-release.yaml index 592c4c32c..88f1a29d0 100644 --- a/kubernetes/talos-flux/apps/observability/grafana/app/helm-release.yaml +++ b/kubernetes/talos-flux/apps/observability/grafana/app/helm-release.yaml @@ -29,6 +29,10 @@ spec: env: TZ: ${SETTING_TZ} + GF_EXPLORE_ENABLED: "true" + GF_PANELS_DISABLE_SANITIZE_HTML: "true" + GF_DATE_FORMATS_USE_BROWSER_LOCALE: "true" + GF_LOG_LEVEL: info envFromSecrets: - name: grafana-env @@ -38,6 +42,19 @@ spec: userKey: USERNAME passwordKey: PASSWORD + grafana.ini: + server: + root_url: https://grafana.techtales.io + users: + auto_assign_org_role: Admin + auth.google: + enabled: true + allow_sign_up: true + allowed_domains: techtales.io + scopes: https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email + auth_url: https://accounts.google.com/o/oauth2/auth + token_url: https://accounts.google.com/o/oauth2/token + dashboards: default: # Ref: https://grafana.com/grafana/dashboards/11074 @@ -91,22 +108,17 @@ spec: createConfigmap: true extraConfigmapMounts: - name: grafana-contactpoints - mountPath: /etc/grafana/alerting/ + mountPath: /etc/grafana/alerting/contactpoints.yaml subPath: contactpoints.yaml configMap: grafana-contactpoints readOnly: true - name: grafana-datasources - mountPath: /etc/grafana/datasources/ + mountPath: /etc/grafana/datasources/datasources.yaml subPath: datasources.yaml configMap: grafana-datasources readOnly: true - - name: grafana-ini - mountPath: /etc/grafana/grafana.ini - subPath: grafana.ini - configMap: grafana-ini - readOnly: true - name: grafana-policies - mountPath: /etc/grafana/alerting/ + mountPath: /etc/grafana/alerting/policies.yaml subPath: policies.yaml configMap: grafana-policies readOnly: true diff --git a/kubernetes/talos-flux/apps/observability/grafana/app/kustomization.yaml b/kubernetes/talos-flux/apps/observability/grafana/app/kustomization.yaml index a03967a8f..1cf27d203 100644 --- a/kubernetes/talos-flux/apps/observability/grafana/app/kustomization.yaml +++ b/kubernetes/talos-flux/apps/observability/grafana/app/kustomization.yaml @@ -14,9 +14,6 @@ configMapGenerator: - name: grafana-datasources files: - datasources.yaml=config/datasources.yaml - - name: grafana-ini - files: - - grafana.ini=config/grafana.ini - name: grafana-policies files: - policies.yaml=config/policies.yaml