mirror of
https://github.com/bitnami/charts.git
synced 2026-03-09 15:38:00 +08:00
[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>
This commit is contained in:
@@ -28,4 +28,4 @@ name: thanos
|
||||
sources:
|
||||
- https://github.com/bitnami/containers/tree/main/bitnami/thanos
|
||||
- https://thanos.io
|
||||
version: 11.5.7
|
||||
version: 11.5.8
|
||||
|
||||
@@ -326,9 +326,9 @@ false
|
||||
|
||||
{{/* Service account name
|
||||
Usage:
|
||||
{{ include "thanos.serviceAccount.name" (dict "component" "bucketweb" "context" $) }}
|
||||
{{ include "thanos.serviceAccountName" (dict "component" "bucketweb" "context" $) }}
|
||||
*/}}
|
||||
{{- define "thanos.serviceAccount.name" -}}
|
||||
{{- define "thanos.serviceAccountName" -}}
|
||||
{{- $component := index .context.Values .component -}}
|
||||
{{- if eq .component "query-frontend" -}}
|
||||
{{- $component = index .context.Values "queryFrontend" -}}
|
||||
|
||||
@@ -39,7 +39,7 @@ spec:
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "thanos.imagePullSecrets" . | nindent 6 }}
|
||||
serviceAccount: {{ include "thanos.serviceAccount.name" (dict "component" "bucketweb" "context" $) }}
|
||||
serviceAccount: {{ include "thanos.serviceAccountName" (dict "component" "bucketweb" "context" $) }}
|
||||
automountServiceAccountToken: {{ .Values.bucketweb.automountServiceAccountToken }}
|
||||
{{- if .Values.bucketweb.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.hostAliases "context" $) | nindent 8 }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "thanos.serviceAccount.name" (dict "component" "bucketweb" "context" $) }}
|
||||
name: {{ include "thanos.serviceAccountName" (dict "component" "bucketweb" "context" $) }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: bucketweb
|
||||
|
||||
@@ -37,7 +37,7 @@ spec:
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "thanos.imagePullSecrets" . | nindent 6 }}
|
||||
serviceAccount: {{ include "thanos.serviceAccount.name" (dict "component" "compactor" "context" $) }}
|
||||
serviceAccount: {{ include "thanos.serviceAccountName" (dict "component" "compactor" "context" $) }}
|
||||
automountServiceAccountToken: {{ .Values.compactor.automountServiceAccountToken }}
|
||||
{{- if .Values.compactor.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.compactor.hostAliases "context" $) | nindent 8 }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "thanos.serviceAccount.name" (dict "component" "compactor" "context" $) }}
|
||||
name: {{ include "thanos.serviceAccountName" (dict "component" "compactor" "context" $) }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: compactor
|
||||
|
||||
@@ -44,7 +44,7 @@ spec:
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "thanos.imagePullSecrets" . | nindent 6 }}
|
||||
serviceAccount: {{ include "thanos.serviceAccount.name" (dict "component" "query-frontend" "context" $) }}
|
||||
serviceAccount: {{ include "thanos.serviceAccountName" (dict "component" "query-frontend" "context" $) }}
|
||||
automountServiceAccountToken: {{ .Values.queryFrontend.automountServiceAccountToken }}
|
||||
{{- if .Values.queryFrontend.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.queryFrontend.hostAliases "context" $) | nindent 8 }}
|
||||
|
||||
@@ -19,6 +19,6 @@ roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "thanos.serviceAccount.name" (dict "component" "query-frontend" "context" $) }}
|
||||
name: {{ include "thanos.serviceAccountName" (dict "component" "query-frontend" "context" $) }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
{{- end }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "thanos.serviceAccount.name" (dict "component" "query-frontend" "context" $) }}
|
||||
name: {{ include "thanos.serviceAccountName" (dict "component" "query-frontend" "context" $) }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: query-frontend
|
||||
|
||||
@@ -43,7 +43,7 @@ spec:
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "thanos.imagePullSecrets" . | nindent 6 }}
|
||||
serviceAccount: {{ include "thanos.serviceAccount.name" (dict "component" "query" "context" $) }}
|
||||
serviceAccount: {{ include "thanos.serviceAccountName" (dict "component" "query" "context" $) }}
|
||||
automountServiceAccountToken: {{ .Values.query.automountServiceAccountToken }}
|
||||
{{- if .Values.query.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.query.hostAliases "context" $) | nindent 8 }}
|
||||
|
||||
@@ -20,6 +20,6 @@ roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "thanos.serviceAccount.name" (dict "component" "query" "context" $) }}
|
||||
name: {{ include "thanos.serviceAccountName" (dict "component" "query" "context" $) }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
{{- end }}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "thanos.serviceAccount.name" (dict "component" "query" "context" $) }}
|
||||
name: {{ include "thanos.serviceAccountName" (dict "component" "query" "context" $) }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: query
|
||||
|
||||
@@ -42,7 +42,7 @@ spec:
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "thanos.imagePullSecrets" . | nindent 6 }}
|
||||
serviceAccount: {{ include "thanos.serviceAccount.name" (dict "component" "receive" "context" $) }}
|
||||
serviceAccount: {{ include "thanos.serviceAccountName" (dict "component" "receive" "context" $) }}
|
||||
automountServiceAccountToken: {{ .Values.receiveDistributor.automountServiceAccountToken }}
|
||||
{{- if .Values.receiveDistributor.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.receiveDistributor.hostAliases "context" $) | nindent 8 }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "thanos.serviceAccount.name" (dict "component" "receive-distributor" "context" $) }}
|
||||
name: {{ include "thanos.serviceAccountName" (dict "component" "receive-distributor" "context" $) }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: receive-distributor
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "thanos.serviceAccount.name" (dict "component" "receive" "context" $) }}
|
||||
name: {{ include "thanos.serviceAccountName" (dict "component" "receive" "context" $) }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: receive
|
||||
|
||||
@@ -44,7 +44,7 @@ spec:
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "thanos.imagePullSecrets" . | nindent 6 }}
|
||||
serviceAccount: {{ include "thanos.serviceAccount.name" (dict "component" "receive" "context" $) }}
|
||||
serviceAccount: {{ include "thanos.serviceAccountName" (dict "component" "receive" "context" $) }}
|
||||
automountServiceAccountToken: {{ .Values.receive.automountServiceAccountToken }}
|
||||
{{- if .Values.receive.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.receive.hostAliases "context" $) | nindent 8 }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "thanos.serviceAccount.name" (dict "component" "ruler" "context" $) }}
|
||||
name: {{ include "thanos.serviceAccountName" (dict "component" "ruler" "context" $) }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: ruler
|
||||
|
||||
@@ -43,7 +43,7 @@ spec:
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "thanos.imagePullSecrets" . | nindent 6 }}
|
||||
serviceAccount: {{ include "thanos.serviceAccount.name" (dict "component" "ruler" "context" $) }}
|
||||
serviceAccount: {{ include "thanos.serviceAccountName" (dict "component" "ruler" "context" $) }}
|
||||
automountServiceAccountToken: {{ .Values.ruler.automountServiceAccountToken }}
|
||||
{{- if .Values.ruler.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.ruler.hostAliases "context" $) | nindent 8 }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "thanos.serviceAccount.name" (dict "component" "storegateway" "context" $) }}
|
||||
name: {{ include "thanos.serviceAccountName" (dict "component" "storegateway" "context" $) }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: storegateway
|
||||
|
||||
@@ -59,7 +59,7 @@ spec:
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "thanos.imagePullSecrets" $ | nindent 6 }}
|
||||
serviceAccount: {{ include "thanos.serviceAccount.name" (dict "component" "storegateway" "context" $) }}
|
||||
serviceAccount: {{ include "thanos.serviceAccountName" (dict "component" "storegateway" "context" $) }}
|
||||
automountServiceAccountToken: {{ $.Values.storegateway.automountServiceAccountToken }}
|
||||
{{- if $.Values.storegateway.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" $.Values.storegateway.hostAliases "context" $) | nindent 8 }}
|
||||
|
||||
@@ -44,7 +44,7 @@ spec:
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "thanos.imagePullSecrets" . | nindent 6 }}
|
||||
serviceAccount: {{ include "thanos.serviceAccount.name" (dict "component" "storegateway" "context" $) }}
|
||||
serviceAccount: {{ include "thanos.serviceAccountName" (dict "component" "storegateway" "context" $) }}
|
||||
automountServiceAccountToken: {{ .Values.storegateway.automountServiceAccountToken }}
|
||||
{{- if .Values.storegateway.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.storegateway.hostAliases "context" $) | nindent 8 }}
|
||||
|
||||
Reference in New Issue
Block a user