diff --git a/cost-analyzer/templates/cost-analyzer-ingress-template.yaml b/cost-analyzer/templates/cost-analyzer-ingress-template.yaml index e8a441dee..f229a5628 100644 --- a/cost-analyzer/templates/cost-analyzer-ingress-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-ingress-template.yaml @@ -5,7 +5,7 @@ {{- $ingressPaths := .Values.ingress.paths -}} {{- $ingressPathType := .Values.ingress.pathType -}} {{- $apiV1 := false -}} -{{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare "^1.19-0" .Capabilities.KubeVersion.GitVersion) }} +{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} {{- $apiV1 = true -}} apiVersion: networking.k8s.io/v1 {{ else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}