From 9137f1f5328a20c6e8b5d9efa7edd7e877b5e0bd Mon Sep 17 00:00:00 2001 From: Christian Heike Date: Tue, 30 May 2023 15:18:38 +0200 Subject: [PATCH] Changes from review --- .../assets/manifests/istio-discovery/templates/autoscale.yaml | 2 +- .../assets/manifests/istio-meshgateway/templates/autoscale.yaml | 2 +- .../manifests/istio-sidecar-injector/templates/autoscale.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/assets/manifests/istio-discovery/templates/autoscale.yaml b/internal/assets/manifests/istio-discovery/templates/autoscale.yaml index d3257c8a9..d262800e0 100644 --- a/internal/assets/manifests/istio-discovery/templates/autoscale.yaml +++ b/internal/assets/manifests/istio-discovery/templates/autoscale.yaml @@ -1,5 +1,5 @@ {{- if and (eq .Values.global.mode "ACTIVE") .Values.pilot.autoscaleEnabled .Values.pilot.autoscaleMin .Values.pilot.autoscaleMax }} -apiVersion: autoscaling/v2 +apiVersion: {{ ternary "autoscaling/v2" "autoscaling/v2beta2" (.Capabilities.APIVersions.Has "autoscaling/v2") }} kind: HorizontalPodAutoscaler metadata: name: {{ include "name-with-revision" ( dict "name" "istiod" "context" $) }} diff --git a/internal/assets/manifests/istio-meshgateway/templates/autoscale.yaml b/internal/assets/manifests/istio-meshgateway/templates/autoscale.yaml index 49e6493c6..ada47d32f 100644 --- a/internal/assets/manifests/istio-meshgateway/templates/autoscale.yaml +++ b/internal/assets/manifests/istio-meshgateway/templates/autoscale.yaml @@ -1,6 +1,6 @@ {{ $gateway := .Values.deployment }} {{- if and $gateway.autoscaleEnabled $gateway.autoscaleMin $gateway.autoscaleMax }} -apiVersion: autoscaling/v2 +apiVersion: {{ ternary "autoscaling/v2" "autoscaling/v2beta2" (.Capabilities.APIVersions.Has "autoscaling/v2") }} kind: HorizontalPodAutoscaler metadata: name: {{ $gateway.name }} diff --git a/internal/assets/manifests/istio-sidecar-injector/templates/autoscale.yaml b/internal/assets/manifests/istio-sidecar-injector/templates/autoscale.yaml index 5f6228cdf..6cb103e23 100644 --- a/internal/assets/manifests/istio-sidecar-injector/templates/autoscale.yaml +++ b/internal/assets/manifests/istio-sidecar-injector/templates/autoscale.yaml @@ -1,5 +1,5 @@ {{- if and .Values.deployment.autoscaleEnabled .Values.deployment.autoscaleMin .Values.deployment.autoscaleMax }} -apiVersion: autoscaling/v2 +apiVersion: {{ ternary "autoscaling/v2" "autoscaling/v2beta2" (.Capabilities.APIVersions.Has "autoscaling/v2") }} kind: HorizontalPodAutoscaler metadata: name: {{ include "name-with-revision" ( dict "name" "istio-sidecar-injector" "context" $) }}