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