Commit Graph

8 Commits

Author SHA1 Message Date
fpetkovski 83887f1611 Replace multiListerWatcher with independent listWatchers per namespace
The multiListerWatcher is a composite object encapsulating multiple
ListerWatchers and implements the ListerWatcher interface.
With the current implementation, when an individual lister fails, the
entire List operation fails. This causes no metrics to be shown when KSM
has no permissions to a single namespace.

In addition to this, the multiListerWatcher takes advantage of internal
implementation details if the client-go library by modifiying and
relying on the ResourceVersion metadata field. This introduces a bug
where reconnecting to the API server will break the multiListerWatcher
completely.

This commit replaces the multiListerWatcher with individual
ListerWatchers per each configured namespace, resolving both issues.

Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
2021-06-29 13:27:57 +02:00
lou-lan 483b77a523 Fix gzip writer 2021-02-15 21:57:20 +08:00
Lili Cosic 4093cb34de Adjust klog to klog/v2 2020-10-05 15:29:12 +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
Prabhakar Mishra 0ff5482079 update client-go, k/api, k/apimachinery to v1.18.6 and vertical-pod-autoscaler to commit b7922d74509c
use clientgofix library

add context parameter in verticalpodautoscaler

rename PodDisruptionsAllowed to DisruptionsAllowed because of PR 85863 in k8s repo

lint fixes and rename PodDisruptionsAllowed to DisruptionsAllowed in test file

run go mod tidy
2020-07-30 01:54:34 +02:00
cedric lamoriniere 494efc6fe5 [Builder] Allow custom Store generation func
- Use `cache.Store` interface for genericity and extensibility.
- Add `WithCustomGenerateStoreFunc` method to `Builder` struct for allowing
  custome metrics Stores generation.

Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>
2019-12-13 10:49:13 +01:00
Ben Wells a6fa888e73 Remove unnecessary type conversion 2019-10-06 10:38:11 +01:00
Frederic Branczyk f3d41de450
Add auto detecting of sharding
main_test.go: Add model based test for sharding

In order to ensure a sharded system behaves equal to an unsharded
system, a model based test has been introduced. It scrapes an unsharded
setup and compares its output with the union of a sharded setup
therefore ensuring semantic equality.
2019-08-30 22:45:35 +02:00