-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Repeated createOrReplace with a service fails #3122
Comments
Understanding a little more about what is happening, the server is trying to allocate the ip rather than first seeing if the there's a create conflict. The only way to smooth this over would be override create(service) and look for a 422 and determine if it should be a conflict instead. @rohanKanojia is there anything that should be done here? |
bdw, we will see the same behavior with
However, if I only provide original object in create I see that we get 409:
Note that this is working when using |
Yes, IIRC the issue had to do with the nodePort or IP already allocated. Since this value is provided, it can't be reused (what Steven says here) |
I went ahead and closed the pr - while this does seem to be odd behavior by the api server, it's probably not worth trying to workaround in the way that I was thinking. Our operator is always using the existing object as the base for calls to createOrReplace, so I'll just update the calling logic to use a null clusterIp. |
If you do:
The second call will fail with:
The text was updated successfully, but these errors were encountered: