-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transformers: PrefixSuffixTransformer applied partially in referenced resources #4428
Comments
/assign @Serializator |
In https://github.com/kubernetes-sigs/kustomize/blob/master/api/filters/nameref/nameref.go#L308-L333 When performing e.g. the When performing a @natasha41575, I feel like there needs to be a filter / comparison of the origin as well (to check from which Kustomize manifest the generated resource originated and if that matches), or am I missing something? Trying to figure out the best approach to solve the issue. |
@Serializator I haven’t been able to look at this issue in much depth, but using origin will not work; the origin is only tracked if the build option is set. In most cases the origin will be nil. |
@natasha41575, I noticed it being nil, thank you for the explanation as to why! |
/triage accepted |
any update on this one? Thanks |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
This issue has not been updated in over 1 year, and should be re-triaged. You can:
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/ /remove-triage accepted |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten |
Describe the bug
Using PrefixSuffixTransformer via
transformers
field to add a prefix to configs/secrets works correctly when build is invoked directly on the kustomization.yaml that uses it, but works only partially when build is invoked on a kustomization.yaml that references viaresources
the kustomization.yaml that uses the transformer.Partially means that the prefix is added to the configmap definition, but not to the references to the configmap in a deployment.
This means that you can have something like this:
where the
config
ConfigMap is namedbar-config-27ch7b2kbt
when defined and justconfig
when used in the deployment.Files that can reproduce the issue
(Anyway, I have attached them to the issue)
./bar/deployment.yaml
./bar/kustomization.yaml
./bar/kustomizeconfig.yaml
./foo/deployment.yaml
./foo/kustomization.yaml
./foo/kustomizeconfig.yaml
./kustomization.yaml
If you run
kustomize build .
you can see the bug, if you runkustomize build foo
orkustomize build bar
you don't see any bug.Expected output
Actual output
Kustomize version
{Version:kustomize/v4.0.5 GitCommit:9e8e7a7fe99ec9fbf801463e8607928322fc5245 Bui
ldDate:2021-03-08T20:53:03Z GoOs:windows GoArch:amd64}
Platform
Windows
trasformers-not-applied.zip
The text was updated successfully, but these errors were encountered: