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 |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 23 | updateStrategy: |
| 24 | type: RollingUpdate |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 25 | selector: |
| 26 | matchLabels: |
| 27 | app: kafka |
| 28 | template: |
| 29 | metadata: |
| 30 | labels: |
| 31 | app: kafka |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 32 | annotations: |
Stephane Barbarie | 2d4e07f | 2018-03-26 16:46:45 -0400 | [diff] [blame] | 33 | cni: "calico" |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 34 | spec: |
| 35 | terminationGracePeriodSeconds: 10 |
| 36 | affinity: |
| 37 | podAntiAffinity: |
| 38 | requiredDuringSchedulingIgnoredDuringExecution: |
| 39 | - labelSelector: |
| 40 | matchExpressions: |
| 41 | - key: app |
| 42 | operator: In |
| 43 | values: |
| 44 | - kafka |
| 45 | topologyKey: kubernetes.io/hostname |
| 46 | containers: |
| 47 | - name: kafka |
| 48 | image: wurstmeister/kafka:1.0.0 |
| 49 | ports: |
| 50 | - containerPort: 9092 |
| 51 | env: |
| 52 | - name: KAFKA_ADVERTISED_PORT |
| 53 | value: "9092" |
| 54 | - name: KAFKA_ZOOKEEPER_CONNECT |
| 55 | value: zoo1:2181,zoo2:2181,zoo3:2181 |
| 56 | - name: KAFKA_HEAP_OPTS |
| 57 | value: "-Xmx256M -Xms128M" |