Skip to content

v5.8.0 breaks namespace behaviour in HelmChartInflationGenerator #6014

@janjagusch

Description

@janjagusch

What happened?

With v5.8.0, the namespace is no longer present in the rendered manifests.

With Kustomize v5.7.1

$ kustomize build --enable-helm --output rendered .
$  grep -R "namespace:" rendered
rendered/v1_serviceaccount_secret-generator.yaml:  namespace: secret-generator
rendered/apps_v1_deployment_secret-generator.yaml:  namespace: secret-generator
rendered/v1_secret_secret-generator-tls.yaml:  namespace: secret-generator
rendered/admissionregistration.k8s.io_v1_mutatingwebhookconfiguration_secret-generator.yaml:      namespace: secret-generator

With Kustomize v5.8.0

$ kustomize build --enable-helm --output rendered .
grep -R "namespace:" rendered
rendered/admissionregistration.k8s.io_v1_mutatingwebhookconfiguration_secret-generator.yaml:      namespace: secret-generator

(The match under rendered/admissionregistration.k8s.io_v1_mutatingwebhookconfiguration_secret-generator.yaml seems to be hard-coded and has nothing to do with the problem I'm describing)

What did you expect to happen?

I would expect the the namespace to be still present in all rendered manifests.

How can we reproduce it (as minimally and precisely as possible)?

├── generators
│   ├── helm.yaml
│   └── kustomization.yaml
└── kustomization.yaml
# kustomization.yaml
namespace: secret-generator
generators:
  - generators
# generators/kustomization.yaml
resources:
  - helm.yaml
# generators/helm.yaml
apiVersion: builtin
kind: HelmChartInflationGenerator
metadata:
  name: secret-generator
name: secret-generator
repo: oci://ghcr.io/sap/secret-generator-helm
releaseName: secret-generator
version: 0.4.68
namespace: secret-generator
skipTests: true

Expected output

No response

Actual output

No response

Kustomize version

5.8.0

Operating system

MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions