I'm trying to add ingress to my nginx container.
The following ingress template gives me "parse error (<>/ingress.yaml:71: unexpected EOF)". I went through trying mark possible missing end statements, but even adding arbitrary end at the end of file didn't fix it. I am out of ideas as to what causes this EOF.
So the question is the general: What causes "unexpected EOF" in the file?
{{- if .Values.web.ingress.enabled }}
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: {{ .Release.Name }}-proxy-ingress
labels:
tier: intelowl
component: proxy
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.labels }}
{{ toYaml . | indent 4 }}
{{- end }} # {{- with .Values.labels }}
{{- if .Values.web.ingress.annotations }}
annotations:
{{- with .Values.web.ingress.annotations }}
{{ toYaml . | indent 4 }}
{{- end }} # {{- with .Values.web.ingress.annotations }}
{{- end }} # {{- if .Values.web.ingress.annotations }}
spec:
{{- if .Values.web.ingress.tls.enabled }}
tls:
- hosts:
- {{ .Values.web.ingress.host }}
secretName: {{ .Values.web.ingress.tls.secretName }}
{{- end }} # {{- if .Values.web.ingress.tls.enabled }}
rules:
- http:
paths:
{{- range .Values.web.ingress.precedingPaths }}
- path: {{ .path }}
backend:
service:
name: {{ .serviceName }}
port:
number: {{ .servicePort }}
{{- end }} # {{- range .Values.web.ingress.precedingPaths }}
- backend:
service:
name: {{ .Release.Name }}-proxy
port:
number: {{ ternary 443 80 .Values.web.ingress.tls.enabled }}
{{- if .Values.web.ingress.path }}
path: {{ .Values.web.ingress.path }}
{{- end }} # {{- if .Values.web.ingress.path }}
{{- range .Values.web.ingress.succeedingPaths }}
- path: {{ .path }}
backend:
service:
name: {{ .serviceName }}
port:
number: {{ .servicePort }}
{{- end }} # {{- range .Values.web.ingress.succeedingPaths }}
{{- if .Values.web.ingress.host }}
host: {{ .Values.web.ingress.host }}
{{- end }} # {{- if .Values.web.ingress.host }}
{{- end }} # {{- if .Values.web.ingress.enabled }}