fabric8io / kubernetes-client

Java client for Kubernetes & OpenShift

Home Page:http://fabric8.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add utility method to easily create a named/namespaced empty copy of a given resource

metacosm opened this issue · comments

Is your enhancement related to a problem? Please describe

When using Server-Side Apply, it is often required to send only the modified state instead of the full resource. This requires creating copies of resources with only the desired fields set. While this is perfectly doable now, having a utility method to remove some of the boiler plate of creating such a new instance (i.e. instantiation and metadata creation + setting) would be helpful.

Describe the solution you'd like

New HasMetadata factory methods to perform such operations.

Describe alternatives you've considered

No response

Additional context

No response