blob: 706eed4dce7c7019299c1cba8e22e153d2942faa [file] [log] [blame]
Richard Jankowskie5858082018-01-15 18:25:38 -05001apiVersion: v1
2kind: Service
3metadata:
4 name: kafka
Richard Jankowskid4454382018-02-08 16:21:43 -05005 namespace: voltha
Richard Jankowskie5858082018-01-15 18:25:38 -05006spec:
7 clusterIP: None
8 selector:
9 app: kafka
10 ports:
11 - protocol: TCP
12 port: 9092
13 targetPort: 9092
14---
15apiVersion: apps/v1beta1
16kind: StatefulSet
17metadata:
18 name: kafka
Richard Jankowskid4454382018-02-08 16:21:43 -050019 namespace: voltha
Richard Jankowskie5858082018-01-15 18:25:38 -050020spec:
21 serviceName: kafka
22 replicas: 3
Stephane Barbariebcea2f42018-03-02 18:46:32 -050023 updateStrategy:
24 type: RollingUpdate
Richard Jankowskie5858082018-01-15 18:25:38 -050025 selector:
26 matchLabels:
27 app: kafka
28 template:
29 metadata:
30 labels:
31 app: kafka
Stephane Barbarie5e8d9e42018-02-07 16:15:05 -050032 annotations:
Stephane Barbarie2d4e07f2018-03-26 16:46:45 -040033 cni: "calico"
Richard Jankowskie5858082018-01-15 18:25:38 -050034 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"