Commit Graph

102 Commits

Author SHA1 Message Date
Kubernetes Prow Robot 03e84f55d6
Merge pull request #1551 from dgrisonnet/revert-init-containers-requests
Revert init containers resource metrics rework
2021-09-30 06:06:08 -07:00
Gabi Davar 5016cca2de
add image_spec to pod (init)container info 2021-09-21 18:26:50 +03:00
Ids van der Molen 69e13ccb74 Add NodeAffinity and Shutdown to podStatusReasons 2021-09-14 20:42:12 +02:00
Damien Grisonnet 3040c54b8b pod: rm reworked init container resource metrics
These metrics are superseded by the Pod resource metrics initiative in
Kubernetes. In 2.0.0, we removed the reworked container resource
metrics, but omitted the init container ones although they are also
covered by the Kubernetes effort.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-20 18:47:34 +02:00
Sylvain Rabot 0e45534441
Merge remote-tracking branch 'origin/master' into annotations 2021-08-19 16:31:20 +02:00
Sylvain Rabot 96d08df5d0
Merge remote-tracking branch 'origin/master' into annotations 2021-08-16 08:50:02 +02:00
Lan Liang 3bbd8d5a88 Add arg use-api-server-cache to set resourceVersion=0 for ListWatch 2021-08-13 13:12:36 +08:00
fpetkovski a6eb25e3c6 rename buildStore to buildStores 2021-06-29 13:30:46 +02:00
Sylvain Rabot c0cb4755e5
Merge remote-tracking branch 'origin/master' into annotations 2021-06-07 15:34:15 +02:00
yeya24 09588f0c06 fix gocritic
Signed-off-by: yeya24 <yb532204897@gmail.com>
2021-05-10 18:40:50 -04:00
Sylvain Rabot 65bc62af5c
Add kube_*_annotations metrics
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2021-04-29 16:04:16 +02:00
Manuel Rüger 4302ea2c06 Replace deprecated io/ioutil
It was deprecated in golang 1.16, see:
https://golang.org/doc/go1.16#ioutil
2021-04-19 02:42:23 +02:00
Lili Cosic 81ca495c9e Merge remote-tracking branch 'upstream/release-2.0' into bring-release-2.0 2021-03-05 15:14:49 +01:00
Lili Cosic fa5e260535 internal/store/pod.go: Only create last_terminated containers series if pods are
terminated. This reduces the cardinality of this metric greatly, as it was
one of the highest cardinality metrics pre 2.0.
2021-02-24 16:59:53 +01:00
Lili Cosic 99838a5762 Adjust unit tests 2021-02-09 15:50:38 +01:00
Lili Cosic 9d147ca2b6 Adjust unit tests 2021-02-08 13:55:52 +01:00
Mikulas (Mike) Dite ba58b77bc8 Add shard_ordinal label
Facilitates many otherwise impossible promql queries
2021-01-18 14:52:04 +00:00
Mikulas (Mike) Dite 676c7a74d9 Expose sharding configuration via telemetry 2021-01-18 14:32:21 +00:00
Illya Chekrygin 4090e8b7aa
Add "uid" label to every pod metric to differentiate between pod instances with the same name.
Signed-off-by: Illya Chekrygin <illya.chekrygin@gmail.com>
2020-11-20 12:26:18 -08:00
Jimmy K Seto 122f2075c7 fix container resource limits metrics, which got dropped btwn 2.0.0-alpha.1 and 2.0.0-alpha.2 2020-11-03 11:42:57 -05:00
Jimmy K Seto 9078a53265 fix container resource limits metrics, which got dropped btwn 2.0.0-alpha.1 and 2.0.0-alpha.2 2020-11-02 14:48:04 -05:00
Eric Ernst 0cb814f725 pod: add gauge for runtimeclass handler
Add a metric gauge to provide observability for the runtimeclass
used for running a pod.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2020-10-26 08:03:31 -07:00
Lili Cosic b92fd141c8 Adjust unit tests 2020-10-26 14:04:34 +01:00
Kubernetes Prow Robot 3faa773aee
Merge pull request #1248 from kubernetes/master
Merge master into release-2.0
2020-10-05 01:57:05 -07:00
Joel Whittaker-Smith a11255320a Now references closure scoped family generator
Signed-off-by: Joel Whittaker-Smith <jdws.dev@gmail.com>
2020-09-28 13:57:51 +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
Joel Whittaker-Smith 908f87b2cd apply boundaries to metrics and allow via flag what labels to include
Signed-off-by: Joel Whittaker-Smith <jdws.dev@gmail.com>
2020-08-26 12:42:30 +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
vikkyomkar 692c597993 updated main_test.go file 2020-07-26 12:12:37 +05:30
Frederic Branczyk cd42164e42
internal/store: Add named resource pod overhead metrics
This patch turns the generic pod overhead metrics into one metric per
resource as per Prometheus best practices.
2020-07-16 10:34:52 +02:00
Frederic Branczyk fb261a1499
main_test.go: Fix named resource metrics 2020-07-15 16:17:59 +02:00
qw1mb0 bdb2e9284e add UnexpectedAdmissionError to kube_pod_status_reason metric 2020-05-16 21:19:25 +03:00
Frederic Branczyk 1610b64df8
pod: Add init container requests 2020-04-15 22:03:27 +02:00
Rustam Zagirov b61a3b320a add host_network to kube_pod_info 2020-03-18 21:23:37 +03:00
Olivier Lemasle 6fac7a2ddd Rename kube_pod_deleted to kube_pod_deletion_timestamp 2020-02-24 11:32:59 +01:00
Kubernetes Prow Robot a618eab33d
Merge pull request #1053 from egernst/overhead
pod: add gauges for pod overhead
2020-02-10 11:11:54 -08:00
Kubernetes Prow Robot 8dc870e47a Merge pull request #1006 from Alexander-Carpenter/resourceRename
v2: Rename collector to resource
2020-02-10 02:55:53 -08:00
Eric Ernst c1895cdec3 pod: add gauges for pod overhead
Add a metric guage to provide observability for the overhead associated
with running a pod.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2020-02-07 22:15:36 -08:00
Philip Gough 58e7c50270
store: Remove non-identifying labels from pod metrics
Fixes #979

