The _data path_ restrictions imposed in #700 have the unintended effect of blocking the reuse of patch files. #700 doesn't create a problem for resources, as the way to achieve resource reuse is through bases (different kustomizations can refer to the same base). A base is also a way to reuse generated resources like secrets and config maps, so #700 doesn't block generator reuse.
But patches are transformers. We can allow their reuse via the new transformers plugin notation (which will allow base-like addressing https://github.com/kubernetes/enhancements/pull/931) - or via a flag that disables the Loader restrictions.
See #998
Adding --load_restrictor none flag disables the thing blocking patch sharing.
@monopole: --load_restrictor none works when calling kustomize directly. Is something similar planned for kubectl apply/create --kustomize?
Most helpful comment
@monopole:
--load_restrictor noneworks when callingkustomizedirectly. Is something similar planned forkubectl apply/create --kustomize?