apiVersion: apps/v1
kind: Deployment
metadata:
  name: metrics-minion
  namespace: myspace
  labels: &labels
    app: kafka-minion
    type: openmetrics
spec:
  replicas: 1
  selector:
    matchLabels: *labels
  template:
    metadata:
      labels: *labels
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "8080"
        prometheus.io/path: /metrics
    spec:
      containers:
      - name: kafka-minion
        image: solsson/kafka-consumers-prometheus@sha256:039d0bc0c1bdfa8b2e515e4c05ab8490492c65b43830579ce76d36278f33d447
        env:
        - name: TELEMETRY_HOST
          value: 0.0.0.0
        - name: TELEMETRY_PORT
          value: "8080"
        - name: EXPORTER_IGNORE_SYSTEM_TOPICS
          value: "true"
        - name: EXPORTER_METRICS_PREFIX
          value: kafka_minion
        - name: LOG_LEVEL
          value: info
        - name: KAFKA_BROKERS
          value: kafka-0.broker:9092, kafka-1.broker:9092, kafka-2.broker:9092
        - name: KAFKA_CONSUMER_OFFSETS_TOPIC_NAME
          value: __consumer_offsets
        ports:
        - name: http
          containerPort: 8080
        readinessProbe:
          httpGet:
            port: http
            path: /readycheck
        livenessProbe:
          httpGet:
            port: http
            path: /healthcheck
