Commit Graph

17 Commits

Author SHA1 Message Date
yshngg 141c1f05bc changes for continuing to run when file doesnt exist 2025-08-19 09:45:35 -07:00
Rashmi Chandrashekar 921147623e support overrides 2025-08-05 19:30:00 -07: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
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 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
CatherineF-dev e18b5573ac format 2024-07-23 20:21:17 -04:00
Catherine Fang eda1984438 Rename --enable-unscheduled-pods-fetching to --track-unscheduled-pods 2024-07-23 20:21:17 -04:00
CatherineF-dev c9ceded724 Update docs/developer/cli-arguments.md
Co-authored-by: Manuel Rüger <manuel@rueg.eu>
2024-07-23 20:19:09 -04:00
Catherine Fang 85f8a2c4cc rename to --enable-unscheduled-pods-fetching 2024-07-23 20:19:09 -04:00
Catherine Fang 49e1170f67 rename to --fetch-unscheduled-pods 2024-07-23 20:18:53 -04:00
CatherineF-dev b27845d535 use --enable-no-node-scrape
Co-authored-by: Alex Kennedy <alexzanderkennedy@gmail.com>
2024-07-23 20:18:35 -04:00
SuperQ eea0524d54
Add automatic detection of memory limits
Add automatic detection of container and system memory limits to control
the Go `GOMEMLIMIT` garbage collector feature. This helps reduced OOMs
by triggering GC when the process approaches system limits.

Signed-off-by: SuperQ <superq@gmail.com>
2024-07-16 12:09:22 +02:00
pokom cd460fef29 Update cli-arguments.md 2024-06-11 06:48:22 -04:00
Mark ee3913967e
Update docs/developer/cli-arguments.md
Co-authored-by: Manuel Rüger <manuel@rueg.eu>
2024-06-07 14:13:44 -04:00
pokom b4f032ecfd Add additional flags for IdleTimeouts 2024-06-06 13:11:00 -04:00
pokom e97933bcb9 fix(server): Add read and write timeouts
There are a few documented scenarios where `kube-state-metrics` will
lock up(#995, #1028). I believe a much simpler solution to ensure
`kube-state-metrics` doesn't lock up and require a restart to server
`/metrics` requests is to add default read and write timeouts and to
allow them to be configurable. At Grafana, we've experienced a few
scenarios where `kube-state-metrics` running in larger clusters falls
behind and starts getting scraped multiple times. When this occurs,
`kube-state-metrics` becomes completely unresponsive and requires a
reboot. This is somewhat easily reproduceable(I'll provide a script in
an issue) and causes other critical workloads(KEDA, VPA) to fail in
weird ways.

Adds two flags:
- `server-read-timeout`
- `server-write-timeout`

Updates the metrics http server to set the `ReadTimeout` and
`WriteTimeout` to the configured values.
2024-06-05 14:18:43 -04:00
Ovidiu Tirla 3fc953561f docs: reorganize documentation directory structure 2024-04-03 12:32:14 +00:00