Skip to content
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

Feature: Apply patches to name prefixed resources #316

Closed
mxey opened this issue Sep 3, 2018 · 6 comments
Closed

Feature: Apply patches to name prefixed resources #316

mxey opened this issue Sep 3, 2018 · 6 comments

Comments

@mxey
Copy link
Contributor

mxey commented Sep 3, 2018

Scenario: I have several instances (overlays) of an application (base) that I want to combine into combined Kustomizations to apply them as one.

In that Kustomization, I want to apply patches. If I use the un-prefixed name of a resource, the patch will be ambiguous. If I use the prefixed name, Kustomize cannot find the resource.

@Liujingfang1
Copy link
Contributor

In kustomize, the patch file doesn't need to include nameprefix in the object name since we don't want users to browse all files and calculate the proper name to use in the patch. But I do see that your use case is quite reasonable and Kustomize should support it.

One possible solution is to add some enhancement on current applying patch process. When multiple objects are found for one patch, we can do a second round filtering by prefix.

@mxey
Copy link
Contributor Author

mxey commented Sep 5, 2018

One possible solution is to add some enhancement on current applying patch process. When multiple objects are found for one patch, we can do a second round filtering by prefix.

I think that makes sense.

@guyromb
Copy link

guyromb commented Dec 20, 2018

+1

@jcassee
Copy link
Contributor

jcassee commented Apr 1, 2019

This is becoming a problem in our situation. I have a couple of bases that are being reused in a single overlay. For example, the PersistentVolumeClaim of different Postgres bases need different sizes patched in.

@Liujingfang1 Can you give some code pointers on where that second name matching round would need to be added?

@mildred
Copy link

mildred commented May 28, 2019

The fact that resources are referenced with their names without prefix and suffix applied could cause other issues such as #800 (just guessing though)

@monopole
Copy link
Contributor

Calling this fixed by #1183, which is in v2.1.0. Added a test to cover in #1278.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants