mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-03 16:16:06 +00:00
Fix bug in reflector not detecting "Too large resource version" error before 1.17.0
Kubernetes-commit: 11e5e92dc65c1caaeb248a60d90ccc8e29eb9ff0
This commit is contained in:
committed by
Kubernetes Publisher
parent
a13376f3fa
commit
7685b51912
7
tools/cache/reflector.go
vendored
7
tools/cache/reflector.go
vendored
@@ -23,6 +23,7 @@ import (
|
||||
"io"
|
||||
"math/rand"
|
||||
"reflect"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -693,5 +694,11 @@ func isTooLargeResourceVersionError(err error) bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
// Matches the message returned by api server before 1.17.0
|
||||
if strings.Contains(apierr.Status().Message, "Too large resource version") {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user