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