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