fix ingress

master
Marius Ensrud 4 years ago
parent 26910165b0
commit 597dbce42c

@ -1,11 +1,7 @@
{{- if .Values.ingress.enabled -}} {{- if .Values.ingress.enabled -}}
{{- $fullName := include "wordpress.fullname" . -}} {{- $fullName := include "wordpress.fullname" . -}}
{{- $svcPort := .Values.service.port -}} {{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress kind: Ingress
metadata: metadata:
name: {{ $fullName }} name: {{ $fullName }}
@ -34,8 +30,9 @@ spec:
{{- range .paths }} {{- range .paths }}
- path: {{ .path }} - path: {{ .path }}
backend: backend:
serviceName: {{ $fullName }} name: {{ $fullName }}
servicePort: {{ $svcPort }} port:
number: {{ $svcPort }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}

Loading…
Cancel
Save