Bug
charts/evolution/templates/ingress.yaml line 53 fails with nil pointer when backend is omitted from ingress.hosts[].paths[]:
template: evolution/templates/ingress.yaml:53:51: executing "evolution/templates/ingress.yaml" at <.backend.service.name>: nil pointer evaluating interface {}.service
Root cause
Line 53 uses {{ default $fullName .backend.service.name }} — when .backend is nil, accessing .service on nil panics. The default function doesn't short-circuit nil traversal.
# Line 53
name: {{ default $fullName .backend.service.name }}
Expected behavior
Omitting backend from paths should use the chart's default service name ($fullName) and port ($svcPort), as the default function suggests.
Workaround
Explicitly set backend in values:
ingress:
hosts:
- host: example.com
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: evolution
port:
number: 8080
Fix
Replace direct traversal with nil-safe access:
# Before
name: {{ default $fullName .backend.service.name }}
port:
number: {{ default (int $svcPort) (int .backend.service.port.number) }}
# After
name: {{ default $fullName (dig "backend" "service" "name" "" .) }}
port:
number: {{ default (int $svcPort) (dig "backend" "service" "port" "number" 0 . | int) }}
Or wrap in a conditional:
{{- if .backend }}
name: {{ default $fullName .backend.service.name }}
port:
number: {{ default (int $svcPort) (int .backend.service.port.number) }}
{{- else }}
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }}
Bug
charts/evolution/templates/ingress.yamlline 53 fails with nil pointer whenbackendis omitted fromingress.hosts[].paths[]:Root cause
Line 53 uses
{{ default $fullName .backend.service.name }}— when.backendis nil, accessing.serviceon nil panics. Thedefaultfunction doesn't short-circuit nil traversal.Expected behavior
Omitting
backendfrom paths should use the chart's default service name ($fullName) and port ($svcPort), as thedefaultfunction suggests.Workaround
Explicitly set
backendin values:Fix
Replace direct traversal with nil-safe access:
Or wrap in a conditional: