David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 1 | # 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 | --- |
| 16 | apiVersion: v1 |
| 17 | kind: ServiceAccount |
| 18 | metadata: |
| 19 | name: voltha-serviceaccount |
| 20 | |
| 21 | --- |
| 22 | apiVersion: rbac.authorization.k8s.io/v1beta1 |
| 23 | kind: ClusterRole |
| 24 | metadata: |
| 25 | name: pod-reader |
| 26 | rules: |
| 27 | - apiGroups: [""] |
| 28 | resources: ["pods", "nodes"] |
| 29 | verbs: ["get", "watch", "list"] |
| 30 | |
| 31 | --- |
| 32 | apiVersion: rbac.authorization.k8s.io/v1beta1 |
| 33 | kind: Role |
| 34 | metadata: |
| 35 | name: voltha-role |
| 36 | namespace: {{ .Release.Namespace }} |
| 37 | rules: |
| 38 | - apiGroups: [""] |
| 39 | resources: ["pods", "secrets", "namespaces", "endpoints"] |
| 40 | verbs: ["get"] |
| 41 | - apiGroups: [""] |
| 42 | resources: ["configmaps"] |
| 43 | verbs: ["get", "update", "create"] |
| 44 | |
| 45 | --- |
| 46 | apiVersion: rbac.authorization.k8s.io/v1beta1 |
| 47 | kind: RoleBinding |
| 48 | metadata: |
| 49 | name: voltha-role-nisa-binding |
| 50 | namespace: {{ .Release.Namespace }} |
| 51 | roleRef: |
| 52 | apiGroup: rbac.authorization.k8s.io |
| 53 | kind: Role |
| 54 | name: voltha-role |
| 55 | subjects: |
| 56 | - kind: ServiceAccount |
| 57 | name: voltha-serviceaccount |
| 58 | namespace: {{ .Release.Namespace }} |
| 59 | |
| 60 | --- |
| 61 | apiVersion: rbac.authorization.k8s.io/v1beta1 |
| 62 | kind: ClusterRoleBinding |
| 63 | metadata: |
| 64 | name: voltha-clusterrole-nisa-binding |
| 65 | roleRef: |
| 66 | apiGroup: rbac.authorization.k8s.io |
| 67 | kind: ClusterRole |
| 68 | name: pod-reader |
| 69 | subjects: |
| 70 | - kind: ServiceAccount |
| 71 | name: voltha-serviceaccount |
| 72 | namespace: {{ .Release.Namespace }} |