From f0852fc19113fd9c398b4b271158dca49b9994bb Mon Sep 17 00:00:00 2001 From: MOHANKUMAR T Date: Mon, 17 Jun 2024 10:18:56 +0530 Subject: [PATCH 1/3] BAH-3911 | Upgrade hpa configuration to stable API --- package/helm/templates/hpa.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/package/helm/templates/hpa.yaml b/package/helm/templates/hpa.yaml index 18d71e7c..5df81b52 100644 --- a/package/helm/templates/hpa.yaml +++ b/package/helm/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ .Chart.Name }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} From cc39eb599479d015ad429d24d7b155952b2f32f6 Mon Sep 17 00:00:00 2001 From: MOHANKUMAR T Date: Mon, 17 Jun 2024 10:20:36 +0530 Subject: [PATCH 2/3] BAH-3911 | WIP: Verify new HPA Changes --- .github/workflows/build_publish.yml | 1 + package/helm/values.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index e3245322..06422bf5 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -4,6 +4,7 @@ on: branches: - master - 'release-*' + - BAH-3911 tags: - '[0-9]+.[0-9]+.[0-9]+' diff --git a/package/helm/values.yaml b/package/helm/values.yaml index d3e2e50e..128e21e9 100644 --- a/package/helm/values.yaml +++ b/package/helm/values.yaml @@ -42,11 +42,11 @@ volumes: capacity: "2Gi" autoscaling: - enabled: false - # minReplicas: 1 - # maxReplicas: 5 - # targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 + enabled: true + minReplicas: 1 + maxReplicas: 3 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 80 nodeSelector: {} affinity: {} From 1637e25e6110e1f9b50b1d3188e77279af44c854 Mon Sep 17 00:00:00 2001 From: MOHANKUMAR T Date: Tue, 18 Jun 2024 14:57:06 +0530 Subject: [PATCH 3/3] Revert "BAH-3911 | WIP: Verify new HPA Changes" This reverts commit cc39eb599479d015ad429d24d7b155952b2f32f6. --- .github/workflows/build_publish.yml | 1 - package/helm/values.yaml | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index 06422bf5..e3245322 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -4,7 +4,6 @@ on: branches: - master - 'release-*' - - BAH-3911 tags: - '[0-9]+.[0-9]+.[0-9]+' diff --git a/package/helm/values.yaml b/package/helm/values.yaml index 128e21e9..d3e2e50e 100644 --- a/package/helm/values.yaml +++ b/package/helm/values.yaml @@ -42,11 +42,11 @@ volumes: capacity: "2Gi" autoscaling: - enabled: true - minReplicas: 1 - maxReplicas: 3 - targetCPUUtilizationPercentage: 80 - targetMemoryUtilizationPercentage: 80 + enabled: false + # minReplicas: 1 + # maxReplicas: 5 + # targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 nodeSelector: {} affinity: {}