grafana: deploy Grafana instance, datasource and dashboards
Deploys Grafana in the observability project via the grafana-operator, mirroring the puppet Grafana but modernised: CNPG for state and Authentik OIDC for auth. Ports the live datasource + dashboards in as CRs. Changes (apps/base/grafana): - CNPG postgres Cluster + rw Pooler (db grafana), plus VaultAuth + VaultStaticSecrets pulling postgres/oauth credentials from Vault. - Grafana CR: postgres backend via the pooler, Authentik generic_oauth (client id/secret from the Vault-synced secret, openid/email/profile scopes, group->role mapping), root_url grafana.k8s.syd1.au.unkin.net. - Single GrafanaDatasource (k8s VictoriaMetrics via the operator vmselect service); reuses the previous default datasource uid so imported dashboards resolve without edits. - 13 GrafanaDashboards (gzipJson) exported from the current grafana. - Gateway API (traefik-internal) + HTTPRoute for grafana.k8s.syd1.au.unkin.net. - Register apps/overlays/*/grafana in the observability ApplicationSet and add the grafana namespace to the project destinations.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
---
|
||||
apiVersion: secrets.hashicorp.com/v1beta1
|
||||
kind: VaultStaticSecret
|
||||
metadata:
|
||||
name: postgres-credentials
|
||||
namespace: grafana
|
||||
spec:
|
||||
destination:
|
||||
create: true
|
||||
name: postgres-credentials
|
||||
overwrite: true
|
||||
hmacSecretData: true
|
||||
mount: kv
|
||||
path: kubernetes/namespace/grafana/default/postgres-credentials
|
||||
refreshAfter: 5m
|
||||
type: kv-v2
|
||||
vaultAuthRef: default
|
||||
---
|
||||
apiVersion: secrets.hashicorp.com/v1beta1
|
||||
kind: VaultStaticSecret
|
||||
metadata:
|
||||
name: oauth-credentials
|
||||
namespace: grafana
|
||||
spec:
|
||||
destination:
|
||||
create: true
|
||||
name: oauth-credentials
|
||||
overwrite: true
|
||||
hmacSecretData: true
|
||||
mount: kv
|
||||
path: kubernetes/namespace/grafana/default/oauth-credentials
|
||||
refreshAfter: 5m
|
||||
type: kv-v2
|
||||
vaultAuthRef: default
|
||||
Reference in New Issue
Block a user