apiVersion: v1
kind: Pod
metadata:
  labels:
    io.kompose.service: kafka
  name: kafka-pod
spec:
  containers:
  - env:
    - name: HOSTNAME_COMMAND
      value: hostname
    - name: KAFKA_ADVERTISED_LISTENERS
      value: INSIDE://kafka-cluster:9092,OUTSIDE://localhost:9094
    - name: KAFKA_BROKER_ID
      value: "1"
    - name: KAFKA_CREATE_TOPICS
      value: control:1:1
    - name: KAFKA_DEFAULT_REPLICATION_FACTOR
      value: "1"
    - name: KAFKA_INTER_BROKER_LISTENER_NAME
      value: INSIDE
    - name: KAFKA_LISTENERS
      value: INSIDE://:9092,OUTSIDE://:9094
    - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
      value: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
    - name: KAFKA_LOG_RETENTION_BYTES
      value: "-1"
    - name: KAFKA_LOG_RETENTION_DAYS
      value: "2"
    - name: KAFKA_ZOOKEEPER_CONNECT
      value: zookeeper:2181
    - name: KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS
      value: "36000"
    image: wurstmeister/kafka:2.12-2.2.1
    name: kafka-pod
    ports:
    - containerPort: 9092
    resources: {}
    volumeMounts:
      - name: dockersock
        mountPath: "/var/run/docker.sock"
  volumes:
  - name: dockersock
    hostPath:
      path: /var/run/docker.sock
