From d4338d1cdbac47a2ae6b27a1f99bc8f77e5f9ac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Huss?= Date: Wed, 24 Jan 2024 16:49:51 +0100 Subject: [PATCH] fix --- monitor/grafana/config.tf | 1 + monitor/grafana/datas.tf | 14 +++++++- monitor/grafana/index.yaml | 72 +++++++++++++++++++------------------- 3 files changed, 50 insertions(+), 37 deletions(-) diff --git a/monitor/grafana/config.tf b/monitor/grafana/config.tf index 83bf5d3..8f5fc4a 100644 --- a/monitor/grafana/config.tf +++ b/monitor/grafana/config.tf @@ -34,6 +34,7 @@ org_role = Viewer enabled = true name = vynil scopes = openid profile email +${var.issuer=="letsencrypt-prod"?"#":""}tls_client_ca = /etc/local-certs/ca.crt client_id = '${module.oauth2.client_id}' client_secret = '${module.oauth2.client_secret}' auth_url = '${module.oauth2.sso_authorize_url}' diff --git a/monitor/grafana/datas.tf b/monitor/grafana/datas.tf index 10db8d0..257b9f2 100644 --- a/monitor/grafana/datas.tf +++ b/monitor/grafana/datas.tf @@ -86,6 +86,18 @@ data "kustomization_overlay" "data" { name: grafana annotations: configmap.reloader.stakater.com/reload: "grafana" - EOF +spec: + template: + spec: + containers: + - name: grafana + volumeMounts: + - name: local-certs + mountPath: "/etc/local-certs" + volumes: + - name: local-certs + secret: + secretName: "${var.instance}-cert" + defaultMode: 0444 } } diff --git a/monitor/grafana/index.yaml b/monitor/grafana/index.yaml index ce5af4f..95e7059 100644 --- a/monitor/grafana/index.yaml +++ b/monitor/grafana/index.yaml @@ -6,11 +6,25 @@ metadata: name: grafana description: null options: - ingress-class: - default: traefik + volume: + default: + accessMode: ReadWriteOnce + size: 10Gi examples: - - traefik - type: string + - accessMode: ReadWriteOnce + size: 10Gi + properties: + accessMode: + default: ReadWriteOnce + enum: + - ReadWriteOnce + - ReadOnlyMany + - ReadWriteMany + type: string + size: + default: 10Gi + type: string + type: object app-group: default: monitor examples: @@ -21,6 +35,21 @@ options: examples: - grafana type: string + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + domain: + default: your-company + examples: + - your-company + type: string + admin_name: + default: grafana_admin + examples: + - grafana_admin + type: string images: default: busybox: @@ -118,40 +147,11 @@ options: type: string type: object type: object - admin_name: - default: grafana_admin + ingress-class: + default: traefik examples: - - grafana_admin + - traefik type: string - domain: - default: your-company - examples: - - your-company - type: string - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string - volume: - default: - accessMode: ReadWriteOnce - size: 10Gi - examples: - - accessMode: ReadWriteOnce - size: 10Gi - properties: - accessMode: - default: ReadWriteOnce - enum: - - ReadWriteOnce - - ReadOnlyMany - - ReadWriteMany - type: string - size: - default: 10Gi - type: string - type: object domain-name: default: your_company.com examples: