fix(k8s): upgrade ingress API
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "chime.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 }}
@@ -35,8 +31,10 @@ spec:
{{- range .paths }}
- path: {{ . }}
backend:
- serviceName: {{ $fullName }}
- servicePort: {{ $svcPort }}
+ service:
+ name: {{ $fullName }}
+ port:
+ number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
