From 0328b6be56fe2f14e4147c30278f8ef07a303c53 Mon Sep 17 00:00:00 2001 From: Matt Bolt Date: Wed, 23 Sep 2020 17:50:25 -0400 Subject: [PATCH] Add PVC creation and options to values-thanos --- .../charts/thanos/templates/compact-pvc.yaml | 25 +++++++++++++++++++ cost-analyzer/charts/thanos/values.yaml | 1 + cost-analyzer/values-thanos.yaml | 4 +++ 3 files changed, 30 insertions(+) create mode 100644 cost-analyzer/charts/thanos/templates/compact-pvc.yaml diff --git a/cost-analyzer/charts/thanos/templates/compact-pvc.yaml b/cost-analyzer/charts/thanos/templates/compact-pvc.yaml new file mode 100644 index 000000000..31475a34a --- /dev/null +++ b/cost-analyzer/charts/thanos/templates/compact-pvc.yaml @@ -0,0 +1,25 @@ +{{- if .Values.compact.enabled }} +{{- if .Values.compact.dataVolume -}} +{{- if .Values.compact.dataVolume.persistentVolumeClaim -}} +{{- if .Values.compact.dataVolume.persistentVolumeClaim.claimName -}} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ .Values.compact.dataVolume.persistentVolumeClaim.claimName }} +spec: + accessModes: + - ReadWriteOnce + {{- if .Values.compact.dataVolume.persistentVolumeClaim.storageClass }} + storageClassName: {{ .Values.compact.dataVolume.persistentVolumeClaim.storageClass }} + {{ end }} + resources: + requests: + {{- if .Values.compact.dataVolume.persistentVolumeClaim.storage }} + storage: {{ .Values.compact.dataVolume.persistentVolumeClaim.storage }} + {{- else }} + storage: 100Gi + {{ end }} +{{- end -}} +{{- end -}} +{{- end -}} +{{- end -}} diff --git a/cost-analyzer/charts/thanos/values.yaml b/cost-analyzer/charts/thanos/values.yaml index 80baf5f61..8cf39aab9 100644 --- a/cost-analyzer/charts/thanos/values.yaml +++ b/cost-analyzer/charts/thanos/values.yaml @@ -362,6 +362,7 @@ compact: backend: {} # persistentVolumeClaim: # claimName: compact-data-volume + # storage: 100Gi # Extra labels for compact pod template labels: {} # cluster: example diff --git a/cost-analyzer/values-thanos.yaml b/cost-analyzer/values-thanos.yaml index d3c273863..b6007bca6 100644 --- a/cost-analyzer/values-thanos.yaml +++ b/cost-analyzer/values-thanos.yaml @@ -77,6 +77,10 @@ thanos: enabled: true compact: enabled: true + dataVolume: + persistentVolumeClaim: + claimName: compact-data-volume + storage: 100Gi # This secret name should match the sidecar configured secret name volume # in the prometheus.server.extraVolumes entry storeSecretName: kubecost-thanos