Skip to content

kustomize 5.8.1 references generated configMaps and secrets incorrectly in Helm generated deployments #6077

@mfredenhagen

Description

@mfredenhagen

What happened?

kustomize v5.8.1 does not use the correct name of a generated configMap or secret when patching a deployment generated by Helm. It just uses the name without the hash. The same works flawlessly with kustomize v5.7.1
Please see the attached reproducer example.

kustomize-helm-configMap-reproducer.tgz

What did you expect to happen?

Same behaviour as in kustomize v5.7.1 and earlier.

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

see attached files

Expected output

apiVersion: v1
data:
  config: foo
kind: ConfigMap
metadata:
  name: test-config-g46hh6k8tf
--
        secret:
          defaultMode: 292
          secretName: test-secret-gh24bh7t8g
      - configMap:
          defaultMode: 292
          name: test-config-g46hh6k8tf

Actual output

apiVersion: v1
data:
  config: foo
kind: ConfigMap
metadata:
  name: test-config-g46hh6k8tf
--
        secret:
          defaultMode: 292
          secretName: test-secret
      - configMap:
          defaultMode: 292
          name: test-config

Kustomize version

v5.8.1

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