Richard Jankowski | ab8e253 | 2018-11-30 16:17:00 -0500 | [diff] [blame] | 1 | # Copyright 2017-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 | apiVersion: v1 |
| 15 | kind: Service |
| 16 | metadata: |
| 17 | name: kafka |
| 18 | namespace: voltha |
| 19 | spec: |
| 20 | clusterIP: None |
| 21 | selector: |
| 22 | app: kafka |
| 23 | ports: |
| 24 | - protocol: TCP |
| 25 | port: 9092 |
| 26 | targetPort: 9092 |
| 27 | --- |
| 28 | apiVersion: apps/v1beta1 |
| 29 | kind: StatefulSet |
| 30 | metadata: |
| 31 | name: kafka |
| 32 | namespace: voltha |
| 33 | spec: |
| 34 | serviceName: kafka |
| 35 | replicas: 1 |
| 36 | selector: |
| 37 | matchLabels: |
| 38 | app: kafka |
| 39 | template: |
| 40 | metadata: |
| 41 | labels: |
| 42 | app: kafka |
| 43 | annotations: |
| 44 | cni: "calico" |
| 45 | spec: |
| 46 | terminationGracePeriodSeconds: 10 |
| 47 | containers: |
| 48 | - name: kafka |
Richard Jankowski | 1b29992 | 2019-03-05 15:49:24 -0500 | [diff] [blame] | 49 | image: wurstmeister/kafka:2.11-2.0.1 |
Richard Jankowski | ab8e253 | 2018-11-30 16:17:00 -0500 | [diff] [blame] | 50 | ports: |
| 51 | - containerPort: 9092 |
| 52 | env: |
Richard Jankowski | 1b29992 | 2019-03-05 15:49:24 -0500 | [diff] [blame] | 53 | - name: KAFKA_LISTENERS |
| 54 | value: PLAINTEXT://:9092 |
Richard Jankowski | ab8e253 | 2018-11-30 16:17:00 -0500 | [diff] [blame] | 55 | - name: KAFKA_ZOOKEEPER_CONNECT |
| 56 | value: zoo:2181 |
Richard Jankowski | 1b29992 | 2019-03-05 15:49:24 -0500 | [diff] [blame] | 57 | - name: KAFKA_AUTO_CREATE_TOPICS_ENABLE |
| 58 | value: "true" |