Dynamic provisioner rbac update.
[ta/caas-security.git] / rbac_manifests / dynamic-local-pv-provisioner-rbac-config.yml
1 ---
2 # Copyright 2019 Nokia
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 apiVersion: v1
16 kind: ServiceAccount
17 metadata:
18   name: dynamic-pv
19   namespace: kube-system
20 ---
21 apiVersion: rbac.authorization.k8s.io/v1
22 kind: ClusterRole
23 metadata:
24   name: caas:dynamic-pv
25 rules:
26 - apiGroups:
27   - ""
28   resources:
29   - persistentvolumeclaims
30   verbs:
31   - get
32   - list
33   - watch
34   - update
35 - apiGroups:
36   - ""
37   resources:
38   - persistentvolumes
39   verbs:
40   - get
41   - list
42   - watch
43 - apiGroups:
44   - ""
45   resources:
46   - nodes
47   verbs:
48   - get
49   - list
50 - apiGroups:
51   - ""
52   resources:
53   - nodes/status
54   verbs:
55   - update
56 ---
57 apiVersion: rbac.authorization.k8s.io/v1
58 kind: ClusterRoleBinding
59 metadata:
60   name: caas:dynamic-pv
61 roleRef:
62   apiGroup: rbac.authorization.k8s.io
63   kind: ClusterRole
64   name: caas:dynamic-pv
65 subjects:
66 - kind: ServiceAccount
67   name: dynamic-pv
68   namespace: kube-system
69 ---
70 apiVersion: rbac.authorization.k8s.io/v1
71 kind: ClusterRoleBinding
72 metadata:
73   name: caas:dynamic-pv-psp
74 subjects:
75 - kind: ServiceAccount
76   name: dynamic-pv
77   namespace: kube-system
78 roleRef:
79   kind: ClusterRole
80   name: caas:infra-psp
81   apiGroup: rbac.authorization.k8s.io