test:store - Updates unit test to reflect removal of 'node' name from labels

test: Update main_test for removal of node label from pod metrics
2020-02-07 14:00:16 +00:00
Alexander-Carpenter 69fe7da267 Rename collector to resource 2020-02-05 19:43:23 -06:00
cedric lamoriniere 8f45cd8444 Add kube_pod_deleted and kube_pod_status_reason
Aim of this PullRequest is to add several new pod metrics:
- kube_pod_deleted: Unix deletion timestamp
- kube_pod_status_reason: The pod status reasons (NodeLost, Evicted)
These new metrics can be used to determine the `pod.status.phase`
displayed by `kubectl`: Running, Terminated, Unknown…
It will allow removing the `kubectl` display logic added previously
to compute the “Unknown” phase.

Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>
2020-02-05 18:55:21 +01:00
yeya24 da2dadcd3e remove deprecated metrics
Signed-off-by: yeya24 <yb532204897@gmail.com>

remove deprecated options

Signed-off-by: yeya24 <yb532204897@gmail.com>
2020-02-05 08:48:23 -05:00
Thibault Le Reste cb655340d6 Rename black-/whitelist to allow/deny-list 2020-02-03 17:05:11 +01:00
cedric lamoriniere 369470d6ea builder.WithGenerateStoreFunc() is now mandatory
This commit introduces the fact that build.WithGenerateStoreFunc()
needs to be used for configuring properly the `Builder` (like any other
`With...` method.

* rename: `WithCustomGenerateStoreFunc` to `WithGenerateStoreFunc`.
* remove buildStorFunc defaulting in `NewBuilder()` function
* add `DefaultGenerateStoreFunc()` method in `BuilderInterface`
* update `Builder initialisation` in `main.go`

Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>
2020-01-08 13:45:05 +01:00
rmartinez3 e818d5af0c adding Evicted to reasons terminated
adding evict reason to pod_test

adding to main_test evicted reason metrics
2019-11-26 12:54:58 -06: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
Frederic Branczyk 84d61f9a93
Introduce sharding 2019-08-30 13:51:30 +02:00
Lili Cosic 177916445a Address PR comments 2019-08-29 10:21:07 +02:00
Lili Cosic 21b1f61285 *: Add list/watch success/error count total metrics
When kube-state-metrics does not have the correct roles to list or watch
 on a resource, it just logs this error but not actually error out. This
is a problem as the pod never restars and it is hard to catch any
problems as other resource metrics continue to be created correctly. We
only see this error in the noisy kube-state-metrics logs.

This registers two metrics `kube_state_metrics_watch_total` and
`kube_state_metrics_list_total`. With the following labels:
"result" label is the type of action count relates to, error or success.
"resource" label contains the resource <apiVersion.Kind>.

This way we can do a rate alert when kube-state-metrics error rate is
too high.

Example of the metrics:
kube_state_metrics_list_total{resource="*v1.Namespace",result="success"} 1
kube_state_metrics_list_total{resource="*v1.Node",result="error"} 52
kube_state_metrics_watch_total{resource="*v1beta1.Ingress",result="success"} 1
2019-08-28 13:29:07 +02:00
Kubernetes Prow Robot beacbf9169
Merge pull request #835 from pigletfly/pod-unschedulable
feat: add kube_pod_status_unschedulable metric
2019-08-12 01:39:11 -07:00