---
apiVersion: v1
kind: ReplicationController
metadata:
  name: kafka
  labels:
    name: kafka
    broker_id: "1"
spec:
  replicas: 1
  selector:
    name: kafka
    broker_id: "1"
  template:
    metadata:
      labels:
        name: kafka
        broker_id: "1"
        service: kafka
    spec:
      containers:
        - name: kafka
          image: navicore/kafka:0.10.1.1
          imagePullPolicy: Always
          resources:
            limits:
              memory: "750Mi"
          env:
            - name: KAFKA_HEAP_OPTS
              value: "-Xmx512M -Xms512M"
            - name: BROKER_ID
              value: "1"
            - name: NUM_PARTITIONS
              value: "3"
            - name: ADVERTISED_HOSTNAME
              value: "kafka"
            - name: ZOOKEEPER_CONNECT
              value: "zoo1:2181"
            - name: RETENTION_HOURS
              value: "72"
          ports:
            - containerPort: 9092
              name: broker
          volumeMounts:
            - mountPath: /data
              name: data
      volumes:
        - emptyDir: {}
          name: data
