mirror of
https://github.com/bitnami/charts.git
synced 2026-02-27 15:37:06 +08:00
[bitnami/thanos] Fine-granted checksum calculation for deployment re-trigger (#24014)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de> Signed-off-by: Miguel Ruiz <miruiz@vmware.com> Co-authored-by: Miguel Ruiz <miruiz@vmware.com>
This commit is contained in:
@@ -35,4 +35,4 @@ maintainers:
|
||||
name: thanos
|
||||
sources:
|
||||
- https://github.com/bitnami/charts/tree/main/bitnami/thanos
|
||||
version: 14.0.0
|
||||
version: 14.0.1
|
||||
|
||||
@@ -119,6 +119,62 @@ Return true if a secret object should be created
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the object store config
|
||||
*/}}
|
||||
{{- define "thanos.objstoreConfig" -}}
|
||||
objstore.yml: |-
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.objstoreConfig "context" $) | b64enc | nindent 2 }}
|
||||
{{- if .Values.indexCacheConfig }}
|
||||
index-cache.yml: |-
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.indexCacheConfig "context" $) | b64enc | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- if .Values.bucketCacheConfig }}
|
||||
bucket-cache.yml: |-
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.bucketCacheConfig "context" $) | b64enc | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the storegateway config
|
||||
*/}}
|
||||
{{- define "thanos.storegatewayConfigMap" -}}
|
||||
config.yml: |-
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.storegateway.config "context" $) | nindent 2 }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the ruler config
|
||||
*/}}
|
||||
{{- define "thanos.rulerConfigMap" -}}
|
||||
ruler.yml: |-
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.ruler.config "context" $) | nindent 2 }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the receive config
|
||||
*/}}
|
||||
{{- define "thanos.receiveConfigMap" -}}
|
||||
hashrings.json: |-
|
||||
{{- include "common.tplvalues.render" (dict "value" (include "thanos.receive.config" .) "context" .) | nindent 2 }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the query config
|
||||
*/}}
|
||||
{{- define "thanos.querySDConfigMap" -}}
|
||||
servicediscovery.yml: |-
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.query.sdConfig "context" $) | nindent 2 }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the query frontend config
|
||||
*/}}
|
||||
{{- define "thanos.queryFrontendConfigMap" -}}
|
||||
config.yml: |-
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.queryFrontend.config "context" $) | nindent 2 }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the Thanos HTTPS and basic auth configuration secret.
|
||||
*/}}
|
||||
|
||||
@@ -31,7 +31,7 @@ spec:
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
||||
app.kubernetes.io/component: bucketweb
|
||||
annotations:
|
||||
checksum/objstore-configuration: {{ include (print $.Template.BasePath "/objstore-secret.yaml") . | sha256sum }}
|
||||
checksum/objstore-configuration: {{ include "thanos.objstoreConfig" . | sha256sum }}
|
||||
{{- if .Values.bucketweb.podAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -14,7 +14,7 @@ metadata:
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: compactor
|
||||
annotations:
|
||||
checksum/objstore-configuration: {{ include (print $.Template.BasePath "/objstore-secret.yaml") . | sha256sum }}
|
||||
checksum/objstore-configuration: {{ include "thanos.objstoreConfig" . | sha256sum }}
|
||||
{{- if .Values.compactor.podAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.compactor.podAnnotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -11,14 +11,5 @@ metadata:
|
||||
namespace: {{ include "common.names.namespace" . }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
data:
|
||||
objstore.yml: |-
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.objstoreConfig "context" $) | b64enc | nindent 4 }}
|
||||
{{- if .Values.indexCacheConfig }}
|
||||
index-cache.yml: |-
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.indexCacheConfig "context" $) | b64enc | nindent 4 }}
|
||||
{{- include "thanos.objstoreConfig" . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- if .Values.bucketCacheConfig }}
|
||||
bucket-cache.yml: |-
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.bucketCacheConfig "context" $) | b64enc | nindent 4 }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -15,6 +15,5 @@ metadata:
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
config.yml: |-
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.queryFrontend.config "context" $) | nindent 4 }}
|
||||
{{- include "thanos.queryFrontendConfigMap" . | nindent 2 }}
|
||||
{{ end }}
|
||||
|
||||
@@ -33,7 +33,7 @@ spec:
|
||||
{{- if or .Values.queryFrontend.podAnnotations (include "thanos.queryFrontend.createConfigmap" .) }}
|
||||
annotations:
|
||||
{{- if (include "thanos.queryFrontend.createConfigmap" .) }}
|
||||
checksum/query-frontend-configuration: {{ include (print $.Template.BasePath "/query-frontend/configmap.yaml") . | sha256sum }}
|
||||
checksum/query-frontend-configuration: {{ include "thanos.queryFrontendConfigMap" . | sha256sum }}
|
||||
{{- end }}
|
||||
{{- if .Values.queryFrontend.podAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.queryFrontend.podAnnotations "context" $) | nindent 8 }}
|
||||
|
||||
@@ -33,7 +33,7 @@ spec:
|
||||
{{- if or (include "thanos.query.createSDConfigmap" .) .Values.query.existingSDConfigmap .Values.query.podAnnotations }}
|
||||
annotations:
|
||||
{{- if or (include "thanos.query.createSDConfigmap" .) .Values.query.existingSDConfigmap }}
|
||||
checksum/ruler-configuration: {{ include (print $.Template.BasePath "/query/sd-configmap.yaml") . | sha256sum }}
|
||||
checksum/ruler-configuration: {{ include "thanos.querySDConfigMap" . | sha256sum }}
|
||||
{{- end }}
|
||||
{{- if .Values.query.podAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.query.podAnnotations "context" $) | nindent 8 }}
|
||||
|
||||
@@ -15,6 +15,5 @@ metadata:
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
servicediscovery.yml: |-
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.query.sdConfig "context" $) | nindent 4 }}
|
||||
{{- include "thanos.querySDConfigMap" . | nindent 2 }}
|
||||
{{ end }}
|
||||
|
||||
@@ -31,9 +31,9 @@ spec:
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
||||
app.kubernetes.io/component: receive-distributor
|
||||
annotations:
|
||||
checksum/objstore-configuration: {{ include (print $.Template.BasePath "/objstore-secret.yaml") . | sha256sum }}
|
||||
checksum/objstore-configuration: {{ include "thanos.objstoreConfig" . | sha256sum }}
|
||||
{{- if (include "thanos.receive.createConfigmap" .) }}
|
||||
checksum/receive-configuration: {{ include (print $.Template.BasePath "/receive/configmap.yaml") . | sha256sum }}
|
||||
checksum/receive-configuration: {{ include "thanos.receiveConfigMap" . | sha256sum }}
|
||||
{{- end }}
|
||||
{{- if .Values.receiveDistributor.podAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.receiveDistributor.podAnnotations "context" $) | nindent 8 }}
|
||||
|
||||
@@ -15,6 +15,5 @@ metadata:
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
hashrings.json: |-
|
||||
{{- include "common.tplvalues.render" (dict "value" (include "thanos.receive.config" .) "context" .) | nindent 4 }}
|
||||
{{- include "thanos.receiveConfigMap" . | nindent 2 }}
|
||||
{{ end }}
|
||||
|
||||
@@ -37,9 +37,9 @@ spec:
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
||||
app.kubernetes.io/component: receive
|
||||
annotations:
|
||||
checksum/objstore-configuration: {{ include (print $.Template.BasePath "/objstore-secret.yaml") . | sha256sum }}
|
||||
checksum/objstore-configuration: {{ include "thanos.objstoreConfig" . | sha256sum }}
|
||||
{{- if (include "thanos.receive.createConfigmap" .) }}
|
||||
checksum/receive-configuration: {{ include (print $.Template.BasePath "/receive/configmap.yaml") . | sha256sum }}
|
||||
checksum/receive-configuration: {{ include "thanos.receiveConfigMap" . | sha256sum }}
|
||||
{{- end }}
|
||||
{{- if .Values.receive.podAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.receive.podAnnotations "context" $) | nindent 8 }}
|
||||
|
||||
@@ -15,6 +15,5 @@ metadata:
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
ruler.yml: |-
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.ruler.config "context" $) | nindent 4 }}
|
||||
{{- include "thanos.rulerConfigMap" . | nindent 2 }}
|
||||
{{ end }}
|
||||
|
||||
@@ -33,8 +33,8 @@ spec:
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
||||
app.kubernetes.io/component: ruler
|
||||
annotations:
|
||||
checksum/objstore-configuration: {{ include (print $.Template.BasePath "/objstore-secret.yaml") . | sha256sum }}
|
||||
checksum/ruler-configuration: {{ include (print $.Template.BasePath "/ruler/configmap.yaml") . | sha256sum }}
|
||||
checksum/objstore-configuration: {{ include "thanos.objstoreConfig" . | sha256sum }}
|
||||
checksum/ruler-configuration: {{ include "thanos.rulerConfigMap" . | sha256sum }}
|
||||
{{- if .Values.ruler.podAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.ruler.podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -15,6 +15,5 @@ metadata:
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
config.yml: |-
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.storegateway.config "context" $) | nindent 4 }}
|
||||
{{ end }}
|
||||
{{- include "thanos.storegatewayConfigMap" . | nindent 2 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -50,9 +50,9 @@ spec:
|
||||
app.kubernetes.io/component: storegateway
|
||||
shard: {{ $index | quote }}
|
||||
annotations:
|
||||
checksum/objstore-configuration: {{ include (print $.Template.BasePath "/objstore-secret.yaml") $ | sha256sum }}
|
||||
checksum/objstore-configuration: {{ include "thanos.objstoreConfig" . | sha256sum }}
|
||||
{{- if (include "thanos.storegateway.createConfigmap" $) }}
|
||||
checksum/storegateway-configuration: {{ include (print $.Template.BasePath "/storegateway/configmap.yaml") $ | sha256sum }}
|
||||
checksum/storegateway-configuration: {{ include "thanos.storegatewayConfigMap" . | sha256sum }}
|
||||
{{- end }}
|
||||
{{- if $.Values.storegateway.podAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" $.Values.storegateway.podAnnotations "context" $) | nindent 8 }}
|
||||
|
||||
@@ -33,9 +33,9 @@ spec:
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
||||
app.kubernetes.io/component: storegateway
|
||||
annotations:
|
||||
checksum/objstore-configuration: {{ include (print $.Template.BasePath "/objstore-secret.yaml") . | sha256sum }}
|
||||
checksum/objstore-configuration: {{ include "thanos.objstoreConfig" . | sha256sum }}
|
||||
{{- if (include "thanos.storegateway.createConfigmap" .) }}
|
||||
checksum/storegateway-configuration: {{ include (print $.Template.BasePath "/storegateway/configmap.yaml") . | sha256sum }}
|
||||
checksum/storegateway-configuration: {{ include "thanos.storegatewayConfigMap" . | sha256sum }}
|
||||
{{- end }}
|
||||
{{- if .Values.storegateway.podAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.storegateway.podAnnotations "context" $) | nindent 8 }}
|
||||
|
||||
Reference in New Issue
Block a user