mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-14 02:20:53 +00:00
fix: apply namespace propagation for helmCharts only
This commit is contained in:
@@ -168,8 +168,13 @@ var generatorConfigurators = map[builtinhelpers.BuiltinPluginType]func(
|
||||
c.HelmChart = chart
|
||||
// Pass kustomize namespace to helm
|
||||
// Fixes https://github.com/kubernetes-sigs/kustomize/issues/5566
|
||||
if c.HelmChart.Namespace == "" && kt.kustomization.Namespace != "" {
|
||||
c.HelmChart.Namespace = kt.kustomization.Namespace
|
||||
// Also propagate parent namespace for multi-level kustomization hierarchies
|
||||
if c.HelmChart.Namespace == "" {
|
||||
if kt.kustomization.Namespace != "" {
|
||||
c.HelmChart.Namespace = kt.kustomization.Namespace
|
||||
} else if kt.parentNamespace != "" {
|
||||
c.HelmChart.Namespace = kt.parentNamespace
|
||||
}
|
||||
}
|
||||
p := f()
|
||||
if err = kt.configureBuiltinPlugin(p, c, bpt); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user