kubeclient icon indicating copy to clipboard operation
kubeclient copied to clipboard

Support for client-side apply

Open KaoruDev opened this issue 4 years ago • 2 comments

Is there a reason why client-side apply is not supported? I know that server-side apply is better, but my current team uses clients like Lens to manage their workloads. Testing it locally I believe Lens uses client-side apply. Looking at the managed_fields property reveals that client-side apply changes the field manager from the original field manager.

I suppose I can just use --server-side --force-conflict for now until we migrate everything? Is that the suggested migration path? I'd be happy to add it to the README.md if it is.

Cluster version: 1.18 Client version: 1.22

KaoruDev avatar Oct 23 '21 14:10 KaoruDev

Mainly because nobody implemented the necessary logic in kubeclient :-). PRs welcome.

I don't know enough to comment on safety of mixing the two and --force-conflict...

cben avatar Oct 24 '21 09:10 cben

See #358 for previous discussion and links.

There are two parts there:

  • if you want to start from a yaml file with arbitrary resource types, kubeclient is missing the plumbing to create apporpriate Client objects.
  • the merging logic itself, given a Client object for correct API group and a desired state.

cben avatar Oct 24 '21 09:10 cben