Unverified Commit 068e1642 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #58735 from liggitt/server-unavailable-errors

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Distinguish service unavailable errors in client-go related to https://github.com/kubernetes/kubernetes/issues/58642 the server is returning correct errors, but the client was not distinguishing service unavailable errors from general 5xx errors ```release-note NONE ```
parents 7de1a8e0 ca2eba70
...@@ -366,6 +366,9 @@ func NewGenericServerResponse(code int, verb string, qualifiedResource schema.Gr ...@@ -366,6 +366,9 @@ func NewGenericServerResponse(code int, verb string, qualifiedResource schema.Gr
case http.StatusUnprocessableEntity: case http.StatusUnprocessableEntity:
reason = metav1.StatusReasonInvalid reason = metav1.StatusReasonInvalid
message = "the server rejected our request due to an error in our request" message = "the server rejected our request due to an error in our request"
case http.StatusServiceUnavailable:
reason = metav1.StatusReasonServiceUnavailable
message = "the server is currently unable to handle the request"
case http.StatusGatewayTimeout: case http.StatusGatewayTimeout:
reason = metav1.StatusReasonTimeout reason = metav1.StatusReasonTimeout
message = "the server was unable to return a response in the time allotted, but may still be processing the request" message = "the server was unable to return a response in the time allotted, but may still be processing the request"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment