From 2a3fa0dd0626d7ead6e90feca382a6f85d711518 Mon Sep 17 00:00:00 2001 From: Andrey Kartashov Date: Mon, 18 Nov 2019 18:38:30 +0700 Subject: [PATCH] grafana: add persistence --- apps/system/grafana/templates/volume.yaml | 11 +++++++++++ apps/system/grafana/templates/volumeclaim.yaml | 12 ++++++++++++ apps/system/grafana/values.yaml | 4 ++++ 3 files changed, 27 insertions(+) create mode 100644 apps/system/grafana/templates/volume.yaml create mode 100644 apps/system/grafana/templates/volumeclaim.yaml diff --git a/apps/system/grafana/templates/volume.yaml b/apps/system/grafana/templates/volume.yaml new file mode 100644 index 0000000..bcc5dd0 --- /dev/null +++ b/apps/system/grafana/templates/volume.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: grafana +spec: + capacity: + storage: 1Gi + accessModes: + - ReadWriteOnce + hostPath: + path: /data/grafana diff --git a/apps/system/grafana/templates/volumeclaim.yaml b/apps/system/grafana/templates/volumeclaim.yaml new file mode 100644 index 0000000..e1a0b5b --- /dev/null +++ b/apps/system/grafana/templates/volumeclaim.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: grafana +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + volumeMode: Filesystem + volumeName: grafana diff --git a/apps/system/grafana/values.yaml b/apps/system/grafana/values.yaml index 6ffc319..b4df46e 100644 --- a/apps/system/grafana/values.yaml +++ b/apps/system/grafana/values.yaml @@ -17,6 +17,10 @@ grafana: - hosts: - grafana.gorilych.ru secretName: grafana-tls + persistence: + enabled: true + type: pvc + existingClaim: grafana grafana.ini: server: root_url: https://grafana.gorilych.ru