From 3adedd8bfcc78e6ed39534d556adf4cc4c3ca39e Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Wed, 8 Nov 2023 19:35:20 +0100 Subject: [PATCH] Create pvs manually --- argocd/prometheus/templates/pv.yaml | 21 +++++++++++++++++++++ argocd/prometheus/test/argocd_values.yaml | 6 ++++++ argocd/prometheus/values.yaml | 9 ++++++++- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 argocd/prometheus/templates/pv.yaml diff --git a/argocd/prometheus/templates/pv.yaml b/argocd/prometheus/templates/pv.yaml new file mode 100644 index 0000000..c9b3dda --- /dev/null +++ b/argocd/prometheus/templates/pv.yaml @@ -0,0 +1,21 @@ +{{- range $index, $e := until .Values.prometheus.replicas }} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: {{ .Release.Name }}-prometheus-pv-{{ $index }} + annotations: + argocd.argoproj.io/sync-wave: "-10" +spec: + storageClassName: {{ .Values.storage.className }} + capacity: + storage: {{ .Values.storage.capacity }} + accessModes: + - ReadWriteOnce + claimRef: + namespace: {{ .Release.Namespace }} + name: {{ .Release.Name }}-prometheus-kube-prometheus-prometheus-db-prometheus-prometheus-kube-prometheus-prometheus-{{ $index }} + csi: + driver: csi.hetzner.cloud + volumeHandle: {{ index .Values.storage.handles $index }} + fsType: ext4 +{{- end }} \ No newline at end of file diff --git a/argocd/prometheus/test/argocd_values.yaml b/argocd/prometheus/test/argocd_values.yaml index 8ec988f..766c3f5 100644 --- a/argocd/prometheus/test/argocd_values.yaml +++ b/argocd/prometheus/test/argocd_values.yaml @@ -17,6 +17,7 @@ kube-prometheus-stack: prometheus: prometheusSpec: + replicas: &replicas 1 retention: 6h disableCompaction: true storageSpec: @@ -63,3 +64,8 @@ kube-prometheus-stack: kubeScheduler: endpoints: - 10.0.0.4 +prometheus: + replicas: *replicas +storage: + handles: + - 100068485 \ No newline at end of file diff --git a/argocd/prometheus/values.yaml b/argocd/prometheus/values.yaml index 0ac0162..7a06e01 100644 --- a/argocd/prometheus/values.yaml +++ b/argocd/prometheus/values.yaml @@ -1,4 +1,11 @@ vault: enabled: false applicationName: "" - operatorNamespace: "" \ No newline at end of file + operatorNamespace: "" +prometheus: + # must match the value provided to prometheusSpec of kube-prometheus-stack + replicas: 1 +storage: + capacity: 10Gi + className: hcloud-volumes + handles: [] \ No newline at end of file