-
Notifications
You must be signed in to change notification settings - Fork 167
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
metadata.resourceVersion: Invalid value: 0x0: must be specified for an update #403
Comments
|
Ahhh, |
I don't see an obvious reason. Can you explain for future readers?
|
I was calling So doing a |
Aha. Sounds similar to
kubernetes/kubernetes#70674
I thought you can always PST / PUT without `resourceVersion` but
apparently it depends on kind now :-(
`update_` is PUT, a complete replacement.
If you only want to change some fields, try the `*patch_` methods (without
passing resourceVersion) - theae do atomic merge on server, I expect that'll
always work.
If you do want replacement:
If you're able to `create_` without resourceVersion, maybe you can omit it
from `update_` too (?)
if not, you'll have to do `get_` and then `update_` with same
resourceVersion, and retry in case of a race (if somebody else updated the
object between GET and PUT, the version won't match, it's like rebasing to
solve a merge conflict)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey,
I'm trying to update a resource, but having no joy.
Here's the object dumped out:
And I'm simply doing:
@api.update_sidecar(object)
?Any ideas?
The text was updated successfully, but these errors were encountered: