apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
    name: spesialist
    namespace: tbd
spec:
    scaleTargetRef:
        apiVersion: apps/v1
        kind: Deployment
        name: spesialist
    minReplicas: 12
    maxReplicas: 12
    metrics:
    - type: External
      external:
          metric:
              name: kafka_consumergroup_group_lag
              selector:
                  matchLabels:
                      topic: tbd.rapid.v1
                      group: tbd-spesialist-v1
          target:
              type: AverageValue
              averageValue: 500
