migrate grafana to new passmower and external db

This commit is contained in:
Erki Aas 2024-07-27 23:08:29 +03:00
parent ba520da57e
commit f0b78f7b17

View File

@ -1,6 +1,6 @@
--- ---
apiVersion: codemowers.io/v1alpha1 apiVersion: codemowers.cloud/v1beta1
kind: OIDCGWClient kind: OIDCClient
metadata: metadata:
name: grafana name: grafana
spec: spec:
@ -31,6 +31,8 @@ data:
[server] [server]
domain = grafana.k-space.ee domain = grafana.k-space.ee
root_url = https://%(domain)s/ root_url = https://%(domain)s/
[auth]
oauth_allow_insecure_email_lookup=true
[auth.generic_oauth] [auth.generic_oauth]
name = OAuth name = OAuth
icon = signin icon = signin
@ -73,7 +75,7 @@ spec:
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: oidc-client-grafana-owner-secrets name: oidc-client-grafana-owner-secrets
key: OIDC_GATEWAY_URI key: OIDC_IDP_URI
- name: GF_AUTH_GENERIC_OAUTH_CLIENT_ID - name: GF_AUTH_GENERIC_OAUTH_CLIENT_ID
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
@ -93,17 +95,32 @@ spec:
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: oidc-client-grafana-owner-secrets name: oidc-client-grafana-owner-secrets
key: OIDC_GATEWAY_AUTH_URI key: OIDC_IDP_AUTH_URI
- name: GF_AUTH_GENERIC_OAUTH_TOKEN_URL - name: GF_AUTH_GENERIC_OAUTH_TOKEN_URL
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: oidc-client-grafana-owner-secrets name: oidc-client-grafana-owner-secrets
key: OIDC_GATEWAY_TOKEN_URI key: OIDC_IDP_TOKEN_URI
- name: GF_AUTH_GENERIC_OAUTH_API_URL - name: GF_AUTH_GENERIC_OAUTH_API_URL
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: oidc-client-grafana-owner-secrets name: oidc-client-grafana-owner-secrets
key: OIDC_GATEWAY_USERINFO_URI key: OIDC_IDP_USERINFO_URI
- name: GF_DATABASE_TYPE
value: mysql
- name: GF_DATABASE_HOST
value: 172.20.36.1:3306
- name: GF_DATABASE_SSL_MODE
value: disable
- name: GF_DATABASE_NAME
value: kspace_grafana
- name: GF_DATABASE_USER
value: kspace_grafana
- name: GF_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: grafana-database
key: password
ports: ports:
- containerPort: 3000 - containerPort: 3000
name: http-grafana name: http-grafana