diff --git a/docs/lease-metrics.md b/docs/lease-metrics.md index 8d995116a3..a65e7ce8d2 100644 --- a/docs/lease-metrics.md +++ b/docs/lease-metrics.md @@ -1,6 +1,6 @@ # Lease Metrics -| Metric name| Metric type | Labels/tags | Status | -| ---------- | ----------- | ----------- | ----------- | -| kube_lease_owner | Gauge | `lease`=<lease-name>
`owner_kind`=<onwer kind>
`owner_name`=<owner name> | EXPERIMENTAL | -| kube_lease_renew_time | Gauge | `lease`=<lease-name> | EXPERIMENTAL | +| Metric name| Metric type | Labels/tags | Status | +| ---------- | ----------- |-------------------------------------------------------------------------------------------------------------------------------------------| ----------- | +| kube_lease_owner | Gauge | `lease`=<lease-name>
`owner_kind`=<onwer kind>
`owner_name`=<owner name>
`namespace` = <namespace> | EXPERIMENTAL | +| kube_lease_renew_time | Gauge | `lease`=<lease-name>
`namespace` = <namespace> | EXPERIMENTAL | diff --git a/internal/store/lease.go b/internal/store/lease.go index f503bba797..f7031147b9 100644 --- a/internal/store/lease.go +++ b/internal/store/lease.go @@ -107,10 +107,10 @@ func wrapLeaseFunc(f func(*coordinationv1.Lease) *metric.Family) func(interface{ func createLeaseListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - return kubeClient.CoordinationV1().Leases("kube-node-lease").List(context.TODO(), opts) + return kubeClient.CoordinationV1().Leases("").List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - return kubeClient.CoordinationV1().Leases("kube-node-lease").Watch(context.TODO(), opts) + return kubeClient.CoordinationV1().Leases("").Watch(context.TODO(), opts) }, } }