Commit Graph

439 Commits

Author SHA1 Message Date
CatherineF-dev 941c6838fe
Merge pull request #2771 from nmn3m/kube-job-metric
feat: Add kube_job_status_ready metric
2025-09-17 10:00:44 -04:00
Nour 8db448006a
adding kube_job_status_ready metrics 2025-09-14 22:56:28 +03:00
Nour 9360a46c51
Promote metrics to stable 2025-09-14 21:59:23 +03:00
Kubernetes Prow Robot 0641627fd5
Merge pull request #2678 from IgorIgnatevBolt/feat-deletion-timestamp-resources
feat: introduce deletion timestamp metric for daemonset, statefulset, deployment, service and pdb
2025-08-24 22:41:07 -07:00
Kubernetes Prow Robot bdcb1e852a
Merge pull request #2675 from IgorIgnatevBolt/feat-hpa-created-metric
feat: Add HorizontalPodAutoscaler created and deletionTimestamp info into metrics
2025-08-24 14:41:06 -07:00
yshngg 141c1f05bc changes for continuing to run when file doesnt exist 2025-08-19 09:45:35 -07:00
Igor Ignatev 53ec1de81a
feat: add deletion timestamp metrics for multiple resources
This commit adds the kube_*_deletion_timestamp metric for several Kubernetes resources:
- Deployments
- DaemonSets
- StatefulSets
- Services
- PodDisruptionBudgets

The deletion timestamp metric reports the Unix timestamp when a resource
was marked for deletion. This helps with monitoring resource lifecycle
and cleanup processes.

All metrics follow the same pattern:
- Help text: 'Unix deletion timestamp'
- Type: gauge
- Value: Unix timestamp in seconds when DeletionTimestamp is set,
  otherwise the metric is not emitted

Updated documentation and tests are included for all affected resources.
2025-08-18 08:57:17 +03:00
Kubernetes Prow Robot bc45a49c9b
Merge pull request #2719 from Rishab87/reason-label
feat: include reason label to `kube_deployment_status_condition`
2025-08-14 08:27:09 -07:00
Ader Fu 9222ba465f
Update metrics-store-performance-optimization.md 2025-08-08 16:54:27 +08:00
Kubernetes Prow Robot 95b29ac8a9
Merge pull request #2714 from Rishab87/fix-md-format
fix: Fixed the format of Markdown files
2025-08-07 06:05:43 -07:00
Rashmi Chandrashekar 921147623e support overrides 2025-08-05 19:30:00 -07:00
Rishab87 5de7a63748 addressing reviews 2025-08-05 17:23:48 +05:30
Rishab87 0a50cabaf9 added reason label 2025-08-05 16:35:42 +05:30
Rishab87 63a0298d5a fixed md024, md036, md040, md041, md033 rules 2025-08-02 23:42:45 +05:30
yshngg a483701408 feat(pod): add new metric for pod unscheduled time tracking
The changes introduce a new metric generator `kube_pod_status_unscheduled_time` to record the Unix timestamp when pods transition to unscheduled status. This enhances monitoring capabilities for scheduling issues by capturing exact transition times during `PodScheduled` condition changes.
2025-07-01 16:06:28 +08:00
Manuel Rüger a5789613f1 feat: Add AuthFilter
This adds an Authentication/Authorization filter through Kubernetes'
TokenReview / SubjectAccessReview resources.

The client config for kube-state-metrics needs a clusterrole for

* apiGroups: authentication.k8s.io, resources: tokenreviews, verbs: create
* apiGroups: authorization.k8s.io, resources: subjectaccessreviews, verbs: create

The Prometheus client needs a clusterrole for

* nonResourceURLs: "/metrics", verbs: get
2025-06-23 14:17:52 +02:00
Igor Ignatev 8fd0417aa2
feat: hpa created and deletion metrics 2025-06-03 19:13:44 +03:00
Manuel Rüger 4519b2848b feat: Introduce object limits
This change allows user-controlled limits on how many objects KSM will
list from the API. This is helpful to prevent resource exhaustion on
KSM, in case the API creates too many resources.

The object limit it set globally and applied per resource watched.
2025-05-31 23:29:41 +02:00
Pranshu Srivastava e178d8e582
enhancement: add `pathType` to `ingress_path`
This avoids duplicate metrics (and thus, `PrometheusDuplicateTimestamps`) for schemas such as:
```
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: minimal-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  ingressClassName: nginx-example
  rules:
  - http:
      paths:
      - backend:
          service:
            name: cart
            port:
              number: 3000
        path: /nvc/cart
        pathType: Prefix
      - backend:
          service:
            name: cart
            port:
              number: 3000
        path: /nvc/cart
        pathType: Exact
```

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2025-05-12 15:34:00 +05:30
Pranshu Srivastava 8b631bbff4
feat: Use `dlclark/regexp2` over standard library's package
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2025-03-18 18:57:25 +05:30
SuperQ a775fe3458
feat: Add PersistentVolume Reclaim Policy metric
In order to monitor for PVs with different reclaim policies add a
`reclaim_policy` label to the `kube_persistentvolume_info` metric.

