From f0322b001bee3ceffba5b783897470cc58913ef3 Mon Sep 17 00:00:00 2001 From: Harsha Konda Date: Wed, 2 Apr 2025 10:52:41 -0600 Subject: [PATCH 1/7] Create hpa for task processor --- .../templates/hap-task-processor.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 charts/flagsmith/templates/hap-task-processor.yaml diff --git a/charts/flagsmith/templates/hap-task-processor.yaml b/charts/flagsmith/templates/hap-task-processor.yaml new file mode 100644 index 00000000..f2d8315c --- /dev/null +++ b/charts/flagsmith/templates/hap-task-processor.yaml @@ -0,0 +1,20 @@ +{{- if .Values.hpa.taskProcessor.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ template "flagsmith.fullname" . }}-task-processor-hpa +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ template "flagsmith.fullname" . }}-task-processor + minReplicas: {{ .Values.hpa.taskProcessor.minReplicas }} + maxReplicas: {{ .Values.hpa.taskProcessor.maxReplicas }} + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.hpa.taskProcessor.targetCPUUtilization }} +{{- end }} From 0e377ae6d5bd36c41e0650176caff8e9a1d8a4a2 Mon Sep 17 00:00:00 2001 From: Harsha Konda Date: Wed, 2 Apr 2025 11:17:15 -0600 Subject: [PATCH 2/7] Update values.yaml --- charts/flagsmith/values.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/charts/flagsmith/values.yaml b/charts/flagsmith/values.yaml index 780dbade..559472ab 100644 --- a/charts/flagsmith/values.yaml +++ b/charts/flagsmith/values.yaml @@ -392,6 +392,12 @@ hpa: minReplicas: 2 maxReplicas: 10 targetCPUUtilization: 50 + taskProcessor: + enabled: false + minReplicas: 2 + maxReplicas: 10 + targetCPUUtilization: 50 + ingress: frontend: From 26399deff42ce752420ce694f299c28190be55ec Mon Sep 17 00:00:00 2001 From: Harsha Konda Date: Wed, 2 Apr 2025 11:17:39 -0600 Subject: [PATCH 3/7] Update values.yaml --- charts/flagsmith/values.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/charts/flagsmith/values.yaml b/charts/flagsmith/values.yaml index 559472ab..8affeb6e 100644 --- a/charts/flagsmith/values.yaml +++ b/charts/flagsmith/values.yaml @@ -396,8 +396,7 @@ hpa: enabled: false minReplicas: 2 maxReplicas: 10 - targetCPUUtilization: 50 - + targetCPUUtilization: 50 ingress: frontend: From 7dfb1a3c0f7c562623487769d2b21b5372ab62ba Mon Sep 17 00:00:00 2001 From: Harsha Konda Date: Wed, 2 Apr 2025 13:01:38 -0600 Subject: [PATCH 4/7] Rename hap-task-processor.yaml to hpa-task-processor.yaml --- .../{hap-task-processor.yaml => hpa-task-processor.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename charts/flagsmith/templates/{hap-task-processor.yaml => hpa-task-processor.yaml} (100%) diff --git a/charts/flagsmith/templates/hap-task-processor.yaml b/charts/flagsmith/templates/hpa-task-processor.yaml similarity index 100% rename from charts/flagsmith/templates/hap-task-processor.yaml rename to charts/flagsmith/templates/hpa-task-processor.yaml From 9884279d7bd48d146dfd4e66872db1059b802be4 Mon Sep 17 00:00:00 2001 From: Harsha Konda Date: Wed, 2 Apr 2025 13:02:31 -0600 Subject: [PATCH 5/7] Create hpa-see.yaml --- charts/flagsmith/templates/hpa-see.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 charts/flagsmith/templates/hpa-see.yaml diff --git a/charts/flagsmith/templates/hpa-see.yaml b/charts/flagsmith/templates/hpa-see.yaml new file mode 100644 index 00000000..1279ee2f --- /dev/null +++ b/charts/flagsmith/templates/hpa-see.yaml @@ -0,0 +1,20 @@ +{{- if .Values.hpa.sse.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ template "flagsmith.fullname" . }}-sse-hpa +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ template "flagsmith.fullname" . }}-sse + minReplicas: {{ .Values.hpa.sse.minReplicas }} + maxReplicas: {{ .Values.hpa.sse.maxReplicas }} + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.hpa.sse.targetCPUUtilization }} +{{- end }} From f077b897d48559b65fd054917d9a7dddad315b0a Mon Sep 17 00:00:00 2001 From: Harsha Konda Date: Wed, 2 Apr 2025 13:03:22 -0600 Subject: [PATCH 6/7] Update values.yaml --- charts/flagsmith/values.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/charts/flagsmith/values.yaml b/charts/flagsmith/values.yaml index 8affeb6e..6455064f 100644 --- a/charts/flagsmith/values.yaml +++ b/charts/flagsmith/values.yaml @@ -396,7 +396,12 @@ hpa: enabled: false minReplicas: 2 maxReplicas: 10 - targetCPUUtilization: 50 + targetCPUUtilization: 50 + sse: + enabled: true + minReplicas: 1 + maxReplicas: 5 + targetCPUUtilization: 50 ingress: frontend: From 75911aa7e9243f8bcb0484f7aabca1dc22ab3f94 Mon Sep 17 00:00:00 2001 From: Harsha Konda Date: Thu, 3 Apr 2025 17:13:11 -0600 Subject: [PATCH 7/7] Rename hpa-see.yaml to hpa-sse.yaml --- charts/flagsmith/templates/{hpa-see.yaml => hpa-sse.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename charts/flagsmith/templates/{hpa-see.yaml => hpa-sse.yaml} (100%) diff --git a/charts/flagsmith/templates/hpa-see.yaml b/charts/flagsmith/templates/hpa-sse.yaml similarity index 100% rename from charts/flagsmith/templates/hpa-see.yaml rename to charts/flagsmith/templates/hpa-sse.yaml