apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: elasticsearch-hpa
  namespace: logging
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: StatefulSet
    name: elasticsearch-logging
  minReplicas: 1
  maxReplicas: 2
  metrics:
  - type: Resource
    resource:
      name: memory
      target:
        type: Value
        averageUtilization: 60
        value: 1.2Gi
status:
  conditions: []
  observedGeneration: 1
  currentReplicas: 1
  desiredReplicas: 1
  currentMetrics:
  - type: Resource
    resource:
      name: memory
      current:
        averageUtilization: 0
        value: 1.3Gi
