Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A couple of oc commands should switch to PATCH #5287

Closed
0xmichalis opened this issue Oct 21, 2015 · 3 comments
Closed

A couple of oc commands should switch to PATCH #5287

0xmichalis opened this issue Oct 21, 2015 · 3 comments

Comments

@0xmichalis
Copy link
Contributor

oc env, oc edit (already switched upstream), and maybe oc tag are coming to my mind.

See:
kubernetes/kubernetes#15333
kubernetes/kubernetes#15651
kubernetes/kubernetes#15597

@deads2k
Copy link
Contributor

deads2k commented Oct 22, 2015

One thing to consider when deciding whether to switch to patch over replace: "is my change predicated on anything in the current state of the resource?". Non-conflicting patches are applied unconditionally against resourceVersion of the object. If your changes is predicated on anything in the current state, either continue to use update or fix patch to handle preconditions.

@liggitt
Copy link
Contributor

liggitt commented Oct 22, 2015

env I could see... for edit, I would want to know if I was stomping, I think

@deads2k
Copy link
Contributor

deads2k commented Oct 22, 2015

env I could see... for edit, I would want to know if I was stomping, I think

Not if you're using edit. It auto-generates the patch for you on conflicts, applies, and resends the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants