Skip to content

Commit

Permalink
decouple workqueue metrics from prometheus
Browse files Browse the repository at this point in the history
  • Loading branch information
Chao Xu committed Sep 30, 2016
1 parent a1b1a1a commit 21b46bf
Show file tree
Hide file tree
Showing 28 changed files with 275 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import (
"k8s.io/kubernetes/pkg/util/flowcontrol"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/pkg/watch"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
pkg_runtime "k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/pkg/watch"

"reflect"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import (
"k8s.io/kubernetes/pkg/util/sets"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/pkg/watch"

"k8s.io/kubernetes/pkg/conversion"
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/certificates/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
utilruntime "k8s.io/kubernetes/pkg/util/runtime"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/pkg/watch"

"github.com/cloudflare/cfssl/config"
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/daemon/daemoncontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import (
utilruntime "k8s.io/kubernetes/pkg/util/runtime"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates"
"k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache"

Expand Down
1 change: 1 addition & 0 deletions pkg/controller/deployment/deployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import (
utilruntime "k8s.io/kubernetes/pkg/util/runtime"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/pkg/watch"
)

Expand Down
1 change: 1 addition & 0 deletions pkg/controller/disruption/disruption.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
utilruntime "k8s.io/kubernetes/pkg/util/runtime"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/pkg/watch"

"github.com/golang/glog"
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/endpoint/endpoints_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import (
"k8s.io/kubernetes/pkg/util/sets"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/pkg/watch"

"github.com/golang/glog"
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/garbagecollector/garbagecollector.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import (
"k8s.io/kubernetes/pkg/util/sets"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/pkg/watch"
)

Expand Down
1 change: 1 addition & 0 deletions pkg/controller/garbagecollector/garbagecollector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import (
"k8s.io/kubernetes/pkg/util/json"
"k8s.io/kubernetes/pkg/util/sets"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
)

func TestNewGarbageCollector(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/job/jobcontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import (
utilruntime "k8s.io/kubernetes/pkg/util/runtime"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/pkg/watch"

"github.com/golang/glog"
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/namespace/namespace_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
utilruntime "k8s.io/kubernetes/pkg/util/runtime"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/pkg/watch"

"github.com/golang/glog"
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/petset/pet_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
utilruntime "k8s.io/kubernetes/pkg/util/runtime"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/pkg/watch"

"github.com/golang/glog"
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/replicaset/replica_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import (
utilruntime "k8s.io/kubernetes/pkg/util/runtime"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/pkg/watch"
)

Expand Down
1 change: 1 addition & 0 deletions pkg/controller/replication/replication_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import (
utilruntime "k8s.io/kubernetes/pkg/util/runtime"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/pkg/watch"
)

Expand Down
1 change: 1 addition & 0 deletions pkg/controller/resourcequota/resource_quota_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
utilruntime "k8s.io/kubernetes/pkg/util/runtime"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/pkg/watch"
)

Expand Down
1 change: 1 addition & 0 deletions pkg/controller/service/servicecontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import (
"k8s.io/kubernetes/pkg/util/runtime"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/pkg/watch"
)

Expand Down
1 change: 1 addition & 0 deletions pkg/controller/serviceaccount/tokens_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import (
"k8s.io/kubernetes/pkg/util/sets"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/util/workqueue"
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus"
"k8s.io/kubernetes/pkg/watch"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/util/workqueue/delaying_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func newDelayingQueue(clock clock.Clock, name string) DelayingInterface {
stopCh: make(chan struct{}),
waitingTimeByEntry: map[t]time.Time{},
waitingForAddCh: make(chan waitFor, 1000),
metrics: newRetryMetrics(name),
metrics: DefaultMetricsFactory.newRetryMetrics(name),
}

go ret.waitingLoop()
Expand Down
Loading

0 comments on commit 21b46bf

Please sign in to comment.