Added new rbac rules.
[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 - apiGroups:
35   - ""
36   resources:
37   - persistentvolumes
38   verbs:
39   - get
40   - list
41   - watch
42 - apiGroups:
43   - ""
44   resources:
45   - nodes
46   verbs:
47   - get
48 - apiGroups:
49   - ""
50   resources:
51   - nodes/status
52   verbs:
53   - update
54 ---
55 apiVersion: rbac.authorization.k8s.io/v1
56 kind: ClusterRoleBinding
57 metadata:
58   name: caas:dynamic-pv
59 roleRef:
60   apiGroup: rbac.authorization.k8s.io
61   kind: ClusterRole
62   name: caas:dynamic-pv
63 subjects:
64 - kind: ServiceAccount
65   name: dynamic-pv
66   namespace: kube-system
67 ---
68 apiVersion: rbac.authorization.k8s.io/v1
69 kind: ClusterRoleBinding
70 metadata:
71   name: caas:dynamic-pv-psp
72 subjects:
73 - kind: ServiceAccount
74   name: dynamic-pv
75   namespace: kube-system
76 roleRef:
77   kind: ClusterRole
78   name: caas:infra-psp
79   apiGroup: rbac.authorization.k8s.io