File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,11 @@ var _ = SIGDescribe("client-go should negotiate", func() {
64
64
// this is allowed
65
65
case watch .Error :
66
66
err := errors .FromObject (evt .Object )
67
- if errors .IsGone (err ) {
67
+ // In Kubernetes 1.17 and earlier, the api server returns both apierrs.StatusReasonExpired and
68
+ // apierrs.StatusReasonGone for HTTP 410 (Gone) status code responses. In 1.18 the kube server is more consistent
69
+ // and always returns apierrs.StatusReasonExpired. For backward compatibility we can only remove the apierrs.IsGone
70
+ // check when we fully drop support for Kubernetes 1.17 servers from reflectors.
71
+ if errors .IsGone (err ) || errors .IsResourceExpired (err ) {
68
72
// this is allowed, since the kubernetes object could be very old
69
73
break
70
74
}
You can’t perform that action at this time.
0 commit comments