apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: flink-taskmanager
  namespace: default
spec:
  maxReplicas: 16
  minReplicas: 1
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: flink-taskmanager
  # behavior:
  #   scaleDown:
  #     stabilizationWindowSeconds: 300
  #     policies:
  #     - type: Pods
  #       value: 1
  #       periodSeconds: 60
  #     selectPolicy: Max
  #   scaleUp:
  #     stabilizationWindowSeconds: 0