refactor!: move Grafana to platform

Grafana depends on secret created by ExternalSecret, with the values
pulled from Vault, causing circular dependency problem: system requires
platform components but platform requires system components.
This commit is contained in:
Khue Doan
2023-05-19 01:36:47 +07:00
parent 2bbabe1bf2
commit b1a716dae9
5 changed files with 39 additions and 30 deletions

View File

@@ -3,5 +3,5 @@ name: kube-prometheus-stack
version: 0.0.0
dependencies:
- name: kube-prometheus-stack
version: 43.1.4
version: 45.28.1
repository: https://prometheus-community.github.io/helm-charts

View File

@@ -1,16 +0,0 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: grafana-secrets
namespace: {{ .Release.Namespace }}
spec:
secretStoreRef:
kind: ClusterSecretStore
name: vault
target:
name: grafana-secrets
data:
- secretKey: GRAFANA_SSO_CLIENT_SECRET
remoteRef:
key: /dex/grafana
property: client_secret

View File

@@ -1,38 +1,12 @@
kube-prometheus-stack:
grafana:
adminPassword: null
ingress:
enabled: true
ingressClassName: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
hajimari.io/appName: Grafana
hajimari.io/icon: chart-bar
hosts:
- &host grafana.khuedoan.com
tls:
- secretName: grafana-general-tls
hosts:
- *host
enabled: false
forceDeployDatasources: true
forceDeployDashboards: true
additionalDataSources:
- name: Loki
type: loki
url: http://loki.loki:3100
envFromSecret: grafana-secrets
grafana.ini:
server:
root_url: https://grafana.khuedoan.com
auth.generic_oauth:
enabled: true
allow_sign_up: true
name: Dex
client_id: grafana-sso
client_secret: $__env{GRAFANA_SSO_CLIENT_SECRET}
scopes: openid profile email groups
auth_url: https://dex.khuedoan.com/auth
token_url: https://dex.khuedoan.com/token
api_url: https://dex.khuedoan.com/userinfo
prometheus:
prometheusSpec:
ruleSelectorNilUsesHelmValues: false