diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 3afc3cc63..9330c6c3d 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -154,7 +154,11 @@ const defaultIgnore = `# Patterns to ignore when building packages. const defaultIngress = `{{- if .Values.ingress.enabled -}} {{- $fullName := include ".fullname" . -}} {{- $svcPort := .Values.service.port -}} -apiVersion: networking.k8s.io/v1beta1 +{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} kind: Ingress metadata: name: {{ $fullName }}