---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: kafka-lenses
  namespace: kafka
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kafka-lenses
  template:
    metadata:
      labels:
        app: kafka-lenses
    spec:
      containers:
      - name: kafka-lenses
        image: landoop/kafka-lenses-dev
        env:
        - name: EULA
          value: "https://dl.lenses.stream/d/?id=a0b4a66b-d57d-421c-ab6a-692957a59cac"
        - name: ADV_HOST
          value: "$KAFKA_IP"
        - name: BROWSE_CONFIGS
          value: "1"
        ports:
        - containerPort: 3030
        - containerPort: 9092
        - containerPort: 2181
        - containerPort: 8081
        - containerPort: 9581
        - containerPort: 9582
        - containerPort: 9584
        - containerPort: 9585
        volumeMounts:
          - mountPath: /data
            name: lenses-data-volume
      volumes:
      - name: lenses-data-volume
        hostPath:
          # directory location on host
          path: /data/lenses
          # this field is optional
          type: Directory