Merge pull request #5940 from Skaronator/propagate-namespaces

fix: Propagate Namespace correctly to Helm
This commit is contained in:
Kubernetes Prow Robot
2025-08-21 04:07:05 -07:00
committed by GitHub
7 changed files with 460 additions and 46 deletions

View File

@@ -51,6 +51,12 @@ func (p *NamespaceTransformerPlugin) Transform(m resmap.ResMap) error {
// Don't mutate empty objects?
continue
}
if origin, err := r.GetOrigin(); err == nil && origin != nil {
if origin.ConfiguredBy.Kind == "HelmChartInflationGenerator" {
// Don't apply namespace on Helm generated manifest. Helm should take care of it.
continue
}
}
r.StorePreviousId()
if err := r.ApplyFilter(namespace.Filter{
Namespace: p.Namespace,