Commit Graph

7 Commits

Author SHA1 Message Date
Damien Grisonnet 229befd41d *: add webhooks client config service metrics
In order to better identify, prioritize, and debug webhook latency
issues it is important to have a metric that would point to the resource
it is responsible for.  However, it is not possible to have that
dimension in the metrics exposed by Kubernetes because of the unbound
cardinality that such a label would have.

The name of the webhook could be an alternative since it usually
contains some information about the resource that the webhook targets,
however this is not very practical to use in multi-tenants
environments.

A solution for these kind of platform is to tie a specific webhook to a
namespace in order to be able to know which tenant manages it and take
actions depending on that. This is achieveable by leveraging the client
config information of webhooks configured via WebhookConfiguration
resources since Services are namespaced objects.

With these new metrics, users will be able to split the alerting
severity of webhook latency / rejection rate per namespace on top of
being able to do it based on the webhook name. This is key in
environment where administrators don't have control over the webhooks
installed by the various tenants.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2023-07-04 18:20:34 +02:00
Quentin Bisson 7250bc2b5c
Update go module path to k8s.io/kube-state-metrics/v2
Signed-off-by: Quentin Bisson <quentin@giantswarm.io>
2020-09-21 10:58:08 +02:00
qw1mb0 59e0e0cf05 switch mutatingwebhookconfiguration to v1 2020-05-16 20:41:16 +03:00
Kubernetes Prow Robot 73d55ba141
Merge pull request #989 from clamoriniere/feature/customBuilder
Add the possibility to provide “custom” metric-store to the builder
2020-01-09 03:47:45 -08:00
Lili Cosic 087c381d5f internal/store/*: Move resource version to value from label
The resource version metrics expose the resource version as a string in the label.
This value can change often and would therefore create huge cardinality.

This changes is to be the number value of the metric itself instead.
2019-12-20 15:55:30 +01:00
cedric lamoriniere 72ad3cb412 Remove FamilyByteSlicer interface
- To allow other external Stores, remove the `FamilyByteSlicer` interface
  and give access directly to `metric.Family`.
- Move functions present in `pkg/metric/generator.go` to a dedicated package
  `generator` in `pkg/metric_generator/generator.go`.

Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>
2019-12-13 10:50:19 +01:00
Nataly Sheinin 99623defbe
add mutatingwebhookconfiguration, validatingwebhookconfiguration metrics 2019-10-03 14:23:18 -04:00