Merge pull request #106934 from spencer-p/spencer-master

Document when workqueue metrics are dropped

Kubernetes-commit: a88462e901710ab5df1fa6e99a046aa921dcdd55
This commit is contained in:
Kubernetes Publisher 2021-12-14 16:18:18 -08:00
commit 6096096391
4 changed files with 9 additions and 5 deletions

4
go.mod
View File

@ -30,7 +30,7 @@ require (
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
google.golang.org/protobuf v1.27.1 google.golang.org/protobuf v1.27.1
k8s.io/api v0.0.0-20211213171716-0820d150f9ee k8s.io/api v0.0.0-20211213234601-b7112c1b6e9e
k8s.io/apimachinery v0.0.0-20211213171520-e65876e14280 k8s.io/apimachinery v0.0.0-20211213171520-e65876e14280
k8s.io/klog/v2 v2.30.0 k8s.io/klog/v2 v2.30.0
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65
@ -40,6 +40,6 @@ require (
) )
replace ( replace (
k8s.io/api => k8s.io/api v0.0.0-20211213171716-0820d150f9ee k8s.io/api => k8s.io/api v0.0.0-20211213234601-b7112c1b6e9e
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211213171520-e65876e14280 k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211213171520-e65876e14280
) )

4
go.sum
View File

@ -610,8 +610,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
k8s.io/api v0.0.0-20211213171716-0820d150f9ee h1:/v+7rD7h8qwNabJfpXzvxuE1pY6wcJODhRknvg+nQi4= k8s.io/api v0.0.0-20211213234601-b7112c1b6e9e h1:Fzjke98RMhnE6jv2L7ODA/aCizYxOAhovMGjdPrlU9c=
k8s.io/api v0.0.0-20211213171716-0820d150f9ee/go.mod h1:vmCvbkzTfBQjlMNSgh69E+3vHHcFdYVCXF20g8xtEaE= k8s.io/api v0.0.0-20211213234601-b7112c1b6e9e/go.mod h1:vmCvbkzTfBQjlMNSgh69E+3vHHcFdYVCXF20g8xtEaE=
k8s.io/apimachinery v0.0.0-20211213171520-e65876e14280 h1:1Vi6MSKuJbfiiUckP6GaHTGYZtqayWlyf/JItZRH8Rg= k8s.io/apimachinery v0.0.0-20211213171520-e65876e14280 h1:1Vi6MSKuJbfiiUckP6GaHTGYZtqayWlyf/JItZRH8Rg=
k8s.io/apimachinery v0.0.0-20211213171520-e65876e14280/go.mod h1:YpCy0BWvwSGZKMwmvPxCsfFJfl6vAwQdfVnPOJoUT2E= k8s.io/apimachinery v0.0.0-20211213171520-e65876e14280/go.mod h1:YpCy0BWvwSGZKMwmvPxCsfFJfl6vAwQdfVnPOJoUT2E=
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=

View File

@ -33,7 +33,9 @@ type DelayingInterface interface {
AddAfter(item interface{}, duration time.Duration) AddAfter(item interface{}, duration time.Duration)
} }
// NewDelayingQueue constructs a new workqueue with delayed queuing ability // NewDelayingQueue constructs a new workqueue with delayed queuing ability.
// NewDelayingQueue does not emit metrics. For use with a MetricsProvider, please use
// NewNamedDelayingQueue instead.
func NewDelayingQueue() DelayingInterface { func NewDelayingQueue() DelayingInterface {
return NewDelayingQueueWithCustomClock(clock.RealClock{}, "") return NewDelayingQueueWithCustomClock(clock.RealClock{}, "")
} }

View File

@ -34,6 +34,8 @@ type RateLimitingInterface interface {
// NewRateLimitingQueue constructs a new workqueue with rateLimited queuing ability // NewRateLimitingQueue constructs a new workqueue with rateLimited queuing ability
// Remember to call Forget! If you don't, you may end up tracking failures forever. // Remember to call Forget! If you don't, you may end up tracking failures forever.
// NewRateLimitingQueue does not emit metrics. For use with a MetricsProvider, please use
// NewNamedRateLimitingQueue instead.
func NewRateLimitingQueue(rateLimiter RateLimiter) RateLimitingInterface { func NewRateLimitingQueue(rateLimiter RateLimiter) RateLimitingInterface {
return &rateLimitingType{ return &rateLimitingType{
DelayingInterface: NewDelayingQueue(), DelayingInterface: NewDelayingQueue(),