Is there an existing issue for this?
Current Behavior
Fleet currently fails to detect Helm lookup usage when the lookup call is located inside helper templates defined in _helpers.tpl.
This causes charts that rely on helper-based lookup logic (such as gha-runner-scale-set) to fail when deployed through Fleet, even though they succeed with native Helm CLI.
The issue appears to be in hasLookupFunction() only inspecting t.Tree.Root and not traversing all parsed templates returned by t.Templates().
Expected Behavior
Fleet should detect lookup usage regardless of whether the function appears directly in a manifest template, inside a define block / _helpers.tpl or helper templates referenced through include/template.
Steps To Reproduce
A minimal reproducer:
_helpers.tpl
{{- define "mychart.lookupHelper" -}}
{{ lookup "v1" "Service" "default" "kubernetes" }}
{{- end -}}
configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: test
data:
value: {{ include "mychart.lookupHelper" . }}
Expected:
hasLookupFunction(chart) == true
Actual:
hasLookupFunction(chart) == false
Environment
- Architecture:
- Fleet Version:
- Cluster:
- Provider:
- Options:
- Kubernetes Version:
Logs
Anything else?
No response
Is there an existing issue for this?
Current Behavior
Fleet currently fails to detect Helm lookup usage when the lookup call is located inside helper templates defined in
_helpers.tpl.This causes charts that rely on helper-based lookup logic (such as
gha-runner-scale-set) to fail when deployed through Fleet, even though they succeed with native Helm CLI.The issue appears to be in
hasLookupFunction()only inspectingt.Tree.Rootand not traversing all parsed templates returned byt.Templates().Expected Behavior
Fleet should detect lookup usage regardless of whether the function appears directly in a manifest template, inside a define block / _helpers.tpl or helper templates referenced through include/template.
Steps To Reproduce
A minimal reproducer:
_helpers.tpl
configmap.yaml
Expected:
hasLookupFunction(chart) == trueActual:
hasLookupFunction(chart) == falseEnvironment
Logs
Anything else?
No response