Skip to content

Commit 2effcd1

Browse files
authored
feat: update chart template to use new helper for checking API versions (#32068)
1 parent b699d25 commit 2effcd1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

template/CHART_NAME/templates/vpa.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright Broadcom, Inc. All Rights Reserved.
33
SPDX-License-Identifier: APACHE-2.0
44
*/}}
55

6-
{{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1/VerticalPodAutoscaler") .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.vpa.enabled }}
6+
{{- if and (include "common.capabilities.apiVersions.has" ( dict "version" "autoscaling.k8s.io/v1/VerticalPodAutoscaler" "context" . )) .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.vpa.enabled }}
77
apiVersion: autoscaling.k8s.io/v1
88
kind: VerticalPodAutoscaler
99
metadata:

template/CHART_NAME/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ global:
4343
## @param kubeVersion Override Kubernetes version
4444
##
4545
kubeVersion: ""
46+
## @param apiVersions Override Kubernetes API versions reported by .Capabilities
47+
##
48+
apiVersions: []
4649
## @param nameOverride String to partially override common.names.name
4750
##
4851
nameOverride: ""

0 commit comments

Comments
 (0)