blob: 430f84217583c48f190356eb558edbdf052a7406 [file] [log] [blame]
David Bainbridge2f9b76f2019-05-15 13:48:11 -07001# Copyright 2019-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15---
16apiVersion: v1
17kind: ServiceAccount
18metadata:
19 name: voltha-serviceaccount
20
21---
22apiVersion: rbac.authorization.k8s.io/v1beta1
23kind: ClusterRole
24metadata:
25 name: pod-reader
26rules:
27 - apiGroups: [""]
28 resources: ["pods", "nodes"]
29 verbs: ["get", "watch", "list"]
30
31---
32apiVersion: rbac.authorization.k8s.io/v1beta1
33kind: Role
34metadata:
35 name: voltha-role
36 namespace: {{ .Release.Namespace }}
37rules:
38 - apiGroups: [""]
39 resources: ["pods", "secrets", "namespaces", "endpoints"]
40 verbs: ["get"]
41 - apiGroups: [""]
42 resources: ["configmaps"]
43 verbs: ["get", "update", "create"]
44
45---
46apiVersion: rbac.authorization.k8s.io/v1beta1
47kind: RoleBinding
48metadata:
49 name: voltha-role-nisa-binding
50 namespace: {{ .Release.Namespace }}
51roleRef:
52 apiGroup: rbac.authorization.k8s.io
53 kind: Role
54 name: voltha-role
55subjects:
56 - kind: ServiceAccount
57 name: voltha-serviceaccount
58 namespace: {{ .Release.Namespace }}
59
60---
61apiVersion: rbac.authorization.k8s.io/v1beta1
62kind: ClusterRoleBinding
63metadata:
64 name: voltha-clusterrole-nisa-binding
65roleRef:
66 apiGroup: rbac.authorization.k8s.io
67 kind: ClusterRole
68 name: pod-reader
69subjects:
70 - kind: ServiceAccount
71 name: voltha-serviceaccount
72 namespace: {{ .Release.Namespace }}