kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2beta2
metadata:
  name: ches-app-master
  labels:
    app: ches-master
    app.kubernetes.io/component: app
    app.kubernetes.io/instance: ches-master
    app.kubernetes.io/managed-by: jenkins
    app.kubernetes.io/name: nodejs
    app.kubernetes.io/part-of: ches-master
    template: common-hosted-email-service-app-dc-template
spec:
  scaleTargetRef:
    kind: DeploymentConfig
    name: ches-app-master
    apiVersion: apps.openshift.io/v1
  minReplicas: 2
  maxReplicas: 16
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 80
  behavior:
    scaleUp:
      stabilizationWindowSeconds: 0
      selectPolicy: Max
      policies:
        - type: Pods
          value: 2
          periodSeconds: 30
    scaleDown:
      stabilizationWindowSeconds: 120
      selectPolicy: Max
      policies:
        - type: Pods
          value: 1
          periodSeconds: 120
