Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 1 | apiVersion: v1 |
| 2 | kind: Service |
| 3 | metadata: |
| 4 | name: kafka |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 5 | namespace: voltha |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 6 | spec: |
| 7 | clusterIP: None |
| 8 | selector: |
| 9 | app: kafka |
| 10 | ports: |
| 11 | - protocol: TCP |
| 12 | port: 9092 |
| 13 | targetPort: 9092 |
| 14 | --- |
| 15 | apiVersion: apps/v1beta1 |
| 16 | kind: StatefulSet |
| 17 | metadata: |
| 18 | name: kafka |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 19 | namespace: voltha |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 20 | spec: |
| 21 | serviceName: kafka |
| 22 | replicas: 3 |
| 23 | selector: |
| 24 | matchLabels: |
| 25 | app: kafka |
| 26 | template: |
| 27 | metadata: |
| 28 | labels: |
| 29 | app: kafka |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 30 | annotations: |
| 31 | cni: "weave" |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 32 | spec: |
| 33 | terminationGracePeriodSeconds: 10 |
| 34 | affinity: |
| 35 | podAntiAffinity: |
| 36 | requiredDuringSchedulingIgnoredDuringExecution: |
| 37 | - labelSelector: |
| 38 | matchExpressions: |
| 39 | - key: app |
| 40 | operator: In |
| 41 | values: |
| 42 | - kafka |
| 43 | topologyKey: kubernetes.io/hostname |
| 44 | containers: |
| 45 | - name: kafka |
| 46 | image: wurstmeister/kafka:1.0.0 |
| 47 | ports: |
| 48 | - containerPort: 9092 |
| 49 | env: |
| 50 | - name: KAFKA_ADVERTISED_PORT |
| 51 | value: "9092" |
| 52 | - name: KAFKA_ZOOKEEPER_CONNECT |
| 53 | value: zoo1:2181,zoo2:2181,zoo3:2181 |
| 54 | - name: KAFKA_HEAP_OPTS |
| 55 | value: "-Xmx256M -Xms128M" |