diff --git a/template/CHART_NAME/templates/vpa.yaml b/template/CHART_NAME/templates/vpa.yaml index cd9371a8d8..f88cb3f9c3 100644 --- a/template/CHART_NAME/templates/vpa.yaml +++ b/template/CHART_NAME/templates/vpa.yaml @@ -3,7 +3,7 @@ Copyright Broadcom, Inc. All Rights Reserved. SPDX-License-Identifier: APACHE-2.0 */}} -{{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1/VerticalPodAutoscaler") .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.vpa.enabled }} +{{- if and (include "common.capabilities.apiVersions.has" ( dict "version" "autoscaling.k8s.io/v1/VerticalPodAutoscaler" "context" . )) .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.vpa.enabled }} apiVersion: autoscaling.k8s.io/v1 kind: VerticalPodAutoscaler metadata: diff --git a/template/CHART_NAME/values.yaml b/template/CHART_NAME/values.yaml index adf63ebf23..0bd13e0fb2 100644 --- a/template/CHART_NAME/values.yaml +++ b/template/CHART_NAME/values.yaml @@ -43,6 +43,9 @@ global: ## @param kubeVersion Override Kubernetes version ## kubeVersion: "" +## @param apiVersions Override Kubernetes API versions reported by .Capabilities +## +apiVersions: [] ## @param nameOverride String to partially override common.names.name ## nameOverride: ""