Kustomize replacements
does not work with patches
#5429
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
What happened?
I am changing the existing code by replacing
vars
withreplacements
following the warning here.I have a
_base
folder that has a default set of resources, inkustomization.yaml
I definereplacements
to patch aRole
resource with a secret name that is stored inConfigMap
(I'll share manifests in 3rd section) to restrict access only to that secret that is generated lately byDeployment
. The var$(KUBE_SECRET)
is replaced, it's working fine.But when I patch a secret name in the
ConfigMap
viapatches
in overlay kustomization,replacements
does not update a secret name in aRole
resource, it just passes the default name set inConfigMap
in a base folder.What did you expect to happen?
Since it's working with
vars
, I expectreplacements
to substitute a variable inRole
resource with a value provided bypatch
from overlay.How can we reproduce it (as minimally and precisely as possible)?
Expected output
Actual output
Kustomize version
5.0.3
Operating system
Linux
The text was updated successfully, but these errors were encountered: