File tree Expand file tree Collapse file tree 5 files changed +58
-13
lines changed Expand file tree Collapse file tree 5 files changed +58
-13
lines changed Original file line number Diff line number Diff line change 33
33
"helm/templates/role-reader.yaml.tpl" ,
34
34
"helm/templates/role-writer.yaml.tpl" ,
35
35
"helm/templates/_controller-role-kind-patch.yaml.tpl" ,
36
+ "helm/templates/leader_election_role.yaml.tpl" ,
37
+ "helm/templates/leader_election_role_binding.yaml.tpl" ,
36
38
}
37
39
releaseIncludePaths = []string {
38
40
"config/controller/kustomization_def.yaml.tpl" ,
Original file line number Diff line number Diff line change @@ -3,19 +3,8 @@ apiVersion: rbac.authorization.k8s.io/v1
3
3
kind: Role
4
4
metadata:
5
5
name: { {.ServicePackageName} }-leader-election-role
6
+ namespace: default
6
7
rules:
7
- - apiGroups:
8
- - ""
9
- resources:
10
- - configmaps
11
- verbs:
12
- - get
13
- - list
14
- - watch
15
- - create
16
- - update
17
- - patch
18
- - delete
19
8
- apiGroups:
20
9
- coordination.k8s.io
21
10
resources:
34
23
- events
35
24
verbs:
36
25
- create
37
- - patch
26
+ - patch
Original file line number Diff line number Diff line change
1
+
2
+ { {- " {{ if .Values.leaderElection.enabled }}" } }
3
+ apiVersion: rbac.authorization.k8s.io/v1
4
+ kind: Role
5
+ metadata:
6
+ name: { {.ServicePackageName} }-leader-election-role
7
+ { {- " {{ if .Values.leaderElection.namespace }}" } }
8
+ namespace: { { " {{ .Values.leaderElection.namespace }}" } }
9
+ { {- " {{ else }}" } }
10
+ namespace: { { " {{ .Release.Namespace }}" } }
11
+ { {- " {{ end }}" } }
12
+ rules:
13
+ - apiGroups:
14
+ - coordination.k8s.io
15
+ resources:
16
+ - leases
17
+ verbs:
18
+ - get
19
+ - list
20
+ - watch
21
+ - create
22
+ - update
23
+ - patch
24
+ - delete
25
+ - apiGroups:
26
+ - ""
27
+ resources:
28
+ - events
29
+ verbs:
30
+ - create
31
+ - patch
32
+ { {- " {{- end }}" } }
Original file line number Diff line number Diff line change
1
+ { {- " {{ if .Values.leaderElection.enabled }}" } }
2
+ apiVersion: rbac.authorization.k8s.io/v1
3
+ kind: RoleBinding
4
+ metadata:
5
+ name: { {.ServicePackageName} }-leader-election-rolebinding
6
+ { {- " {{ if .Values.leaderElection.namespace }}" } }
7
+ namespace: { { " {{ .Values.leaderElection.namespace }}" } }
8
+ { {- " {{ else }}" } }
9
+ namespace: { { " {{ .Release.Namespace }}" } }
10
+ { {- " {{ end }}" } }
11
+ roleRef:
12
+ apiGroup: rbac.authorization.k8s.io
13
+ kind: Role
14
+ name: { {.ServicePackageName} }-leader-election-role
15
+ subjects:
16
+ - kind: ServiceAccount
17
+ name: { {.ServiceAccountName} }
18
+ namespace: { { " {{ .Release.Namespace }}" } }
19
+ { {- " {{- end }}" } }
Original file line number Diff line number Diff line change 236
236
"properties" : {
237
237
"enabled" : {
238
238
"type" : " boolean"
239
+ },
240
+ "namespace" : {
241
+ "type" : " string"
239
242
}
240
243
},
241
244
"type" : " object"
You can’t perform that action at this time.
0 commit comments