From 301785dc46b7b9c9ac2c5996cb6e685268ba1e1a Mon Sep 17 00:00:00 2001 From: Carlos de Paula Date: Tue, 23 Jun 2020 18:06:39 -0300 Subject: [PATCH] Add sample PVs and improve Readme --- Readme.md | 2 ++ samples/sample-pv-grafana.yaml | 14 ++++++++++++++ samples/sample-pv-prometheus.yaml | 14 ++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 samples/sample-pv-grafana.yaml create mode 100644 samples/sample-pv-prometheus.yaml diff --git a/Readme.md b/Readme.md index a8860b1..d1c3222 100644 --- a/Readme.md +++ b/Readme.md @@ -38,6 +38,8 @@ The ingresses can use TLS with the default self-signed certificate from your Ing Persistence for Prometheus and Grafana can be enabled in the `enablePersistence` section. Setting each to `true`, creates the volume PVCs. If no PV names are defined in `prometheusPV` and `grafanaPV`, the default StorageClass will be used to dynamically create the PVs The sizes can be adjusted in `prometheusSizePV` and `grafanaSizePV`. +If using pre-created persistent volumes (samples in [`samples`](samples)), check permissions on the directories hosting the files. The `UID:GID` for Prometheus is `1000:0` and for Grafana is `472:472`. + Changing these parameters require a rebuild of the manifests with `make` followed by `make deploy`. To avoid installing all pre-requisites like Golang, Jsonnet, Jsonnet-bundler, use the target `make docker` to build in a container. ## Quickstart (non K3s) diff --git a/samples/sample-pv-grafana.yaml b/samples/sample-pv-grafana.yaml new file mode 100644 index 0000000..7d8235c --- /dev/null +++ b/samples/sample-pv-grafana.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: grafana + labels: + type: local +spec: + capacity: + storage: 1Gi + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + hostPath: + path: "/data/k3s-storage/grafana/" diff --git a/samples/sample-pv-prometheus.yaml b/samples/sample-pv-prometheus.yaml new file mode 100644 index 0000000..d32da65 --- /dev/null +++ b/samples/sample-pv-prometheus.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: prometheus + labels: + type: local +spec: + capacity: + storage: 2Gi + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + hostPath: + path: "/data/k3s-storage/prometheus/"