Skip to content

Commit

Permalink
update apiserver-identity KEP with metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Ojea committed Oct 8, 2021
1 parent 3133297 commit 6c0d14b
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions keps/sig-api-machinery/1965-kube-apiserver-identity/README.md
Expand Up @@ -115,6 +115,39 @@ The refresh rate, lease duration will be configurable through kube-apiserver
flags. The resync period will be configurable through a kube-controller-manager
flag.

Each kube-apiserver with expose the following metrics for its own ID:

```go
uptime := metrics.NewGaugeVec(
&metricsGaugeOpts{
Namespace: "apiserver",
Subsystem: "identity",
Name: "lease_uptime_seconds",
Help: "Lease uptime seconds, labeled by the kube-apiserver ID in the Lease object, show the uptime of the Lease",
StabilityLevel: metrics.ALPHA,
},
[]string{"name"},
success := metrics.NewCounterVec(
&metrics.CounterOpts{
Namespace: "apiserver",
Subsystem: "identity",
Name: "lease_success_count",
Help: "Lease success count, labeled by the kube-apiserver ID in the Lease object, counts the number of success renewing a Lease",
StabilityLevel: metrics.ALPHA,
},
[]string{"name"},
)
failures := metrics.NewCounterVec(
&metrics.CounterOpts{
Namespace: "apiserver",
Subsystem: "identity",
Name: "lease_failure_count",
Help: "Lease failure count, labeled by the kube-apiserver ID in the Lease object, counts the number of failures to renew a Lease",
StabilityLevel: metrics.ALPHA,
},
[]string{"name"},
```

### Test Plan

- integration test for creating the Namespace and the Lease on kube-apiserver
Expand Down

0 comments on commit 6c0d14b

Please sign in to comment.