kubernetes-client icon indicating copy to clipboard operation
kubernetes-client copied to clipboard

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

Open metacosm opened this issue 1 year ago • 0 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

metacosm avatar May 16 '24 14:05 metacosm