From c535355b77eaacc1f753974002a64b2b0eb24ec5 Mon Sep 17 00:00:00 2001 From: Thomas Carmet <8408330+tcarmet@users.noreply.github.com> Date: Thu, 25 Jan 2024 10:47:58 -0800 Subject: [PATCH] PTFE-1388 update HPA config and apiVersion (#108) --- charts/artifacts/templates/autoscaler.yaml | 2 +- charts/artifacts/values.yaml | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/charts/artifacts/templates/autoscaler.yaml b/charts/artifacts/templates/autoscaler.yaml index 931c368..ab910f0 100644 --- a/charts/artifacts/templates/autoscaler.yaml +++ b/charts/artifacts/templates/autoscaler.yaml @@ -1,4 +1,4 @@ -apiVersion: autoscaling/v1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ template "fullname" $ }} diff --git a/charts/artifacts/values.yaml b/charts/artifacts/values.yaml index 76f06e0..23830d1 100644 --- a/charts/artifacts/values.yaml +++ b/charts/artifacts/values.yaml @@ -86,7 +86,19 @@ deployment: ## of criterias to meet to scale up and down. ## autoscalerSpec: - targetCPUUtilizationPercentage: 90 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 50 + - type: Resource + resource: + name: memory + target: + type: AverageValue + averageValue: 500Mi artifacts: ## Configure resource requests and limits