Loading charts/thanos/templates/_helpers.tpl +33 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,39 @@ app.kubernetes.io/part-of: thanos {{- end }} {{- end -}} {{- /* Resolve the object store secret name with legacy compatibility. The legacy Bitnami-based deployment used `existingObjstoreSecret`. */ -}} {{- define "thanos.objstore.secretName" -}} {{- if .Values.existingObjstoreSecret -}} {{- .Values.existingObjstoreSecret -}} {{- else -}} {{- .Values.global.objstore.secretName -}} {{- end -}} {{- end -}} {{- /* Render a storageClassName field with legacy global fallback compatibility. Old Bitnami behavior used `global.storageClass` as an override across components. Also supports "-" to force empty storageClassName. Usage: {{ include "thanos.persistence.storageClassField" (dict "root" . "storageClass" .Values.compactor.persistence.storageClass) }} */ -}} {{- define "thanos.persistence.storageClassField" -}} {{- $storageClass := .storageClass -}} {{- if .root.Values.global.storageClass -}} {{- $storageClass = .root.Values.global.storageClass -}} {{- end -}} {{- if $storageClass -}} {{- if eq (toString $storageClass) "-" -}} storageClassName: "" {{- else -}} storageClassName: {{ $storageClass | quote }} {{- end -}} {{- end -}} {{- end -}} {{- define "thanos.annotations" -}} {{- $component := .component -}} Loading charts/thanos/templates/bucket/deployment.yaml +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ spec: volumes: - name: objstore secret: secretName: {{ .Values.global.objstore.secretName }} secretName: {{ include "thanos.objstore.secretName" $ctx }} items: - key: {{ .Values.global.objstore.secretKey }} path: objstore.yml Loading charts/thanos/templates/bucket/secret-objstore.yaml +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ .Values.global.objstore.secretName }} name: {{ include "thanos.objstore.secretName" . }} labels: {{- include "thanos.labels" . | nindent 4 }} annotations: Loading charts/thanos/templates/compactor/statefulset.yaml +2 −4 Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ spec: volumes: - name: objstore secret: secretName: {{ .Values.global.objstore.secretName }} secretName: {{ include "thanos.objstore.secretName" . }} items: - key: {{ .Values.global.objstore.secretKey }} path: objstore.yml Loading @@ -105,9 +105,7 @@ spec: {{- range .Values.compactor.persistence.accessModes | default (list "ReadWriteOnce") }} - {{ . | quote }} {{- end }} {{- if .Values.compactor.persistence.storageClass }} storageClassName: {{ .Values.compactor.persistence.storageClass }} {{- end }} {{- include "thanos.persistence.storageClassField" (dict "root" . "storageClass" .Values.compactor.persistence.storageClass) | nindent 8 }} resources: requests: storage: {{ .Values.compactor.persistence.size }} Loading charts/thanos/templates/receive/statefulset.yaml +2 −4 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ spec: projected: sources: - secret: name: {{ .Values.global.objstore.secretName }} name: {{ include "thanos.objstore.secretName" . }} items: - key: {{ .Values.global.objstore.secretKey }} path: objstore.yml Loading @@ -142,9 +142,7 @@ spec: name: data spec: accessModes: ["ReadWriteOnce"] {{- if $cfg.persistence.storageClass }} storageClassName: {{ $cfg.persistence.storageClass }} {{- end }} {{- include "thanos.persistence.storageClassField" (dict "root" . "storageClass" $cfg.persistence.storageClass) | nindent 8 }} resources: requests: storage: {{ $cfg.persistence.size }} Loading Loading
charts/thanos/templates/_helpers.tpl +33 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,39 @@ app.kubernetes.io/part-of: thanos {{- end }} {{- end -}} {{- /* Resolve the object store secret name with legacy compatibility. The legacy Bitnami-based deployment used `existingObjstoreSecret`. */ -}} {{- define "thanos.objstore.secretName" -}} {{- if .Values.existingObjstoreSecret -}} {{- .Values.existingObjstoreSecret -}} {{- else -}} {{- .Values.global.objstore.secretName -}} {{- end -}} {{- end -}} {{- /* Render a storageClassName field with legacy global fallback compatibility. Old Bitnami behavior used `global.storageClass` as an override across components. Also supports "-" to force empty storageClassName. Usage: {{ include "thanos.persistence.storageClassField" (dict "root" . "storageClass" .Values.compactor.persistence.storageClass) }} */ -}} {{- define "thanos.persistence.storageClassField" -}} {{- $storageClass := .storageClass -}} {{- if .root.Values.global.storageClass -}} {{- $storageClass = .root.Values.global.storageClass -}} {{- end -}} {{- if $storageClass -}} {{- if eq (toString $storageClass) "-" -}} storageClassName: "" {{- else -}} storageClassName: {{ $storageClass | quote }} {{- end -}} {{- end -}} {{- end -}} {{- define "thanos.annotations" -}} {{- $component := .component -}} Loading
charts/thanos/templates/bucket/deployment.yaml +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ spec: volumes: - name: objstore secret: secretName: {{ .Values.global.objstore.secretName }} secretName: {{ include "thanos.objstore.secretName" $ctx }} items: - key: {{ .Values.global.objstore.secretKey }} path: objstore.yml Loading
charts/thanos/templates/bucket/secret-objstore.yaml +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ .Values.global.objstore.secretName }} name: {{ include "thanos.objstore.secretName" . }} labels: {{- include "thanos.labels" . | nindent 4 }} annotations: Loading
charts/thanos/templates/compactor/statefulset.yaml +2 −4 Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ spec: volumes: - name: objstore secret: secretName: {{ .Values.global.objstore.secretName }} secretName: {{ include "thanos.objstore.secretName" . }} items: - key: {{ .Values.global.objstore.secretKey }} path: objstore.yml Loading @@ -105,9 +105,7 @@ spec: {{- range .Values.compactor.persistence.accessModes | default (list "ReadWriteOnce") }} - {{ . | quote }} {{- end }} {{- if .Values.compactor.persistence.storageClass }} storageClassName: {{ .Values.compactor.persistence.storageClass }} {{- end }} {{- include "thanos.persistence.storageClassField" (dict "root" . "storageClass" .Values.compactor.persistence.storageClass) | nindent 8 }} resources: requests: storage: {{ .Values.compactor.persistence.size }} Loading
charts/thanos/templates/receive/statefulset.yaml +2 −4 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ spec: projected: sources: - secret: name: {{ .Values.global.objstore.secretName }} name: {{ include "thanos.objstore.secretName" . }} items: - key: {{ .Values.global.objstore.secretKey }} path: objstore.yml Loading @@ -142,9 +142,7 @@ spec: name: data spec: accessModes: ["ReadWriteOnce"] {{- if $cfg.persistence.storageClass }} storageClassName: {{ $cfg.persistence.storageClass }} {{- end }} {{- include "thanos.persistence.storageClassField" (dict "root" . "storageClass" $cfg.persistence.storageClass) | nindent 8 }} resources: requests: storage: {{ $cfg.persistence.size }} Loading