apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
    name: mattermost-hpa
    namespace: default
spec:
    scaleTargetRef:
        apiVersion: apps/v1
        kind: Deployment
        name: mattermost
    minReplicas: 1
    maxReplicas: 5
    metrics:
    - type: Resource
      resource:
          name: memory
          targetAverageUtilization: 50

