From 7522aa76775987c8b8b88f749d57b557e656f09d Mon Sep 17 00:00:00 2001 From: "joost.de.cupere@xenit.eu" Date: Mon, 28 Aug 2023 16:06:40 +0200 Subject: [PATCH] Disable cpu autoscaling by default --- README.md | 17 +++++++++++++++-- xenit-alfresco/templates/acs/acs-hpa.yaml | 8 ++++++-- xenit-alfresco/values.yaml | 8 ++++++-- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 583bf0b..66d5326 100644 --- a/README.md +++ b/README.md @@ -483,13 +483,26 @@ For more information take a look at * Default: 10 * Description: The max ammount of replicas will run when autoscaling -#### `acs.hpa.cpuUtilization` +#### `acs.hpa.cpu.enabled` + +* Required: false +* Default: false +* Description: whether horizontal scaling should trigger on cpu load + +#### `acs.hpa.cpu.utilization` * Required: false * Default: 70 * Description: The CPU cutover percentage -#### `acs.hpa.memoryUtilization` +#### `acs.hpa.memory.enabled` + +* Required: false +* Default: true +* Description: whether horizontal scaling should trigger on memory load + + +#### `acs.hpa.memory.utilization` * Required: false * Default: 70 diff --git a/xenit-alfresco/templates/acs/acs-hpa.yaml b/xenit-alfresco/templates/acs/acs-hpa.yaml index 3f8687a..0226086 100644 --- a/xenit-alfresco/templates/acs/acs-hpa.yaml +++ b/xenit-alfresco/templates/acs/acs-hpa.yaml @@ -9,18 +9,22 @@ spec: minReplicas: {{ .minReplicas }} maxReplicas: {{ .maxReplicas }} metrics: + {{- with .cpu.enabled }} - type: Resource resource: name: cpu target: type: Utilization - averageUtilization: {{ .cpuUtilization }} + averageUtilization: {{ .cpu.utilization }} + {{- end }} + {{- with .memory.enabled }} - type: Resource resource: name: memory target: type: Utilization - averageUtilization: {{ .memoryUtilization }} + averageUtilization: {{ .memory.utilization }} + {{- end }} scaleTargetRef: apiVersion: apps/v1 kind: Deployment diff --git a/xenit-alfresco/values.yaml b/xenit-alfresco/values.yaml index f6923d3..d23785b 100644 --- a/xenit-alfresco/values.yaml +++ b/xenit-alfresco/values.yaml @@ -40,8 +40,12 @@ acs: enabled: false minReplicas: 1 maxReplicas: 10 - cpuUtilization: 70 - memoryUtilization: 70 + cpu: + enabled: false + utilization: 70 + memory: + enabled: true + utilization: 70 dbUrl: 'jdbc:postgresql://postgresql-service:5432/alfresco' dbDriver: 'org.postgresql.Driver' sharePort: '443'