Revert "fix: performance recession when propagating namespace to helm"

This reverts commit c7612d1dba.
This commit is contained in:
Niklas Wagner
2025-08-26 12:08:29 +02:00
parent 97d3a7c918
commit c8186c7c6f

View File

@@ -127,13 +127,11 @@ func (kt *KustTarget) MakeCustomizedResMap() (resmap.ResMap, error) {
} }
func (kt *KustTarget) makeCustomizedResMap() (resmap.ResMap, error) { func (kt *KustTarget) makeCustomizedResMap() (resmap.ResMap, error) {
// Only track origin if we have Helm charts or build metadata is requested // Track origin for all resources so builtins can make decisions
// This optimization avoids unnecessary overhead when origins aren't needed // based on where resources originated from.
var origin *resource.Origin // Origin annotations will be stripped from the output if not
if len(kt.kustomization.BuildMetadata) != 0 || len(kt.kustomization.HelmCharts) > 0 { // requested via build metadata options.
origin = &resource.Origin{} kt.origin = &resource.Origin{}
}
kt.origin = origin
ra, err := kt.AccumulateTarget() ra, err := kt.AccumulateTarget()
if err != nil { if err != nil {
return nil, err return nil, err