Signed-off-by: SuperQ <superq@gmail.com>
2025-02-20 10:37:13 +01:00
Clavianus Juneardo 9cf257a9b3
Merge branch 'kubernetes:main' into main 2025-01-27 19:51:46 +07:00
Clavianus Juneardo afc7bbcd01
docs(customresourcestate): add VPA labels and annotations 2025-01-27 19:50:46 +07:00
Clavianus Juneardo 0c69b3567a
docs(customresourcestate): fix naming discrepancies on VPA 2025-01-21 11:04:13 +07:00
clavinjune 387bd8b244
docs(customresourestate): fix All VerticalPodAutoscaler Metrics section
Signed-off-by: clavinjune <24659468+clavinjune@users.noreply.github.com>
2025-01-07 16:54:54 +07:00
clavinjune ae38bc4e67
docs(customresourestate): fix All VerticalPodAutoscaler Metrics section
Signed-off-by: clavinjune <24659468+clavinjune@users.noreply.github.com>
2025-01-07 16:53:54 +07:00
clavinjune 89f8110d61
docs(customresourestate): add example to re-expose all VPA metrics
Signed-off-by: clavinjune <24659468+clavinjune@users.noreply.github.com>
2025-01-07 16:51:46 +07:00
jahantech 0591d0bd71 feat: Add External traffic policy to kube_service_info 2025-01-02 14:41:08 +00:00
clavinjune 1412eaa183
docs(customresourestate): add kind on the example
Signed-off-by: clavinjune <24659468+clavinjune@users.noreply.github.com>
2024-12-23 17:07:39 +07:00
clavinjune a4d64fb993
docs(customresourestate): add example to expose same metrics with different label
Signed-off-by: clavinjune <24659468+clavinjune@users.noreply.github.com>
2024-12-23 17:02:00 +07:00
David Ashpole 6cfc844ca0
update links to openmetrics to reference the v1.0.0 release
Signed-off-by: David Ashpole <dashpole@google.com>
2024-12-16 20:24:02 +00:00
Kubernetes Prow Robot 32e7727ff4
Merge pull request #2528 from mrueg/metrics-best-practices
docs: Add best practices for metrics
2024-11-27 15:48:57 +00:00
Peter Schuurman 098e785d08 Promote kube_statefulset_ordinals_start from ALPHA -> STABLE 2024-11-25 10:55:34 -08:00
Kubernetes Prow Robot ea5826a92c
Merge pull request #2376 from mrueg/cronjob-add-timezone
feat: Add timezone to kube_cronjob_info / Make kube_cronjob_next_schedule_time timezone-aware
2024-11-14 14:25:17 +00:00
Manuel Rüger dcfaae9890 Add some info about 1:1/1:n relationships 2024-11-14 10:22:03 +01:00
Manuel Rüger 7ac99685c1 Update docs/design/metrics-best-practices.md
Co-authored-by: Ben Kochie <superq@gmail.com>
2024-11-14 09:57:19 +01:00
Manuel Rüger 690b9627f5 Include more comments from the review 2024-11-14 09:57:19 +01:00
Manuel Rüger 7677b414e0 Update docs/design/metrics-best-practices.md
Co-authored-by: Ben Kochie <superq@gmail.com>
2024-11-14 09:57:19 +01:00
Manuel Rüger cacc980de3 Update docs/design/metrics-best-practices.md
Co-authored-by: Ben Kochie <superq@gmail.com>
2024-11-14 09:57:19 +01:00
Manuel Rüger 3736c9aa82 docs: Add best practices for metrics 2024-11-14 09:57:19 +01:00
Kubernetes Prow Robot 77e564ba5d
Merge pull request #2536 from Haleygo/fix-custom-metric-value-conversion
fix(custom resource state metrics): correctly convert status condition `Unknown` to a valid value
2024-11-08 09:40:43 +00:00
Manuel Rüger d7d2d89017
Update docs/metrics/extend/customresourcestate-metrics.md 2024-11-08 10:32:47 +01:00
Indresh2410 7a54a8ebf0
Add new line 2024-11-07 05:52:47 +00:00
Indresh2410 b2c8fa7837 Address Review Comments 2024-11-07 04:36:30 +00:00
Indresh2410 ba7ff1a0e5 Address Review Comments 2024-11-07 04:36:30 +00:00
Indresh-Prakash 076987a505 Add kube_job_status_suspended metric 2024-11-07 04:36:30 +00:00
Haley Wang 70088ed1ea
apply review comment 2024-11-04 16:38:57 +08:00
Haley Wang 17c69692c4
fix(custom resource state metrics): corrctly convert status condition `Unknown` to a valid value 2024-10-29 13:55:40 +08:00
Manuel Rüger ea7034553f feat(endpoints): Move ports into address metric
This marks kube_endpoint_ports as deprecated
2024-10-17 23:45:01 +02:00
Manuel Rüger 28129e4d6d chore: Remove deprecated endpoint address metric
This was deprecated in 2022 in https://github.com/kubernetes/kube-state-metrics/pull/1761
2024-10-16 09:42:33 +02:00