Commit Graph

50 Commits

Author SHA1 Message Date
Manuel Rüger 33250c57f5 jsonnet: Fix NoNodePod naming 2025-01-29 13:05:25 +01:00
CatherineF-dev aeade61698
Update kube-state-metrics.libsonnet 2024-08-05 12:05:17 -04:00
Jeff McCune 3aebcf71a9
fix: syntax errors in kube-state-metrics.libsonnet
Previously customizing kube-prometheus [1] failed with the following
error.

    ❯ ./build.sh example.jsonnet
    + set -o pipefail
    + rm -rf manifests
    + mkdir -p manifests/setup
    + jsonnet -J vendor -m manifests example.jsonnet
    + xargs '-I{}' sh -c 'cat {} | gojsontoyaml > {}.yaml' -- '{}'
    RUNTIME ERROR: vendor/github.com/kubernetes/kube-state-metrics/jsonnet/kube-state-metrics/kube-state-metrics.libsonnet:392:21-22 Expected token OPERATOR but got "{"
            vendor/kube-prometheus/components/kube-state-metrics.libsonnet:51:19-124        function <anonymous>
            vendor/kube-prometheus/main.libsonnet:136:21-64 object <anonymous>
            vendor/kube-prometheus/platforms/platforms.libsonnet:37:22-40   +:
            example.jsonnet:33:90-109       thunk from <$>
            <std>:1539:24-25        thunk from <function <anonymous>>
            <std>:1539:5-33 function <anonymous>
            example.jsonnet:33:73-110       $
            example.jsonnet:33:1-112
            example.jsonnet:33:1-112
            During evaluation

With this patch, the build succeeds:

    ❯ bash build.sh example.jsonnet ; echo $?
    + set -o pipefail
    + rm -rf manifests
    + mkdir -p manifests/setup
    + jsonnet -J vendor -m manifests example.jsonnet
    + xargs '-I{}' sh -c 'cat {} | gojsontoyaml > {}.yaml' -- '{}'
    + find manifests -type f '!' -name '*.yaml' -delete
    + rm -f kustomization
    0

[1]: https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/customizing.md
2024-08-05 08:41:49 -07:00
Catherine Fang eda1984438 Rename --enable-unscheduled-pods-fetching to --track-unscheduled-pods 2024-07-23 20:21:17 -04:00
CatherineF-dev bb5a37c6e9 Update jsonnet/kube-state-metrics/kube-state-metrics.libsonnet
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
Catherine Fang b45913db59 Fix --nodeName= doesn't select unscheduable pods
pods
2024-07-23 20:17:48 -04:00
Pranshu Srivastava b980579e08
fixup! fix: add `readyz` endpoint 2024-07-05 18:27:48 +05:30
Pranshu Srivastava dae1f062c0
fix: add `readyz` endpoint
Discourage the usage of `/metrics` for any probe, and use `/readyz` in
place of the earlier telemetry metrics endpoint to secure the exposition
data.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2024-07-04 01:10:28 +05:30
Pranshu Srivastava 6f8f7d1f7b
fixup! enhancement: add `livez` endpoint 2024-06-25 15:00:20 +05:30
Pranshu Srivastava eb80c09755
enhancement: add `livez` endpoint
Add a `livez` endpoint to identify network outages. This helps in
restarting the binary if such as case is observed.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2024-06-25 14:35:16 +05:30
蓝宝石的傻话 f7ca9909df globals rename pods
Signed-off-by: 蓝宝石的傻话 <mickey_zzc@163.com>
2023-10-18 14:01:18 +08:00
蓝宝石的傻话 d33929e543 examples generated from libsonnet
Signed-off-by: 蓝宝石的傻话 <mickey_zzc@163.com>
2023-10-12 23:20:38 +08:00
Jan-Otto Kröpke 7c7a9ceb52
Implement multi-cluster alerts 2023-05-04 23:38:07 +02:00
Pat Riehecky b23f04078c Add parameters for PodSecurity restricted
Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
2023-04-11 09:29:41 -05:00
Catherine Fang 5fae5968ac daemonset-sharding-example 2023-03-21 20:37:36 -04:00
Manuel Rüger b4b8c23b97 Add Metrics for EndpointSlices
Implements https://pkg.go.dev/k8s.io/api/discovery/v1#EndpointSlice

