From 1fd2a2f5e4aafdb08db1301bdc984dc3c4178924 Mon Sep 17 00:00:00 2001 From: slavogiez Date: Tue, 14 Feb 2023 11:40:20 +0100 Subject: [PATCH] fix(hpa) enhance api version detection --- charts/kong/templates/_helpers.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/kong/templates/_helpers.tpl b/charts/kong/templates/_helpers.tpl index 6f0ef69a0..9809fc8bb 100644 --- a/charts/kong/templates/_helpers.tpl +++ b/charts/kong/templates/_helpers.tpl @@ -1398,9 +1398,9 @@ extensions/v1beta1 {{- end -}} {{- define "kong.autoscalingVersion" -}} -{{- if (.Capabilities.APIVersions.Has "autoscaling/v2") -}} +{{- if (.Capabilities.APIVersions.Has "autoscaling/v2/HorizontalPodAutoscaler") -}} autoscaling/v2 -{{- else if (.Capabilities.APIVersions.Has "autoscaling/v2beta2") -}} +{{- else if (.Capabilities.APIVersions.Has "autoscaling/v2beta2/HorizontalPodAutoscaler") -}} autoscaling/v2beta2 {{- else -}} autoscaling/v1