From ead0f9ddf5af6af37c4e738d7e07e9cf70d0c59a Mon Sep 17 00:00:00 2001 From: Bartek Grzybowski Date: Tue, 15 Jun 2021 14:12:05 +0200 Subject: [ANSIBLE] Setup persistent volume for Grafana dashboards Change-Id: Ifb45abae0c8a7716addbd62d340423f1c1e44c03 Issue-ID: INT-1926 Signed-off-by: Bartek Grzybowski --- ansible/roles/k8s-persistent-volume/defaults/main.yml | 7 +++++-- ansible/roles/kube-prometheus-stack/defaults/main.yml | 9 ++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'ansible/roles') diff --git a/ansible/roles/k8s-persistent-volume/defaults/main.yml b/ansible/roles/k8s-persistent-volume/defaults/main.yml index d1a2b69c..de387323 100644 --- a/ansible/roles/k8s-persistent-volume/defaults/main.yml +++ b/ansible/roles/k8s-persistent-volume/defaults/main.yml @@ -1,7 +1,10 @@ --- k8s_volumes: - - name: kube-prometheus + - name: kube-prometheus-prometheus capacity: "6Gi" - path_prefix: "{{ nfs_mount_path }}" + path_prefix: "{{ nfs_mount_path }}/kube-prometheus" owner: 1000 # derived from prometheus.prometheusSpec.securityContext.runAsUser group: 2000 # derived from prometheus.prometheusSpec.securityContext.fsGroup + - name: kube-prometheus-grafana + capacity: "4Gi" + path_prefix: "{{ nfs_mount_path }}/kube-prometheus" diff --git a/ansible/roles/kube-prometheus-stack/defaults/main.yml b/ansible/roles/kube-prometheus-stack/defaults/main.yml index f84fd0a0..d6b49d47 100644 --- a/ansible/roles/kube-prometheus-stack/defaults/main.yml +++ b/ansible/roles/kube-prometheus-stack/defaults/main.yml @@ -7,6 +7,13 @@ kube_prometheus_stack: helm_values: grafana: adminPassword: admin + persistence: + type: pvc + enabled: true + storageClassName: kube-prometheus-grafana + accessModes: + - ReadWriteOnce + size: 4Gi prometheus: prometheusSpec: scrapeInterval: 60s @@ -14,7 +21,7 @@ kube_prometheus_stack: disableMountSubPath: true volumeClaimTemplate: spec: - storageClassName: kube-prometheus + storageClassName: kube-prometheus-prometheus accessModes: ["ReadWriteOnce"] resources: requests: -- cgit 1.2.3-korg