External IP nginx issue

When using the values.yml to configure an external IP and custom port for the RasaX server I get a parsing error but not on my file. The parsing error is found in rasa-x/templates/nginx-service.yaml error converting YAML to JSON: yaml: line 21: could not find expected ':'

This is my nginx values file

  enabled: true
  name: "rasa/nginx"
    type: LoadBalancer
    port: 80
    externalIPs: redacted

And this is the official helm chart file the parsing error is found on.

{{- if .Values.nginx.enabled }}
apiVersion: "v1"
kind: "Service"
  name: {{ include "rasa-x.fullname" . }}-nginx
    {{ include "rasa-x.labels" . | nindent 4 }}
    app.kubernetes.io/component: nginx
{{- with .Values.nginx.service.annotations }}
    {{- toYaml . | nindent 4 }}
{{- end }}
  - port: {{ .Values.nginx.service.port }}
    targetPort: 8080
    protocol: "TCP"
    name: "http"
    {{- if .Values.nginx.service.nodePort }}
    nodePort: {{ .Values.nginx.service.nodePort }}
  {{- end }}
    {{- if .Values.nginx.service.externalIPs }}
  externalIPs: {{ .Values.nginx.service.externalIPs | toYaml | nindent 2 }}
    {{- end }}
  type: {{ .Values.nginx.service.type }}
    {{- include "rasa-x.selectorLabels" . | nindent 4 }}
    app.kubernetes.io/component: nginx
{{- end }}

I’m not sure which line is line 21 based on your snippets - do you know which one it was?

Yeah I am sorry that was confusing. Line 21 is the one that says {{ -end }} right after nodePort: {{.Values.nginx.service.nodePort }}

Additional information: I am using the official helm chart, the only thing I did different from the tutorial was adding custom nginx values to the values.yml file. When I deploy without these custom values everything works just fine.

My values.yml parses just fine, the parsing error is in the helm chart and I would try to solve it and ask for a merge request but I don’t see anything wrong.

What happens if you do a helm lint?