@@ -182,6 +182,58 @@ data:
182
182
{{- $.Files.Get $path | nindent 8 }}
183
183
{{ end }}
184
184
185
+ ---
186
+ apiVersion : v1
187
+ kind : ServiceAccount
188
+ metadata :
189
+ name : {{ $name }}-hook-job
190
+ namespace : {{ $namespace }}
191
+ annotations :
192
+ " helm.sh/hook " : pre-install
193
+ " helm.sh/hook-weight " : " 1"
194
+ {{- if "karmada.preInstallJob.labels" }}
195
+ labels :
196
+ {{- include "karmada.preInstallJob.labels" . | nindent 4 }}
197
+ {{- end }}
198
+ ---
199
+ apiVersion : rbac.authorization.k8s.io/v1
200
+ kind : ClusterRole
201
+ metadata :
202
+ name : {{ $name }}-hook-job
203
+ annotations :
204
+ " helm.sh/hook " : pre-install
205
+ " helm.sh/hook-weight " : " 1"
206
+ {{- if "karmada.preInstallJob.labels" }}
207
+ labels :
208
+ {{- include "karmada.preInstallJob.labels" . | nindent 4 }}
209
+ {{- end }}
210
+ rules :
211
+ - apiGroups : ['*']
212
+ resources : ['*']
213
+ verbs : ["get", "watch", "list", "create", "update", "patch", "delete"]
214
+ - nonResourceURLs : ['*']
215
+ verbs : ["get"]
216
+ ---
217
+ apiVersion : rbac.authorization.k8s.io/v1
218
+ kind : ClusterRoleBinding
219
+ metadata :
220
+ name : {{ $name }}-hook-job
221
+ annotations :
222
+ " helm.sh/hook " : pre-install
223
+ " helm.sh/hook-weight " : " 1"
224
+ {{- if "karmada.preInstallJob.labels" }}
225
+ labels :
226
+ {{- include "karmada.preInstallJob.labels" . | nindent 4 }}
227
+ {{- end }}
228
+ roleRef :
229
+ apiGroup : rbac.authorization.k8s.io
230
+ kind : ClusterRole
231
+ name : {{ $name }}-hook-job
232
+ subjects :
233
+ - kind : ServiceAccount
234
+ name : {{ $name }}-hook-job
235
+ namespace : {{ $namespace }}
236
+
185
237
{{- if eq .Values.certs.mode "custom" }}
186
238
---
187
239
apiVersion : v1
@@ -446,56 +498,5 @@ spec:
446
498
- name : configs
447
499
emptyDir : {}
448
500
---
449
- apiVersion : v1
450
- kind : ServiceAccount
451
- metadata :
452
- name : {{ $name }}-hook-job
453
- namespace : {{ $namespace }}
454
- annotations :
455
- " helm.sh/hook " : pre-install
456
- " helm.sh/hook-weight " : " 1"
457
- {{- if "karmada.preInstallJob.labels" }}
458
- labels :
459
- {{- include "karmada.preInstallJob.labels" . | nindent 4 }}
460
- {{- end }}
461
- ---
462
- apiVersion : rbac.authorization.k8s.io/v1
463
- kind : ClusterRole
464
- metadata :
465
- name : {{ $name }}-hook-job
466
- annotations :
467
- " helm.sh/hook " : pre-install
468
- " helm.sh/hook-weight " : " 1"
469
- {{- if "karmada.preInstallJob.labels" }}
470
- labels :
471
- {{- include "karmada.preInstallJob.labels" . | nindent 4 }}
472
- {{- end }}
473
- rules :
474
- - apiGroups : ['*']
475
- resources : ['*']
476
- verbs : ["get", "watch", "list", "create", "update", "patch", "delete"]
477
- - nonResourceURLs : ['*']
478
- verbs : ["get"]
479
- ---
480
- apiVersion : rbac.authorization.k8s.io/v1
481
- kind : ClusterRoleBinding
482
- metadata :
483
- name : {{ $name }}-hook-job
484
- annotations :
485
- " helm.sh/hook " : pre-install
486
- " helm.sh/hook-weight " : " 1"
487
- {{- if "karmada.preInstallJob.labels" }}
488
- labels :
489
- {{- include "karmada.preInstallJob.labels" . | nindent 4 }}
490
- {{- end }}
491
- roleRef :
492
- apiGroup : rbac.authorization.k8s.io
493
- kind : ClusterRole
494
- name : {{ $name }}-hook-job
495
- subjects :
496
- - kind : ServiceAccount
497
- name : {{ $name }}-hook-job
498
- namespace : {{ $namespace }}
499
- ---
500
501
{{- end }}
501
502
{{- end }}
0 commit comments