File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change @@ -4,22 +4,8 @@ import (
44 "sync"
55
66 "k8s.io/klog/v2"
7-
8- "github.com/prometheus/client_golang/prometheus"
9- )
10-
11- var notificationUsage = prometheus .NewCounterVec (
12- prometheus.CounterOpts {
13- Name : "pod_identity_cache_notifications" ,
14- Help : "Counter of SA notifications" ,
15- },
16- []string {"method" },
177)
188
19- func init () {
20- prometheus .MustRegister (notificationUsage )
21- }
22-
239type notifications struct {
2410 handlers map [string ]chan struct {}
2511 mu sync.Mutex
@@ -37,12 +23,10 @@ func (n *notifications) create(req Request) <-chan struct{} {
3723 n .mu .Lock ()
3824 defer n .mu .Unlock ()
3925
40- notificationUsage .WithLabelValues ("used" ).Inc ()
4126 notifier , found := n .handlers [req .CacheKey ()]
4227 if ! found {
4328 notifier = make (chan struct {})
4429 n .handlers [req .CacheKey ()] = notifier
45- notificationUsage .WithLabelValues ("created" ).Inc ()
4630 n .fetchRequests <- & req
4731 }
4832 return notifier
@@ -53,7 +37,6 @@ func (n *notifications) broadcast(key string) {
5337 defer n .mu .Unlock ()
5438 if handler , found := n .handlers [key ]; found {
5539 klog .V (5 ).Infof ("Notifying handlers for %q" , key )
56- notificationUsage .WithLabelValues ("broadcast" ).Inc ()
5740 close (handler )
5841 delete (n .handlers , key )
5942 }
You can’t perform that action at this time.
0 commit comments