Files
charts/bitnami/thanos/templates/compactor/serviceaccount.yaml
corico44 2d6cc8fc2a [bitnami/thanos] Fix serviceAccount name logic for Thanos (#13406)
* [bitnami/thanos] Fix serviceAccount name logic

Signed-off-by: Cori Avila <amisericordi@vmware.com>

* [bitnami/thanos] Modified Chart version

Signed-off-by: Cori Avila <amisericordi@vmware.com>

* [bitnami/thanos] Modified the way of naming serviceAccount to use the standard format used in other charts

Signed-off-by: Cori Avila <amisericordi@vmware.com>

Signed-off-by: Cori Avila <amisericordi@vmware.com>
2022-11-08 14:19:14 +01:00

21 lines
1.1 KiB
YAML

{{- if and .Values.compactor.enabled .Values.compactor.serviceAccount.create (not (include "thanos.serviceAccount.useExisting" (dict "component" "compactor" "context" $))) }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "thanos.serviceAccountName" (dict "component" "compactor" "context" $) }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: compactor
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.compactor.serviceAccount.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.compactor.serviceAccount.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.compactor.serviceAccount.automountServiceAccountToken }}
{{- end }}