Provide a way for subpackage resources to assume a unique identity
Describe your problem
When a kpt package is used to represent an application, by containing subpackages that provide functionality, these subpackages should ensure their resources have a unique identity, to avoid naming conflicts.
A name conflict arises when you:
kpt pkg get xxx packages/xxx1
kpt pkg get xxx packages/xxx2
Or when you get a package, that has a resource that is contained in another, different package.
For example, the ConfigMap for the apply-setters function.
One could argue that the first use case can be avoided by (a possible) convention: a blueprint should only be included once. If a user requires the resources multiple times, documentation and the package contents could guide the user towards manually creating another copy of the resource with their own naming.
I don't like this idea though. I like to think a user can just kpt pkg get multiple times to avoid a lot of manual yaml interactions.
Anyway, the second case is very hard to avoid without all package authors strictly following some kind of convention, or using a function to rename all resources.
Slack discussion: https://kubernetes.slack.com/archives/C0155NSPJSZ/p1657887288564579 This issue is a subset of https://github.com/GoogleContainerTools/kpt/issues/3292