-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(grafana): move grafana.ini to hr #2765
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Quality Gate passedIssues Measures |
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports MegaLinter is graciously provided by OX Security |
--- HelmRelease: observability/grafana ConfigMap: observability/grafana
+++ HelmRelease: observability/grafana ConfigMap: observability/grafana
@@ -10,23 +10,33 @@
app.kubernetes.io/managed-by: Helm
data:
plugins: grafana-piechart-panel,grafana-worldmap-panel,grafana-clock-panel,grafana-github-datasource
grafana.ini: |
[analytics]
check_for_updates = true
+ [auth.google]
+ allow_sign_up = true
+ allowed_domains = techtales.io
+ auth_url = https://accounts.google.com/o/oauth2/auth
+ enabled = true
+ scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
+ token_url = https://accounts.google.com/o/oauth2/token
[grafana_net]
url = https://grafana.net
[log]
mode = console
[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
download_dashboards.sh: |
#!/usr/bin/env sh
set -euf
curl -skf \
--connect-timeout 60 \
--- HelmRelease: observability/grafana Deployment: observability/grafana
+++ HelmRelease: observability/grafana Deployment: observability/grafana
@@ -147,25 +147,21 @@
type: RuntimeDefault
volumeMounts:
- name: config
mountPath: /etc/grafana/grafana.ini
subPath: grafana.ini
- name: grafana-contactpoints
- mountPath: /etc/grafana/alerting/
+ mountPath: /etc/grafana/alerting/contactpoints.yaml
subPath: contactpoints.yaml
readOnly: true
- name: grafana-datasources
- mountPath: /etc/grafana/datasources/
+ mountPath: /etc/grafana/datasources/datasources.yaml
subPath: datasources.yaml
readOnly: true
- - name: grafana-ini
- mountPath: /etc/grafana/grafana.ini
- subPath: grafana.ini
- readOnly: true
- name: grafana-policies
- mountPath: /etc/grafana/alerting/
+ mountPath: /etc/grafana/alerting/policies.yaml
subPath: policies.yaml
readOnly: true
- name: storage
mountPath: /var/lib/grafana
- name: sc-dashboard-volume
mountPath: /tmp/dashboards
@@ -209,12 +205,20 @@
- name: GF_PATHS_LOGS
value: /var/log/grafana
- name: GF_PATHS_PLUGINS
value: /var/lib/grafana/plugins
- name: GF_PATHS_PROVISIONING
value: /etc/grafana/provisioning
+ - name: GF_DATE_FORMATS_USE_BROWSER_LOCALE
+ value: 'true'
+ - name: GF_EXPLORE_ENABLED
+ value: 'true'
+ - name: GF_LOG_LEVEL
+ value: info
+ - name: GF_PANELS_DISABLE_SANITIZE_HTML
+ value: 'true'
- name: TZ
value: ${SETTING_TZ}
envFrom:
- secretRef:
name: grafana-env
optional: false
@@ -236,15 +240,12 @@
- name: grafana-contactpoints
configMap:
name: grafana-contactpoints
- name: grafana-datasources
configMap:
name: grafana-datasources
- - name: grafana-ini
- configMap:
- name: grafana-ini
- name: grafana-policies
configMap:
name: grafana-policies
- name: dashboards-default
configMap:
name: grafana-dashboards-default |
--- kubernetes/talos-flux/apps/observability/grafana/app Kustomization: flux-system/apps-grafana HelmRelease: observability/grafana
+++ kubernetes/talos-flux/apps/observability/grafana/app Kustomization: flux-system/apps-grafana HelmRelease: observability/grafana
@@ -37,36 +37,47 @@
default:
Node Exporter for Prometheus Dashboard:
datasource: Prometheus
gnetId: 11074
revision: 9
env:
+ GF_DATE_FORMATS_USE_BROWSER_LOCALE: 'true'
+ GF_EXPLORE_ENABLED: 'true'
+ GF_LOG_LEVEL: info
+ GF_PANELS_DISABLE_SANITIZE_HTML: 'true'
TZ: ${SETTING_TZ}
envFromSecrets:
- name: grafana-env
extraConfigmapMounts:
- configMap: grafana-contactpoints
- mountPath: /etc/grafana/alerting/
+ mountPath: /etc/grafana/alerting/contactpoints.yaml
name: grafana-contactpoints
readOnly: true
subPath: contactpoints.yaml
- configMap: grafana-datasources
- mountPath: /etc/grafana/datasources/
+ mountPath: /etc/grafana/datasources/datasources.yaml
name: grafana-datasources
readOnly: true
subPath: datasources.yaml
- - configMap: grafana-ini
- mountPath: /etc/grafana/grafana.ini
- name: grafana-ini
- readOnly: true
- subPath: grafana.ini
- configMap: grafana-policies
- mountPath: /etc/grafana/alerting/
+ mountPath: /etc/grafana/alerting/policies.yaml
name: grafana-policies
readOnly: true
subPath: policies.yaml
+ grafana.ini:
+ auth.google:
+ allow_sign_up: true
+ allowed_domains: techtales.io
+ auth_url: https://accounts.google.com/o/oauth2/auth
+ enabled: true
+ scopes: https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
+ token_url: https://accounts.google.com/o/oauth2/token
+ server:
+ root_url: https://grafana.techtales.io
+ users:
+ auto_assign_org_role: Admin
ingress:
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production
external-dns.alpha.kubernetes.io/target: ${SECRET_CLOUDFLARE_TUNNEL_ID}.cfargotunnel.com
hajimari.io/enable: 'true'
hajimari.io/icon: simple-icons:grafana
--- kubernetes/talos-flux/apps/observability/grafana/app Kustomization: flux-system/apps-grafana ConfigMap: observability/grafana-ini
+++ kubernetes/talos-flux/apps/observability/grafana/app Kustomization: flux-system/apps-grafana ConfigMap: observability/grafana-ini
@@ -1,45 +0,0 @@
----
-apiVersion: v1
-data:
- grafana.ini: |
- ;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
-kind: ConfigMap
-metadata:
- annotations:
- kustomize.toolkit.fluxcd.io/substitute: disabled
- labels:
- app.kubernetes.io/instance: grafana
- app.kubernetes.io/name: grafana
- kustomize.toolkit.fluxcd.io/name: apps-grafana
- kustomize.toolkit.fluxcd.io/namespace: flux-system
- name: grafana-ini
- namespace: observability
- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.