helm chart error can’t evaluate field Values in type interface {}

Isn’t it just scope issue?

Try something as below

{{- $fullName := include "mychart.fullname" . -}}
{{- $networkAppPort  := .Values.network.appPort -}}
...
.... omitted code
...
      http:
        paths:
        {{- range .paths }}
          - path: {{ . }}
            backend:
              serviceName: {{ $fullName }}
              servicePort: {{ $networkAppPort }}
        {{- end }}
  {{- end }}

Leave a Comment