Merge "[UUI] Service Mesh Compliance for UUI"
[oom.git] / kubernetes / policy / templates / policy-kafka-user.yaml
1 {{/*
2 # Copyright © 2022 Nordix Foundation
3 # Modifications Copyright © 2022 Nordix Foundation
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #       http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 */}}
17 {{- if .Values.config.useStrimziKafka }}
18 apiVersion: kafka.strimzi.io/v1beta2
19 kind: KafkaUser
20 metadata:
21   name: {{ include "common.release" . }}-{{ .Values.global.policyKafkaUser }}
22   labels:
23     strimzi.io/cluster: {{ include "common.release" . }}-strimzi
24 spec:
25   authentication:
26     type: scram-sha-512
27   authorization:
28     type: simple
29     acls:
30     - resource:
31         type: group
32         name: {{ .Values.config.acRuntimeTopic.consumer.groupId }}
33       operation: All
34     - resource:
35         type: topic
36         name: {{ .Values.config.acRuntimeTopic.name }}
37       operation: All
38     - resource:
39         type: topic
40         name: {{ .Values.config.policyPdpPapTopic.name }}
41       operation: All
42     - resource:
43         type: topic
44         name: {{ .Values.config.policyHeartbeatTopic.name }}
45       operation: All
46     - resource:
47         type: topic
48         name: {{ .Values.config.policyNotificationTopic.name }}
49       operation: All
50 {{- end }}