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

metadata.resourceVersion: Invalid value: 0x0: must be specified for an update #403

Closed
Stono opened this issue Mar 26, 2019 · 5 comments
Closed

Comments

@Stono
Copy link

Stono commented Mar 26, 2019

Hey,
I'm trying to update a resource, but having no joy.

Here's the object dumped out:

#<Kubeclient::Resource apiVersion="networking.istio.io/v1alpha3", kind="Sidecar", metadata={:creationTimestamp=>"2019-03-26T17:22:55Z", :generation=>1, :name=>"nginx-external", :namespace=>"ingress-nginx", :resourceVersion=>"41276583", :selfLink=>"/apis/networking.istio.io/v1alpha3/namespaces/ingress-nginx/sidecars/nginx-external", :uid=>"cb4864e2-4feb-11e9-b629-42010aa4022a"}, spec=#<Kubeclient::Resource spec={:egress=>{:hosts=>["platform-alert-forwarder/*", "platform-testing/*", "ingress-nginx/oauth2-proxy", "ingress-nginx/ingress-nginx-external", "kube-system/kube-dns"]}}>>
W, [2019-03-26T17:23:01.094101 #49388]  WARN -- : [App::HandlerInvoker#rescue in invoke_handler] Handler Kubitzer::Handlers::PublicIngress failed to process create_apis_extensions_v1beta1_ingresses on extensions/v1beta1/Ingress/platform-testing-public/37204090, retry number: 0, reason: sidecars.networking.istio.io "nginx-external" is invalid: metadata.resourceVersion: Invalid value: 0x0: must be specified for an update

And I'm simply doing: @api.update_sidecar(object)?

Any ideas?

@Stono
Copy link
Author

Stono commented Mar 26, 2019

create_sidecar works fine by the way

@Stono
Copy link
Author

Stono commented Mar 26, 2019

Ahhh,
Ignore me i'm an idiot.

@Stono Stono closed this as completed Mar 26, 2019
@cben
Copy link
Collaborator

cben commented Mar 26, 2019 via email

@Stono
Copy link
Author

Stono commented Mar 26, 2019

I was calling update with a new resource, rather than taking the resource from a get and updating fields. I was expecting update to do a get/merge but it wasn't.

So doing a get then updating my spec field, then updating with that and it works

@cben
Copy link
Collaborator

cben commented Mar 26, 2019 via email

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

No branches or pull requests

2 participants