This resourcetype is disabled by default as they are very verbose and
have a high cardinality.
Metrics from endpointslices can be used to identify if specific pods are
part of an endpoint and thus discoverable through a service.

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-11-26 01:44:29 +01:00
Kaito Ii 4abefe268a add ingress class metrics 2022-11-23 23:16:36 +09:00
Kaito Ii ba904d874c fix typos 2022-08-10 01:56:20 +09:00
Kaito Ii 51df8fe763 add rolebinding metrics 2022-08-07 01:32:57 +09:00
Kaito Ii 64926a3407 fix libsonnet to add roles 2022-06-30 22:03:14 +09:00
Julian van den Berkmortel 6a24f639f8
Add support for the ServiceAccount resource (Ref: #1717) 2022-06-29 23:58:01 +02:00
ArthurSens 8918f9b9fe jsonnet: Drop all Linux capabilities
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-02-01 09:15:57 +00:00
Arthur Silva Sens d9aaef0d9d jsonnet: Forbid write access to root filesystem
Signed-off-by: GitHub <noreply@github.com>
2022-01-27 08:51:26 +00:00
Arthur Silva Sens 8d2587a6a1 jsonnet: explicitly forbid privilege escalation
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-01-25 09:14:35 +00:00
Paweł Krupa (paulfantom) 122f3e9783 jsonnet: increase security by specifying automountServiceAccountToken on pod level and not on serviceAccount 2022-01-21 12:47:30 +01:00
Jayapriya Pai fc0e816a2b jsonnet: Add app.kubernetes.io/component label
This was done this way to avoid update failure since matchLabels is an immutable field

Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
2021-10-01 15:49:28 +05:30
Manuel Rüger 8160f327b0 Merge branch 'release-2.0' into merge-release-2.0 2021-03-26 23:54:14 +01:00
Lili Cosic f895661f3e jsonnet/kube-state-metrics/kube-state-metrics.libsonnet: Remove old API 2021-03-22 13:48:18 +01:00
Mikulas (Mike) Dite fcd8a48b0b Add example sharding alerts 2021-01-18 14:52:04 +00:00
Matthias Loibl 10a2b64c11
Clean up jsonnet dependencies and use absolute imports 2020-10-22 19:24:41 +02:00
Matthias Loibl 3e00845588
Generate YAML manifests without ksonnet
Improving readability and introducing type safety with external tools
like kubeval.

I needed to make change the import to an absolute one, but instead
rather removed the import to begin with, as we're getting rid of ksonnet
for most things now anyway.
2020-10-22 19:21:46 +02:00
Lili Cosic dc89be6b34 jsonnet/kube-state-metrics/kube-state-metrics.libsonnet: Adjust permissions 2020-10-13 14:59:50 +02:00
midnightconman d86f2365f7 Added Namespace to Rolebinding Jsonnet 2020-09-17 11:55:42 -07:00
paulfantom 118cf4e172
jsonnet/mixin: adhere to monitoring mixins guidelines 2020-08-13 09:15:38 +02:00
paulfantom 42c8f26b46
jsonnet/kube-state-metrics-mixin: add default KSM selector 2020-05-15 15:02:37 +02:00
Oleg Mayko 44ab592e3e Remove prefix from version label 2020-02-08 17:44:44 +01:00
asidorovj f5729a5ccb add leases collector 2020-01-30 08:31:01 +03:00
Frederic Branczyk af671c3357
Merge remote-tracking branch 'upstream/release-1.9' into pull-in-1.9.3 2020-01-22 17:53:35 +01:00
Oleg Mayko c210e73205 Add security context to deployment and statefulset 2020-01-22 12:14:17 +01:00
Lili Cosic f2e6b3f76d
jsonnet/kube-state-metrics-mixin/alerts.libsonnet: Fix selector typo
(cherry picked from commit e4e9d325ca)
2019-12-05 02:41:26 -08:00
Lili Cosic e4e9d325ca jsonnet/kube-state-metrics-mixin/alerts.libsonnet: Fix selector typo 2019-12-05 10:18:06 +01:00
Lili Cosic 6cef9652c9
jsonnet/kube-state-metrics: Add missing volumeattachments resource
(cherry picked from commit 6be758aa88)
2019-12-04 22:12:16 -08:00
Lili Cosic be716eb824
jsonnet,scripts: Add kube-state-metrics alerts mixin
(cherry picked from commit 345ded07af)
2019-12-04 22:12:15 -08:00
Lili Cosic 6be758aa88 jsonnet/kube-state-metrics: Add missing volumeattachments resource 2019-12-05 04:00:47 +01:00
Lili Cosic 345ded07af jsonnet,scripts: Add kube-state-metrics alerts mixin 2019-12-05 04:00:47 +01:00
Miles Bryant e780fc34f3
store: export NetworkPolicy objects 2019-10-17 11:49:29 +01:00
Frederic Branczyk 994772a2e4
*: Generate all manifests
Sharding and autosharding introduced a number of manifests that are
very similar, but not identical to the standard manifests. This
introduces generating all manifests using jsonnet and moves them to
the explicit `/examples` directory.
2019-10-02 10:35:06 +02:00