1
- {{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1beta1" }}
1
+ {{- if .Values.rbacEnable }}
2
2
apiVersion : v1
3
3
kind : List
4
4
items :
5
5
6
6
# ## API Server ###
7
-
7
+
8
8
# TODO: if this is just for namespace lifecycle admission, move to a generic role
9
9
# the role for the apiserver
10
- - apiVersion : rbac.authorization.k8s.io/v1beta1
10
+ - apiVersion : {{template "rbacApiVersion" . }}
11
11
kind : ClusterRole
12
12
metadata :
13
13
name : " servicecatalog.k8s.io:apiserver"
18
18
resources : ["namespaces"]
19
19
verbs : ["get", "list", "watch"]
20
20
# API-server service-account gets its own role
21
- - apiVersion : rbac.authorization.k8s.io/v1beta1
21
+ - apiVersion : {{template "rbacApiVersion" . }}
22
22
kind : ClusterRoleBinding
23
23
metadata :
24
24
name : " servicecatalog.k8s.io:apiserver"
33
33
namespace : " {{ .Release.Namespace }}"
34
34
# apiserver gets the auth-delegator role to delegate auth decisions to
35
35
# the core apiserver
36
- - apiVersion : rbac.authorization.k8s.io/v1beta1
36
+ - apiVersion : {{template "rbacApiVersion" . }}
37
37
kind : ClusterRoleBinding
38
38
metadata :
39
39
name : " servicecatalog.k8s.io:apiserver-auth-delegator"
49
49
# apiserver gets the ability to read authentication. This allows it to
50
50
# read the specific configmap that has the requestheader-* entries to
51
51
# enable api aggregation
52
- - apiVersion : rbac.authorization.k8s.io/v1beta1
52
+ - apiVersion : {{template "rbacApiVersion" . }}
53
53
kind : RoleBinding
54
54
metadata :
55
55
name : " servicecatalog.k8s.io:apiserver-authentication-reader"
69
69
# controller-manager role defines what access the service-catalog
70
70
# controller-manager needs to manage the resources of the
71
71
# service-catalog
72
- - apiVersion : rbac.authorization.k8s.io/v1beta1
72
+ - apiVersion : {{template "rbacApiVersion" . }}
73
73
kind : ClusterRole
74
74
metadata :
75
75
name : " servicecatalog.k8s.io:controller-manager"
98
98
resources : ["clusterservicebrokers/status","serviceinstances/status","serviceinstances/reference","servicebindings/status"]
99
99
verbs : ["update"]
100
100
# give the controller-manager service account access to whats defined in its role.
101
- - apiVersion : rbac.authorization.k8s.io/v1beta1
101
+ - apiVersion : {{template "rbacApiVersion" . }}
102
102
kind : ClusterRoleBinding
103
103
metadata :
104
104
name : " servicecatalog.k8s.io:controller-manager"
@@ -114,7 +114,7 @@ items:
114
114
115
115
# This gives create/update access to an endpoint in kube-system for leader election
116
116
# TODO: use an object other than endpoints, and in the same namespace as the service catalog, not in kube-system
117
- - apiVersion : rbac.authorization.k8s.io/v1beta1
117
+ - apiVersion : {{template "rbacApiVersion" . }}
118
118
kind : Role
119
119
metadata :
120
120
name : " servicecatalog.k8s.io:leader-locking-controller-manager"
@@ -127,7 +127,7 @@ items:
127
127
resources : ["endpoints"]
128
128
resourceNames : ["service-catalog-controller-manager"]
129
129
verbs : ["get","update"]
130
- - apiVersion : rbac.authorization.k8s.io/v1beta1
130
+ - apiVersion : {{template "rbacApiVersion" . }}
131
131
kind : RoleBinding
132
132
metadata :
133
133
name : service-catalog-controller-manager
@@ -141,4 +141,4 @@ items:
141
141
kind : ServiceAccount
142
142
name : " {{ .Values.controllerManager.serviceAccount }}"
143
143
namespace : " {{ .Release.Namespace }}"
144
- {{ end }}
144
+ {{end}}
0 commit comments