mirror of
https://github.com/bitnami/charts.git
synced 2026-03-16 14:57:08 +08:00
* [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>
26 lines
1.2 KiB
YAML
26 lines
1.2 KiB
YAML
{{- $query := (include "thanos.query.values" . | fromYaml) -}}
|
|
{{- $pspAvailable := (semverCompare "<1.25-0" (include "common.capabilities.kubeVersion" .)) }}
|
|
{{- if and $pspAvailable $query.enabled $query.pspEnabled $query.rbac.create }}
|
|
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: {{ include "common.names.fullname" . }}-query
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
app.kubernetes.io/component: query
|
|
{{- if .Values.commonLabels }}
|
|
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.commonAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: {{ include "common.names.fullname" . }}-query
|
|
apiGroup: rbac.authorization.k8s.io
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ include "thanos.serviceAccountName" (dict "component" "query" "context" $) }}
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
{{- end }}
|