Added new rbac rules.
[ta/caas-security.git] / rbac_manifests / storage-local-static-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: local-storage-admin
19   namespace: kube-system
20 ---
21 apiVersion: rbac.authorization.k8s.io/v1
22 kind: ClusterRole
23 metadata:
24   name: caas:local-storage-provisioner-node-clusterrole
25   namespace: kube-system
26 rules:
27 - apiGroups: [""]
28   resources: ["nodes"]
29   verbs: ["get"]
30 ---
31 apiVersion: rbac.authorization.k8s.io/v1
32 kind: ClusterRoleBinding
33 metadata:
34   name: caas:local-storage-provisioner-pv-binding
35 roleRef:
36   kind: ClusterRole
37   name: system:persistent-volume-provisioner
38   apiGroup: rbac.authorization.k8s.io
39 subjects:
40 - kind: ServiceAccount
41   name: local-storage-admin
42   namespace: kube-system
43 ---
44 apiVersion: rbac.authorization.k8s.io/v1
45 kind: ClusterRoleBinding
46 metadata:
47   name: caas:local-storage-provisioner-node-binding
48 subjects:
49 - kind: ServiceAccount
50   name: local-storage-admin
51   namespace: kube-system
52 roleRef:
53   kind: ClusterRole
54   name: caas:local-storage-provisioner-node-clusterrole
55   apiGroup: rbac.authorization.k8s.io