diff --git a/charts/cups-airprint/templates/ingress.yaml b/charts/cups-airprint/templates/ingress.yaml index d1534fe..0919737 100644 --- a/charts/cups-airprint/templates/ingress.yaml +++ b/charts/cups-airprint/templates/ingress.yaml @@ -1,11 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "cups-airprint.fullname" . -}} {{- $svcPort := .Values.service.port -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $fullName }} @@ -34,8 +30,10 @@ spec: {{- range .paths }} - path: {{ . }} backend: - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} {{- end }} {{- end }} {{- end }}