From ff7de6e094b318707da71e53d9c03f016f1cf961 Mon Sep 17 00:00:00 2001 From: mohazza Date: Fri, 27 Mar 2026 13:27:31 +0100 Subject: [PATCH] Add support for hpa behavior --- README.md | 1 + helm/mail/templates/hpa.yaml | 4 ++++ helm/mail/values.yaml | 1 + 3 files changed, 6 insertions(+) diff --git a/README.md b/README.md index ca83da3..a4a152f 100644 --- a/README.md +++ b/README.md @@ -649,6 +649,7 @@ Chart configuration is as follows: | `autoscaling.targetMemoryUtilizationPercentage` | `""` | When to scale up | | `autoscaling.labels` | `{}` | Additional HPA labels | | `autoscaling.annotations` | `{}` | Additional HPA annotations | +| `autoscaling.behavior` | `{}` | [Configurable scaling behavior](https://kubernetes.io/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/#configurable-scaling-behavior) | | `nodeSelector` | `{}` | Standard Kubernetes stuff | | `tolerations` | `[]` | Standard Kubernetes stuff | | `affinity` | `{}` | Standard Kubernetes stuff | diff --git a/helm/mail/templates/hpa.yaml b/helm/mail/templates/hpa.yaml index 212c53b..4dfcfda 100644 --- a/helm/mail/templates/hpa.yaml +++ b/helm/mail/templates/hpa.yaml @@ -42,6 +42,10 @@ spec: type: Utilization averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} + {{- with .Values.autoscaling.behavior }} + behavior: + {{- toYaml . | nindent 4 }} + {{- end }} {{- else }} {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - type: Resource diff --git a/helm/mail/values.yaml b/helm/mail/values.yaml index b0f09bc..96baf9d 100644 --- a/helm/mail/values.yaml +++ b/helm/mail/values.yaml @@ -106,6 +106,7 @@ autoscaling: # targetMemoryUtilizationPercentage: 80 labels: {} annotations: {} + behavior: {} nodeSelector: {} tolerations: []