fae1c231afeb86665b9783caa06d366aa556c18c
[ta/caas-security.git] / rbac_manifests / netwatcher-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
16 apiVersion: v1
17 kind: ServiceAccount
18 metadata:
19   name: netwatcher
20   namespace: kube-system
21   labels:
22       kubernetes.io/cluster-service: "true"
23 ---
24 apiVersion: rbac.authorization.k8s.io/v1
25 kind: ClusterRole
26 metadata:
27   name: caas:netwatcher
28 rules:
29 - apiGroups:
30   - "danm.k8s.io"
31   resources:
32   - danmnets
33   verbs:
34   - get
35   - list
36   - watch
37   - update
38 ---
39 apiVersion: rbac.authorization.k8s.io/v1
40 kind: ClusterRoleBinding
41 metadata:
42   name: caas:netwatcher
43 roleRef:
44   apiGroup: rbac.authorization.k8s.io
45   kind: ClusterRole
46   name: caas:netwatcher
47 subjects:
48 - kind: ServiceAccount
49   namespace: kube-system
50   name: netwatcher
51 ---
52 apiVersion: rbac.authorization.k8s.io/v1
53 kind: ClusterRoleBinding
54 metadata:
55   name: caas:netwatcher-psp
56 subjects:
57 - kind: ServiceAccount
58   name: netwatcher
59   namespace: kube-system
60 roleRef:
61   kind: ClusterRole
62   name: caas:infra-psp
63   apiGroup: rbac.authorization.k8s.io