@@ -4,17 +4,12 @@ apiVersion: v1
44kind : ServiceAccount
55metadata :
66 name : {{ .Values.rbac.serviceAccount.name | default (include "chart.fullname" . ) }}
7- {{- if or .Values.rbac.serviceAccount.annotations .Values.commonAnnotations }}
7+ {{- with mergeOverwrite (default dict .Values.commonAnnotations) (default dict .Values. rbac.serviceAccount.annotations) }}
88 annotations :
9- {{- with .Values.rbac.serviceAccount.annotations | default dict }}
10- {{- tpl ( toYaml . ) $ | nindent 4 }}
11- {{- end }}
12- {{- with .Values.commonAnnotations | default dict }}
139 {{- range $key, $value := . }}
1410 {{ $key }}: {{ $value | quote }}
1511 {{- end }}
1612 {{- end }}
17- {{- end }}
1813 labels :
1914 component : rbac
2015 {{- include "labels" . | nindent 4 }}
@@ -23,7 +18,7 @@ apiVersion: rbac.authorization.k8s.io/v1
2318kind : Role
2419metadata :
2520 name : {{ include "chart.fullname" . }}-leader-election-role
26- {{- with .Values.commonAnnotations | default dict }}
21+ {{- with (default dict .Values.commonAnnotations) }}
2722 annotations :
2823 {{- range $key, $value := . }}
2924 {{ $key }}: {{ $value | quote }}
@@ -69,7 +64,7 @@ apiVersion: rbac.authorization.k8s.io/v1
6964kind : RoleBinding
7065metadata :
7166 name : {{ include "chart.fullname" . }}-leader-election-rolebinding
72- {{- with .Values.commonAnnotations | default dict }}
67+ {{- with (default dict .Values.commonAnnotations) }}
7368 annotations :
7469 {{- range $key, $value := . }}
7570 {{ $key }}: {{ $value | quote }}
@@ -91,7 +86,7 @@ apiVersion: rbac.authorization.k8s.io/v1
9186kind : ClusterRole
9287metadata :
9388 name : {{ include "chart.fullname" . }}-role
94- {{- with .Values.commonAnnotations | default dict }}
89+ {{- with (default dict .Values.commonAnnotations) }}
9590 annotations :
9691 {{- range $key, $value := . }}
9792 {{ $key }}: {{ $value | quote }}
@@ -177,7 +172,7 @@ apiVersion: rbac.authorization.k8s.io/v1
177172kind : ClusterRole
178173metadata :
179174 name : {{ include "chart.fullname" . }}-metrics-reader
180- {{- with .Values.commonAnnotations | default dict }}
175+ {{- with (default dict .Values.commonAnnotations) }}
181176 annotations :
182177 {{- range $key, $value := . }}
183178 {{ $key }}: {{ $value | quote }}
@@ -196,7 +191,7 @@ apiVersion: rbac.authorization.k8s.io/v1
196191kind : ClusterRole
197192metadata :
198193 name : {{ include "chart.fullname" . }}-proxy-role
199- {{- with .Values.commonAnnotations | default dict }}
194+ {{- with (default dict .Values.commonAnnotations) }}
200195 annotations :
201196 {{- range $key, $value := . }}
202197 {{ $key }}: {{ $value | quote }}
@@ -223,7 +218,7 @@ apiVersion: rbac.authorization.k8s.io/v1
223218kind : ClusterRoleBinding
224219metadata :
225220 name : {{ include "chart.fullname" . }}-rolebinding
226- {{- with .Values.commonAnnotations }}
221+ {{- with (default dict .Values.commonAnnotations) }}
227222 annotations :
228223 {{- range $key, $value := . }}
229224 {{ $key }}: {{ $value | quote }}
@@ -245,7 +240,7 @@ apiVersion: rbac.authorization.k8s.io/v1
245240kind : ClusterRoleBinding
246241metadata :
247242 name : {{ include "chart.fullname" . }}-proxy-rolebinding
248- {{- with .Values.commonAnnotations | default dict }}
243+ {{- with (default dict .Values.commonAnnotations) }}
249244 annotations :
250245 {{- range $key, $value := . }}
251246 {{ $key }}: {{ $value | quote }}
0 commit comments