From 9b1380883469724380f3287a38fdf554dba16165 Mon Sep 17 00:00:00 2001 From: Pranshu Srivastava Date: Sun, 8 Oct 2023 22:46:56 +0530 Subject: [PATCH 1/8] Revert "docs: fix rebase conflicts around linting" This reverts commit 995f83e3c4e6077e5e28f71bf04bfc2ddccf0017. --- CHANGELOG.md | 7 +++---- README.md | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f6303ce30..da2f46d7c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,10 @@ ## v2.10.1 / 2023-09-13 ### Note +- This release addresses a regression introduced in https://github.com/kubernetes/kube-state-metrics/pull/2105. -* This release addresses a regression introduced in . - -* [BUGFIX] Remove FieldSelector from non-namespaced resources by @mrueg and @dgrisonnet in -* [ENHANCEMENT] Bump Go to v1.20.8 +* [BUGFIX] Remove FieldSelector from non-namespaced resources by @mrueg and @dgrisonnet in https://github.com/kubernetes/kube-state-metrics/pull/2190 +* [ENHANCEMENT] Bump Go to v1.20.8 ## v2.10.0 / 2023-08-31 diff --git a/README.md b/README.md index 295e8aaca2..2edcec362c 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ Generally, it is recommended to use the latest release of kube-state-metrics. If | **v2.10.1** | v1.27 | | **main** | v1.28 | + #### Resource group version compatibility Resources in Kubernetes can evolve, i.e., the group version for a resource may change from alpha to beta and finally GA @@ -89,7 +90,6 @@ release. #### Container Image The latest container image can be found at: - * `registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.1` (arch: `amd64`, `arm`, `arm64`, `ppc64le` and `s390x`) * View all multi-architecture images at [here](https://explore.ggcr.dev/?image=registry.k8s.io%2Fkube-state-metrics%2Fkube-state-metrics:v2.10.1) From cc7ec3ad2a943fab92daa2b472b7b6655e58ad12 Mon Sep 17 00:00:00 2001 From: Pranshu Srivastava Date: Sun, 8 Oct 2023 22:46:58 +0530 Subject: [PATCH 2/8] Revert "Merge branch 'main' into release-2.10" This reverts commit 98ade6302f4a29ae25a62dad312ffbbc6b48d520, reversing changes made to d68bad28235354a675705fbe532f4c1162ee1101. --- .github/ISSUE_TEMPLATE/bug_report.md | 9 +- .github/workflows/ci.yml | 20 +-- .github/workflows/govulncheck.yml | 4 +- .markdownlint-cli2.jsonc | 17 --- CHANGELOG.md | 119 +++++++++--------- CONTRIBUTING.md | 13 +- Dockerfile | 2 +- MAINTAINER.md | 3 +- Makefile | 13 +- README.md | 73 +++++------ RELEASE.md | 2 - docs/README.md | 78 ++++++------ docs/cli-arguments.md | 3 +- docs/clusterrolebinding-metrics.md | 1 + docs/customresourcestate-metrics.md | 16 +-- .../metrics-store-performance-optimization.md | 27 ++-- docs/developer/guide.md | 27 ++-- docs/networkpolicy-metrics.md | 1 + docs/persistentvolumeclaim-metrics.md | 2 +- go.mod | 34 ++--- go.sum | 85 +++++++------ tests/e2e.sh | 2 +- tests/e2e/README.md | 4 +- 23 files changed, 266 insertions(+), 289 deletions(-) delete mode 100644 .markdownlint-cli2.jsonc diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 7ed72ebd13..79d1ddae87 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -21,8 +21,7 @@ If the matter is security related, please disclose it privately see https://gith **Anything else we need to know?**: **Environment**: - -* kube-state-metrics version: -* Kubernetes version (use `kubectl version`): -* Cloud provider or hardware configuration: -* Other info: +- kube-state-metrics version: +- Kubernetes version (use `kubectl version`): +- Cloud provider or hardware configuration: +- Other info: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29ccfa64bf..a33c1717f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ env: E2E_SETUP_KIND: yes E2E_SETUP_KUBECTL: yes SUDO: sudo - GO_VERSION: "^1.21" + GO_VERSION: "^1.20" GOLANGCI_LINT_VERSION: "v1.54.2" jobs: @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Set up Go 1.x uses: actions/setup-go@v4 @@ -51,7 +51,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Set up Go 1.x uses: actions/setup-go@v4 @@ -72,7 +72,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Set up Go 1.x uses: actions/setup-go@v4 @@ -93,7 +93,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Set up Go 1.x uses: actions/setup-go@v4 @@ -114,7 +114,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Set up Go 1.x uses: actions/setup-go@v4 @@ -135,7 +135,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Setup promtool run: | @@ -150,7 +150,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Set up Go 1.x uses: actions/setup-go@v4 @@ -171,7 +171,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Set up Go 1.x uses: actions/setup-go@v4 @@ -192,7 +192,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Set up Go 1.x uses: actions/setup-go@v4 diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml index 2c52a86f04..190e1583af 100644 --- a/.github/workflows/govulncheck.yml +++ b/.github/workflows/govulncheck.yml @@ -6,13 +6,13 @@ on: - cron: '0 0 * * 1' env: - GO_VERSION: "^1.21" + GO_VERSION: "^1.20" jobs: ci-security-checks: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 name: Checkout code - name: Set up Go 1.x uses: actions/setup-go@v4 diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc deleted file mode 100644 index 5c1446a029..0000000000 --- a/.markdownlint-cli2.jsonc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "globs": [ - "**/*.md" - ], - // ToDo: Following rules can't be fixed automatically. They should be enabled when fixed. - "config": { - "MD004": { - "style": "asterisk" - }, - "MD013": false, // https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md013---line-length - "MD024": false, // https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md024---multiple-headers-with-the-same-content - "MD033": false, // https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md033---inline-html - "MD036": false, // https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md036---emphasis-used-instead-of-a-header - "MD040": false, // https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md040---fenced-code-blocks-should-have-a-language-specified - "MD041": false // https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md041---first-line-in-file-should-be-a-top-level-header - } -} diff --git a/CHANGELOG.md b/CHANGELOG.md index da2f46d7c9..18ef2cfeb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,25 +9,24 @@ ## v2.10.0 / 2023-08-31 ### Note - -* Label and annotation metrics aren't exposed by default anymore to reduce the memory usage of the default configuration of kube-state-metrics. Before this change, they used to only include the name and namespace of the objects which is not relevant to users not opting in these metrics. - -* [BUGFIX] Log no _info suffix in name only once per reading the configuration for custommetrics by @chrischdi in -* [BUGFIX] Don't crash on non-existent valueFrom path values by @chihshenghuang in -* [BUGFIX] Index out of range in metrics_store.SanitizeHeaders by @mrueg in -* [BUGFIX] Always extract the headers but only write it when we have custommetrics by @chrischdi in -* [BUGFIX] Add filtering for Lease metrics by @ntoofu in -* [FEATURE] Implement kube_pod_status_initialized_time by @opeco17 in -* [FEATURE] Disable labels and annotations metrics when metric-annotations-… by @opeco17 in -* [FEATURE] Add webhooks client config service metrics by @dgrisonnet in -* [FEATURE] Support kube_persistentvolumeclaim_deletion_timestamp by @maxime1907 in -* [FEATURE] Support kube_persistentvolume_deletion_timestamp by @maxime1907 in -* [FEATURE] Adds new metric `kube_pod_service_account` by @swarup-stripe in -* [FEATURE] Add volumemode to PVC info metric by @machadovilaca in -* [FEATURE] Enable metric-annotations-allowlist and metric-labels-allowlist for ResourceQuota by @opeco17 in -* [FEATURE] Allow field KV general matching by @rexagod in -* [FEATURE] Support hot reload for kubeconfig by @opeco17 in -* [FEATURE] Add support for endpoint topology routing hints by @MarkSRobinson in +- Label and annotation metrics aren't exposed by default anymore to reduce the memory usage of the default configuration of kube-state-metrics. Before this change, they used to only include the name and namespace of the objects which is not relevant to users not opting in these metrics. + +* [BUGFIX] Log no _info suffix in name only once per reading the configuration for custommetrics by @chrischdi in https://github.com/kubernetes/kube-state-metrics/pull/2157 +* [BUGFIX] Don't crash on non-existent valueFrom path values by @chihshenghuang in https://github.com/kubernetes/kube-state-metrics/pull/2140 +* [BUGFIX] Index out of range in metrics_store.SanitizeHeaders by @mrueg in https://github.com/kubernetes/kube-state-metrics/pull/2166 +* [BUGFIX] Always extract the headers but only write it when we have custommetrics by @chrischdi in https://github.com/kubernetes/kube-state-metrics/pull/2154 +* [BUGFIX] Add filtering for Lease metrics by @ntoofu in https://github.com/kubernetes/kube-state-metrics/pull/2122 +* [FEATURE] Implement kube_pod_status_initialized_time by @opeco17 in https://github.com/kubernetes/kube-state-metrics/pull/2148 +* [FEATURE] Disable labels and annotations metrics when metric-annotations-… by @opeco17 in https://github.com/kubernetes/kube-state-metrics/pull/2145 +* [FEATURE] Add webhooks client config service metrics by @dgrisonnet in https://github.com/kubernetes/kube-state-metrics/pull/2114 +* [FEATURE] Support kube_persistentvolumeclaim_deletion_timestamp by @maxime1907 in https://github.com/kubernetes/kube-state-metrics/pull/2074 +* [FEATURE] Support kube_persistentvolume_deletion_timestamp by @maxime1907 in https://github.com/kubernetes/kube-state-metrics/pull/2075 +* [FEATURE] Adds new metric `kube_pod_service_account` by @swarup-stripe in https://github.com/kubernetes/kube-state-metrics/pull/2096 +* [FEATURE] Add volumemode to PVC info metric by @machadovilaca in https://github.com/kubernetes/kube-state-metrics/pull/2134 +* [FEATURE] Enable metric-annotations-allowlist and metric-labels-allowlist for ResourceQuota by @opeco17 in https://github.com/kubernetes/kube-state-metrics/pull/2175 +* [FEATURE] Allow field KV general matching by @rexagod in https://github.com/kubernetes/kube-state-metrics/pull/2067 +* [FEATURE] Support hot reload for kubeconfig by @opeco17 in https://github.com/kubernetes/kube-state-metrics/pull/2144 +* [FEATURE] Add support for endpoint topology routing hints by @MarkSRobinson in https://github.com/kubernetes/kube-state-metrics/pull/2090 ## v2.9.2 / 2023-05-30 @@ -43,8 +42,8 @@ The changes mentioned below are only the user-facing ones. For a list of the com ### Note -* The deprecated experimental VerticalPodAutoscaler metrics are no longer supported, and have been removed. We recommend to use CustomResourceState metrics to gather metrics from custom resources like the Vertical Pod Autoscaler. -* #2004 regulated label names to adhere with [OTel-Prometheus standards](https://github.com/open-telemetry/opentelemetry-specification/blob/8946dfc6a2302f78b0224fcc3f4dfb816a7bb1f4/specification/compatibility/prometheus_and_openmetrics.md?plain=1#L224-L229), so existing label names that do not follow the same may be replaced by the ones that do. Please refer to the PR for more details. +- The deprecated experimental VerticalPodAutoscaler metrics are no longer supported, and have been removed. We recommend to use CustomResourceState metrics to gather metrics from custom resources like the Vertical Pod Autoscaler. +- #2004 regulated label names to adhere with [OTel-Prometheus standards](https://github.com/open-telemetry/opentelemetry-specification/blob/8946dfc6a2302f78b0224fcc3f4dfb816a7bb1f4/specification/compatibility/prometheus_and_openmetrics.md?plain=1#L224-L229), so existing label names that do not follow the same may be replaced by the ones that do. Please refer to the PR for more details. * [BUGFIX] Adhere to OTel-Prometheus standard for labels #2004 @rexagod * [BUGFIX] Respect relative paths for label resolutions #2007 @rexagod @@ -127,7 +126,6 @@ See: #1847 * [BUGFIX] Allow lease metrics to be exported across all namespaces #1845 @lantingchiang ## v2.6.0 / 2022-08-26 - * [FEATURE] Add local storage labels to kube_persistentvolume_info #1814 @nabokihms * [FEATURE] Add support for StateSet and Info metrics for Custom-Resource State #1777 @chrischdi * [FEATURE] Add support for Rolebinding resource metrics #1799 @kaitoii11 @@ -161,11 +159,9 @@ See: #1847 * [BUGFIX] Properly initialize KSM Server test #1699 @fpetkovski ## v2.4.2 / 2022-02-10 - -* [BUGFIX] Publish images with with the correct tag +* [BUGFIX] Publish images with with the correct tag ## v2.4.1 / 2022-02-10 - * [FEATURE] Add `ingressclass` label to `kube_ingress_info` metric #1652 @adammw * [FEATURE] Extend KSM library to support custom resource metrics #1644 @Garrybest * [ENHANCEMENT] Use apiVersion `v1` for `PodDisruptionBudget` and `CronJob` resources #1491 @bison @@ -190,10 +186,9 @@ See: #1847 ## v2.2.3 / 2021-10-13 -* [BUGFIX] Fix the image build job. Reverts #1602 +* [BUGFIX] Fix the image build job. Reverts #1602 ## v2.2.2 / 2021-10-13 - * [BUGFIX] Downgrade latest allowed go version to 1.16.9 #1601 @mrueg * [BUGFIX] Fix CI variable names used for building KSM images @mrueg @@ -267,7 +262,6 @@ Location on quay.io will not be updated anymore. Previously pushed images will b * [BUGFIX] Propagate resource version when sharded #1402 ## v2.0.0-beta / 2020-12-04 - Promotion to beta release after a period of no bugs. ## v2.0.0-alpha.3 / 2020-11-19 @@ -290,68 +284,69 @@ kube_pod_container_resource_requests and kube_pod_container_resource_limits * [CHANGE] Update go module path to k8s.io/kube-state-metrics/v2 #1238 * [CHANGE] Bump klog to v2 and client-go to 1.19 #1250 -* [FEATURE] Add iscsi initiator name to persistentvolume_info #1235 -* [BUGFIX] Added Namespace to Rolebinding Jsonnet #1233 -* [BUGFIX] Reference closure scoped family generator #1240 +* [FEATURE] Add iscsi initiator name to persistentvolume_info #1235 +* [BUGFIX] Added Namespace to Rolebinding Jsonnet #1233 +* [BUGFIX] Reference closure scoped family generator #1240 ## v2.0.0-alpha / 2020-09-16 NOTE: This is a major new alpha 2.0 release with breaking changes and removed metrics. See details below! -* [CHANGE] Apply boundaries to metrics and allow via flag (--labels-allow-list) what labels to include #1125 +* [CHANGE] Apply boundaries to metrics and allow via flag (--labels-allow-list) what labels to include #1125 * [CHANGE] Update DaemonSet updated_number_scheduled metric name to be consistent #1181 -Metric was changed from kube_daemonset_updated_number_scheduled to kube_daemonset_status_updated_number_scheduled +Metric was changed from kube_daemonset_updated_number_scheduled to kube_daemonset_status_updated_number_scheduled * [CHANGE] Rework resource metrics #1168 Metrics kube_pod_container_resource_requests, kube_pod_container_resource_limits, kube_pod_overhead, kube_pod_init_container_resource_limits, kube_pod_init_container_resource_requests changed -* [CHANGE] Convert k8s labels to snake case #1165 -* [CHANGE] Mutatingwebhookconfiguration.go: Switch to v1 #1144 +* [CHANGE] Convert k8s labels to snake case #1165 +* [CHANGE] Mutatingwebhookconfiguration.go: Switch to v1 #1144 * [CHANGE] v2: Rename storage class labels reclaimPolicy to reclaim_policy and volumeBindingMode to volume_binding_mode #1107 * [CHANGE] v2: Renamed --namespace flag to --namespaces #1098 * [CHANGE] Rename kube_pod_deleted to kube_pod_deletion_timestamp #1079 * [CHANGE] v2: Rename collector flag to resource flag #1006 --resources is the new flag -* [CHANGE] Remove non-identifying labels from pod metrics #1009 +* [CHANGE] Remove non-identifying labels from pod metrics #1009 * [CHANGE] v2: Remove deprecated stable metrics #1004 Note that some of these were replaced with EXPERIMENTAL resource metrics. See #1168 for more details. `kube_pod_container_resource_requests` and `kube_pod_container_resource_limits` are the replacements with `resource` labels representing the resource name and `unit` labels representing the resource unit. - * kube_pod_container_resource_requests_cpu_cores - * kube_pod_container_resource_limits_cpu_cores - * kube_pod_container_resource_requests_memory_bytes - * kube_pod_container_resource_limits_memory_bytes - * `kube_node_status_capacity` and `kube_node_status_allocatable` are the replacements with `resource` labels + - kube_pod_container_resource_requests_cpu_cores + - kube_pod_container_resource_limits_cpu_cores + - kube_pod_container_resource_requests_memory_bytes + - kube_pod_container_resource_limits_memory_bytes + - `kube_node_status_capacity` and `kube_node_status_allocatable` are the replacements with `resource` labels representing the resource name and `unit` labels representing the resource unit. - * kube_node_status_capacity_pods - * kube_node_status_capacity_cpu_cores - * kube_node_status_capacity_memory_bytes - * kube_node_status_allocatable_pods - * kube_node_status_allocatable_cpu_cores - * kube_node_status_allocatable_memory_bytes + - kube_node_status_capacity_pods + - kube_node_status_capacity_cpu_cores + - kube_node_status_capacity_memory_bytes + - kube_node_status_allocatable_pods + - kube_node_status_allocatable_cpu_cores + - kube_node_status_allocatable_memory_bytes * [CHANGE] Rename black-/whitelist to allow/deny-list #1045 New flags are --metric-allowlist and --metric-denylist -* [CHANGE] Update telemetry port to 8081 #1049 -* [CHANGE] v2: Rename hpa metrics to use full horizontalpodautoscaler #1003 +* [CHANGE] Update telemetry port to 8081 #1049 +* [CHANGE] v2: Rename hpa metrics to use full horizontalpodautoscaler #1003 All metrics with prefix of kube_hpa_ were renamed to kube_horizontalpodautoscaler_ -* [CHANGE] v2: change metrics port to 8080, telemetry port to 8081 #1005 +* [CHANGE] v2: change metrics port to 8080, telemetry port to 8081 #1005 * [FEATURE] Add http request metric for kube-state-metrics main /metrics #1218 -* [FEATURE] Add fc/iscsi/nfs identifier tags to persistentvolume_info metric #1208 -* [FEATURE] Adds new pod metric kube_pod_container_state_started #1183 +* [FEATURE] Add fc/iscsi/nfs identifier tags to persistentvolume_info metric #1208 +* [FEATURE] Adds new pod metric kube_pod_container_state_started #1183 * [FEATURE] Add observedGeneration metric (kube_daemonset_status_observed_generation) for DaemonSets #1178 -* [FEATURE] Add internal_ip to node_info #1172 -* [FEATURE] Avoid conflicts when mapping Kubernetes labels to Prometheus labels #1156 +* [FEATURE] Add internal_ip to node_info #1172 +* [FEATURE] Avoid conflicts when mapping Kubernetes labels to Prometheus labels #1156 * [FEATURE] Add aws/gce volume id to kube_persistentvolume_info #1146 * [FEATURE] Add UnexpectedAdmissionError to kube_pod_status_reason metric #1145 * [FEATURE] Add init container requests (kube_pod_init_container_resource_requests) #1123 -* [FEATURE] Add host_network to kube_pod_info #1100 -* [FEATURE] Add kube_replicationcontroller_owner #1058 -* [FEATURE] Pod: add gauges for pod overhead (kube_pod_overhead) #1053 -* [FEATURE] Add "Terminating" status in kube_pod_status_phase metrics #1013 -* [FEATURE] Add lease collector metrics #1038 +* [FEATURE] Add host_network to kube_pod_info #1100 +* [FEATURE] Add kube_replicationcontroller_owner #1058 +* [FEATURE] Pod: add gauges for pod overhead (kube_pod_overhead) #1053 +* [FEATURE] Add "Terminating" status in kube_pod_status_phase metrics #1013 +* [FEATURE] Add lease collector metrics #1038 * [ENHANCEMENT] Add DeprecatedVersion to struct FamilyGenerator and func NewFamilyGenerator #1160 -* [ENHANCEMENT] Add security context to deployment and statefulset #1034 +* [ENHANCEMENT] Add security context to deployment and statefulset #1034 * [BUGFIX] Fix VolumeAttachment API version mismatch: expected v1 but watching v1beta1 #1136 -* [BUGFIX] Fix various CI issues (kube_volumeattachment_info nodeName -> node label rename) #1117 -* [BUGFIX] Fix maxUnavailable to round down instead up #1076 +* [BUGFIX] Fix various CI issues (kube_volumeattachment_info nodeName -> node label rename) #1117 +* [BUGFIX] Fix maxUnavailable to round down instead up #1076 + ## v1.9.7 / 2020-05-24 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e7e08fa32c..ba852bce76 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,17 +38,18 @@ Here's a list of types that we use: | chore | Other changes that don't modify src or test files | | revert | Reverts a previous commit | + ### Further Information -* [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests -* [Kubernetes Contributor Guide](http://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](http://git.k8s.io/community/contributors/guide#contributing) -* [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet/README.md) - Common resources for existing developers +- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests +- [Kubernetes Contributor Guide](http://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](http://git.k8s.io/community/contributors/guide#contributing) +- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet/README.md) - Common resources for existing developers ## Mentorship -* [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers! +- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers! ## Contact Information -* [Join Slack](http://slack.k8s.io) to sign up and join the Kubernetes Slack. Please make sure to read our [Slack Guidelines](https://github.com/kubernetes/community/blob/master/communication/slack-guidelines.md) before participating. -* The [kube-state-metrics slack channel](https://kubernetes.slack.com/messages/CJJ529RUY) provides an effective communication platform to reach out to members and other users of the project. It offers an alternative to submitting a GitHub issue for when you have questions and issues. +- [Join Slack](http://slack.k8s.io) to sign up and join the Kubernetes Slack. Please make sure to read our [Slack Guidelines](https://github.com/kubernetes/community/blob/master/communication/slack-guidelines.md) before participating. +- The [kube-state-metrics slack channel](https://kubernetes.slack.com/messages/CJJ529RUY) provides an effective communication platform to reach out to members and other users of the project. It offers an alternative to submitting a GitHub issue for when you have questions and issues. diff --git a/Dockerfile b/Dockerfile index 798ac7e656..c02e3a5bc9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG GOVERSION=1.21 +ARG GOVERSION=1.20 ARG GOARCH FROM golang:${GOVERSION} as builder ARG GOARCH diff --git a/MAINTAINER.md b/MAINTAINER.md index 9fd6147def..ffcbd9e79e 100644 --- a/MAINTAINER.md +++ b/MAINTAINER.md @@ -5,13 +5,12 @@ kube-state-metrics is welcoming contributions from the community. If you are int As part of the Kubernetes project, we use the community membership process as described [here](https://github.com/kubernetes/community/blob/master/community-membership.md). We do not adhere strictly to the numbers of contributions and reviews. Still as becoming a maintainer is a trust-based process and we desire positive outcomes for the project, we look for a long-term interest and engagement. ## Adding a new reviewer - * Ensure the new reviewer is a member of the [kubernetes organization](https://github.com/kubernetes/org/blob/main/config/kubernetes/org.yaml). * Add the new reviewer to the [OWNERS](OWNERS) file to be able to review pull requests. * Add the new reviewer to the [kube-state-metrics-maintainers group](https://github.com/kubernetes/org/blob/main/config/kubernetes/sig-instrumentation/teams.yaml), to gain write access to the kube-state-metrics repository (e.g. for creating new releases). -## Adding a new approver +## Adding a new approver * Ensure the new approver is already a reviewer in the [OWNERS](OWNERS) file. * Add the new approver to the [OWNERS](OWNERS) file to be able to approve pull requests. * Add the new approver to the [SECURITY_CONTACTS](SECURITY_CONTACTS) file to be able to get notified on security related incidents. diff --git a/Makefile b/Makefile index 671ce8c541..db597b86df 100644 --- a/Makefile +++ b/Makefile @@ -21,8 +21,6 @@ IMAGE = $(REGISTRY)/kube-state-metrics MULTI_ARCH_IMG = $(IMAGE)-$(ARCH) USER ?= $(shell id -u -n) HOST ?= $(shell hostname) -MARKDOWNLINT_CLI2_VERSION = 0.9.2 - export DOCKER_CLI_EXPERIMENTAL=enabled @@ -43,12 +41,11 @@ licensecheck: exit 1; \ fi -lint: shellcheck licensecheck lint-markdown-format +lint: shellcheck licensecheck golangci-lint run -lint-fix: fix-markdown-format +lint-fix: golangci-lint run --fix -v - doccheck: generate @echo "- Checking if the generated documentation is up to date..." @@ -81,12 +78,6 @@ test-rules: shellcheck: ${DOCKER_CLI} run -v "${PWD}:/mnt" koalaman/shellcheck:stable $(shell find . -type f -name "*.sh" -not -path "*vendor*") -lint-markdown-format: - ${DOCKER_CLI} run -v "${PWD}:/workdir" davidanson/markdownlint-cli2:v${MARKDOWNLINT_CLI2_VERSION} --config .markdownlint-cli2.jsonc - -fix-markdown-format: - ${DOCKER_CLI} run -v "${PWD}:/workdir" davidanson/markdownlint-cli2:v${MARKDOWNLINT_CLI2_VERSION} --fix --config .markdownlint-cli2.jsonc - # Runs benchmark tests on the current git ref and the last release and compares # the two. test-benchmark-compare: diff --git a/README.md b/README.md index 2edcec362c..08d0a05bff 100644 --- a/README.md +++ b/README.md @@ -30,31 +30,31 @@ are deleted they are no longer visible on the `/metrics` endpoint. ## Table of Contents -* [Versioning](#versioning) - * [Kubernetes Version](#kubernetes-version) - * [Compatibility matrix](#compatibility-matrix) - * [Resource group version compatibility](#resource-group-version-compatibility) - * [Container Image](#container-image) -* [Metrics Documentation](#metrics-documentation) - * [Conflict resolution in label names](#conflict-resolution-in-label-names) -* [Kube-state-metrics self metrics](#kube-state-metrics-self-metrics) -* [Resource recommendation](#resource-recommendation) -* [Latency](#latency) -* [A note on costing](#a-note-on-costing) -* [kube-state-metrics vs. metrics-server](#kube-state-metrics-vs-metrics-server) -* [Scaling kube-state-metrics](#scaling-kube-state-metrics) - * [Resource recommendation](#resource-recommendation) - * [Horizontal sharding](#horizontal-sharding) - * [Automated sharding](#automated-sharding) - * [Daemonset sharding for pod metrics](#daemonset-sharding-for-pod-metrics) -* [Setup](#setup) - * [Building the Docker container](#building-the-docker-container) -* [Usage](#usage) - * [Kubernetes Deployment](#kubernetes-deployment) - * [Limited privileges environment](#limited-privileges-environment) - * [Helm Chart](#helm-chart) - * [Development](#development) - * [Developer Contributions](#developer-contributions) +- [Versioning](#versioning) + - [Kubernetes Version](#kubernetes-version) + - [Compatibility matrix](#compatibility-matrix) + - [Resource group version compatibility](#resource-group-version-compatibility) + - [Container Image](#container-image) +- [Metrics Documentation](#metrics-documentation) + - [Conflict resolution in label names](#conflict-resolution-in-label-names) +- [Kube-state-metrics self metrics](#kube-state-metrics-self-metrics) +- [Resource recommendation](#resource-recommendation) +- [Latency](#latency) +- [A note on costing](#a-note-on-costing) +- [kube-state-metrics vs. metrics-server](#kube-state-metrics-vs-metrics-server) +- [Scaling kube-state-metrics](#scaling-kube-state-metrics) + - [Resource recommendation](#resource-recommendation) + - [Horizontal sharding](#horizontal-sharding) + - [Automated sharding](#automated-sharding) + - [Daemonset sharding for pod metrics](#daemonset-sharding-for-pod-metrics) +- [Setup](#setup) + - [Building the Docker container](#building-the-docker-container) +- [Usage](#usage) + - [Kubernetes Deployment](#kubernetes-deployment) + - [Limited privileges environment](#limited-privileges-environment) + - [Helm Chart](#helm-chart) + - [Development](#development) + - [Developer Contributions](#developer-contributions) ### Versioning @@ -132,7 +132,6 @@ If you encounter those errors in the metrics, it is most likely a configuration at the logs of kube-state-metrics. Example of the above mentioned metrics: - ``` kube_state_metrics_list_total{resource="*v1.Node",result="success"} 1 kube_state_metrics_list_total{resource="*v1.Node",result="error"} 52 @@ -140,7 +139,6 @@ kube_state_metrics_watch_total{resource="*v1beta1.Ingress",result="success"} 1 ``` kube-state-metrics also exposes some http request metrics, examples of those are: - ``` http_request_duration_seconds_bucket{handler="metrics",method="get",le="2.5"} 30 http_request_duration_seconds_bucket{handler="metrics",method="get",le="5"} 30 @@ -151,7 +149,6 @@ http_request_duration_seconds_count{handler="metrics",method="get"} 30 ``` kube-state-metrics also exposes build and configuration metrics: - ``` kube_state_metrics_build_info{branch="main",goversion="go1.15.3",revision="6c9d775d",version="v2.0.0-beta"} 1 kube_state_metrics_shard_ordinal{shard_ordinal="0"} 0 @@ -249,13 +246,11 @@ The downside of using an auto-sharded setup comes from the rollout strategy supp ### Daemonset sharding for pod metrics For pod metrics, they can be sharded per node with the following flag: - * `--node` Each kube-state-metrics pod uses FieldSelector (spec.nodeName) to watch/list pod metrics only on the same node. A daemonset kube-state-metrics example: - ``` apiVersion: apps/v1 kind: DaemonSet @@ -290,7 +285,6 @@ go get k8s.io/kube-state-metrics Simply run the following command in this root folder, which will create a self-contained, statically-linked binary and build a Docker image: - ``` make container ``` @@ -318,7 +312,7 @@ To have Prometheus discover kube-state-metrics instances it is advised to create kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=$(gcloud info --format='value(config.account)') ``` -Note that your GCP identity is case sensitive but `gcloud info` as of Google Cloud SDK 221.0.0 is not. This means that if your IAM member contains capital letters, the above one-liner may not work for you. If you have 403 forbidden responses after running the above command and `kubectl apply -f examples/standard`, check the IAM member associated with your account at . If it contains capital letters, you may need to set the --user flag in the command above to the case-sensitive role listed at . +Note that your GCP identity is case sensitive but `gcloud info` as of Google Cloud SDK 221.0.0 is not. This means that if your IAM member contains capital letters, the above one-liner may not work for you. If you have 403 forbidden responses after running the above command and `kubectl apply -f examples/standard`, check the IAM member associated with your account at https://console.cloud.google.com/iam-admin/iam?project=PROJECT_ID. If it contains capital letters, you may need to set the --user flag in the command above to the case-sensitive role listed at https://console.cloud.google.com/iam-admin/iam?project=PROJECT_ID. After running the above, if you see `Clusterrolebinding "cluster-admin-binding" created`, then you are able to continue with the setup of this service. @@ -326,8 +320,7 @@ After running the above, if you see `Clusterrolebinding "cluster-admin-binding" If you want to run kube-state-metrics in an environment where you don't have cluster-reader role, you can: -* create a serviceaccount - +- create a serviceaccount ```yaml apiVersion: v1 kind: ServiceAccount @@ -336,8 +329,7 @@ metadata: namespace: your-namespace-where-kube-state-metrics-will-deployed ``` -* give it `view` privileges on specific namespaces (using roleBinding) (*note: you can add this roleBinding to all the NS you want your serviceaccount to access*) - +- give it `view` privileges on specific namespaces (using roleBinding) (*note: you can add this roleBinding to all the NS you want your serviceaccount to access*) ```yaml apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding @@ -354,7 +346,7 @@ subjects: namespace: your-namespace-where-kube-state-metrics-will-deployed ``` -* then specify a set of namespaces (using the `--namespaces` option) and a set of kubernetes objects (using the `--resources`) that your serviceaccount has access to in the `kube-state-metrics` deployment configuration +- then specify a set of namespaces (using the `--namespaces` option) and a set of kubernetes objects (using the `--resources`) that your serviceaccount has access to in the `kube-state-metrics` deployment configuration ```yaml spec: @@ -369,6 +361,7 @@ spec: For the full list of arguments available, see the documentation in [docs/cli-arguments.md](./docs/cli-arguments.md) + #### Helm Chart Starting from the kube-state-metrics chart `v2.13.3` (kube-state-metrics image `v1.9.8`), the official [Helm chart](https://artifacthub.io/packages/helm/prometheus-community/kube-state-metrics/) is maintained in [prometheus-community/helm-charts](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics). Starting from kube-state-metrics chart `v3.0.0` only kube-state-metrics images of `v2.0.0 +` are supported. @@ -380,12 +373,12 @@ running: > Users can override the apiserver address in KUBE-CONFIG file with `--apiserver` command line. - go install - kube-state-metrics --port=8080 --telemetry-port=8081 --kubeconfig= --apiserver= + go install + kube-state-metrics --port=8080 --telemetry-port=8081 --kubeconfig= --apiserver= Then curl the metrics endpoint - curl localhost:8080/metrics + curl localhost:8080/metrics To run the e2e tests locally see the documentation in [tests/README.md](./tests/README.md). diff --git a/RELEASE.md b/RELEASE.md index 887cd65aac..072da51edf 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -21,14 +21,12 @@ Maintaining the release branches for older minor releases happens on a best effo * Changelog entry * Only include user relevant changes * Entries in the [`CHANGELOG.md`](CHANGELOG.md) are meant to be in this order: - ``` [CHANGE] [FEATURE] [ENHANCEMENT] [BUGFIX] ``` - * All lines should be full sentences * kube-state-metrics image tag used in Kubernetes deployment yaml config. * Cut the new release branch, e.g. `release-1.2`, or merge/cherry-pick changes onto the minor release branch you intend to tag the release on diff --git a/docs/README.md b/docs/README.md index e871e09c78..faab9d73ee 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,10 +6,10 @@ Any contribution to improving this documentation or adding sample usages will be ## Table of Contents -* [Metrics Stages](#metrics-stages) -* [Exposed Metrics](#exposed-metrics) -* [Join Metrics](#join-metrics) -* [CLI arguments](#cli-arguments) +- [Metrics Stages](#metrics-stages) +- [Exposed Metrics](#exposed-metrics) +- [Join Metrics](#join-metrics) +- [CLI arguments](#cli-arguments) ## Metrics Stages @@ -32,44 +32,44 @@ See each file for specific documentation about the exposed metrics: ### Default Resources -* [CertificateSigningRequest Metrics](certificatesigningrequest-metrics.md) -* [ConfigMap Metrics](configmap-metrics.md) -* [CronJob Metrics](cronjob-metrics.md) -* [DaemonSet Metrics](daemonset-metrics.md) -* [Deployment Metrics](deployment-metrics.md) -* [Endpoint Metrics](endpoint-metrics.md) -* [Horizontal Pod Autoscaler Metrics](horizontalpodautoscaler-metrics.md) -* [Ingress Metrics](ingress-metrics.md) -* [Job Metrics](job-metrics.md) -* [Lease Metrics](lease-metrics.md) -* [LimitRange Metrics](limitrange-metrics.md) -* [MutatingWebhookConfiguration Metrics](mutatingwebhookconfiguration-metrics.md) -* [Namespace Metrics](namespace-metrics.md) -* [NetworkPolicy Metrics](networkpolicy-metrics.md) -* [Node Metrics](node-metrics.md) -* [PersistentVolume Metrics](persistentvolume-metrics.md) -* [PersistentVolumeClaim Metrics](persistentvolumeclaim-metrics.md) -* [Pod Disruption Budget Metrics](poddisruptionbudget-metrics.md) -* [Pod Metrics](pod-metrics.md) -* [ReplicaSet Metrics](replicaset-metrics.md) -* [ReplicationController Metrics](replicationcontroller-metrics.md) -* [ResourceQuota Metrics](resourcequota-metrics.md) -* [Secret Metrics](secret-metrics.md) -* [Service Metrics](service-metrics.md) -* [StatefulSet Metrics](statefulset-metrics.md) -* [StorageClass Metrics](storageclass-metrics.md) -* [ValidatingWebhookConfiguration Metrics](validatingwebhookconfiguration-metrics.md) -* [VolumeAttachment Metrics](volumeattachment-metrics.md) +- [CertificateSigningRequest Metrics](certificatesigningrequest-metrics.md) +- [ConfigMap Metrics](configmap-metrics.md) +- [CronJob Metrics](cronjob-metrics.md) +- [DaemonSet Metrics](daemonset-metrics.md) +- [Deployment Metrics](deployment-metrics.md) +- [Endpoint Metrics](endpoint-metrics.md) +- [Horizontal Pod Autoscaler Metrics](horizontalpodautoscaler-metrics.md) +- [Ingress Metrics](ingress-metrics.md) +- [Job Metrics](job-metrics.md) +- [Lease Metrics](lease-metrics.md) +- [LimitRange Metrics](limitrange-metrics.md) +- [MutatingWebhookConfiguration Metrics](mutatingwebhookconfiguration-metrics.md) +- [Namespace Metrics](namespace-metrics.md) +- [NetworkPolicy Metrics](networkpolicy-metrics.md) +- [Node Metrics](node-metrics.md) +- [PersistentVolume Metrics](persistentvolume-metrics.md) +- [PersistentVolumeClaim Metrics](persistentvolumeclaim-metrics.md) +- [Pod Disruption Budget Metrics](poddisruptionbudget-metrics.md) +- [Pod Metrics](pod-metrics.md) +- [ReplicaSet Metrics](replicaset-metrics.md) +- [ReplicationController Metrics](replicationcontroller-metrics.md) +- [ResourceQuota Metrics](resourcequota-metrics.md) +- [Secret Metrics](secret-metrics.md) +- [Service Metrics](service-metrics.md) +- [StatefulSet Metrics](statefulset-metrics.md) +- [StorageClass Metrics](storageclass-metrics.md) +- [ValidatingWebhookConfiguration Metrics](validatingwebhookconfiguration-metrics.md) +- [VolumeAttachment Metrics](volumeattachment-metrics.md) ### Optional Resources -* [ClusterRole Metrics](clusterrole-metrics.md) -* [ClusterRoleBinding Metrics](clusterrolebinding-metrics.md) -* [EndpointSlice Metrics](endpointslice-metrics.md) -* [IngressClass Metrics](ingressclass-metrics.md) -* [Role Metrics](role-metrics.md) -* [RoleBinding Metrics](rolebinding-metrics.md) -* [ServiceAccount Metrics](serviceaccount-metrics.md) +- [ClusterRole Metrics](clusterrole-metrics.md) +- [ClusterRoleBinding Metrics](clusterrolebinding-metrics.md) +- [EndpointSlice Metrics](endpointslice-metrics.md) +- [IngressClass Metrics](ingressclass-metrics.md) +- [Role Metrics](role-metrics.md) +- [RoleBinding Metrics](rolebinding-metrics.md) +- [ServiceAccount Metrics](serviceaccount-metrics.md) ## Join Metrics diff --git a/docs/cli-arguments.md b/docs/cli-arguments.md index 962798d0f2..4c0a3f46f0 100644 --- a/docs/cli-arguments.md +++ b/docs/cli-arguments.md @@ -19,8 +19,9 @@ spec: - '--apiserver=' ``` -## Available options +## Available options: +[embedmd]:# (../help.txt) ```txt $ kube-state-metrics -h kube-state-metrics is a simple service that listens to the Kubernetes API server and generates metrics about the state of the objects. diff --git a/docs/clusterrolebinding-metrics.md b/docs/clusterrolebinding-metrics.md index b1bda5130d..ce8d45909f 100644 --- a/docs/clusterrolebinding-metrics.md +++ b/docs/clusterrolebinding-metrics.md @@ -7,3 +7,4 @@ | kube_clusterrolebinding_info | Gauge | | `clusterrolebinding`=<clusterrolebinding-name>
`roleref_kind`=<role-kind>
`roleref_name`=<role-name> | EXPERIMENTAL | | kube_clusterrolebinding_created | Gauge | | `clusterrolebinding`=<clusterrolebinding-name> | EXPERIMENTAL | | kube_clusterrolebinding_metadata_resource_version | Gauge | | `clusterrolebinding`=<clusterrolebinding-name> | EXPERIMENTAL | + diff --git a/docs/customresourcestate-metrics.md b/docs/customresourcestate-metrics.md index a7042a874d..95ca156b3a 100644 --- a/docs/customresourcestate-metrics.md +++ b/docs/customresourcestate-metrics.md @@ -1,6 +1,6 @@ # Custom Resource State Metrics -This section describes how to add metrics based on the state of a custom resource without writing a custom resource +This section describes how to add metrics based on the state of a custom resource without writing a custom resource registry and running your own build of KSM. ## Configuration @@ -86,6 +86,7 @@ NOTE: The `customresource_group`, `customresource_version`, and `customresource_ Please be aware that kube-state-metrics needs list and watch permissions granted to `customresourcedefinitions.apiextensions.k8s.io` as well as to the resources you want to gather metrics from. + ### Examples The examples in this section will use the following custom resource: @@ -286,6 +287,7 @@ spec: The above configuration was tested on [this](https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/examples/hamster.yaml) VPA configuration, with an added annotation (`foo: 123`). + ### Metric types The configuration supports three kind of metrics from the [OpenMetrics specification](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md). @@ -333,9 +335,9 @@ Supported types are: * for string the following logic applies * `"true"` and `"yes"` are mapped to `1.0` and `"false"` and `"no"` are mapped to `0.0` (all case-insensitive) * RFC3339 times are parsed to float timestamp - * Quantities like "250m" or "512Gi" are parsed to float using + * Quantities like "250m" or "512Gi" are parsed to float using https://github.com/kubernetes/apimachinery/blob/master/pkg/api/resource/quantity.go * Percentages ending with a "%" are parsed to float - * finally the string is parsed to float using which should support all common number formats. If that fails an error is yielded + * finally the string is parsed to float using https://pkg.go.dev/strconv#ParseFloat which should support all common number formats. If that fails an error is yielded ##### Example for status conditions on Kubernetes Controllers @@ -366,7 +368,7 @@ spec: valueFrom: ["status"] ``` -This will work for kubernetes controller CRs which expose status conditions according to the kubernetes api (): +This will work for kubernetes controller CRs which expose status conditions according to the kubernetes api (https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Condition): ```yaml status: @@ -460,7 +462,6 @@ spec: ``` Produces: - ```prometheus myteam_foos_uptime{customresource_group="myteam.io", customresource_kind="Foo", customresource_version="v1"} 43.21 ``` @@ -479,7 +480,6 @@ spec: ``` Produces: - ```prometheus uptime{customresource_group="myteam.io", customresource_kind="Foo", customresource_version="v1"} 43.21 ``` @@ -562,5 +562,5 @@ kube_customresource_myobject_info{customresource_group="myteam.io",customresourc #### Note -* For cases where the GVKs defined in a CRD have multiple versions under a single group for the same kind, as expected, the wildcard value will resolve to *all* versions, but a query for any specific version will return all resources under all versions, in that versions' representation. This basically means that for two such versions `A` and `B`, if a resource exists under `B`, it will reflect in the metrics generated for `A` as well, in addition to any resources of itself, and vice-versa. This logic is based on the [current `list`ing behavior](https://github.com/kubernetes/client-go/issues/1251#issuecomment-1544083071) of the client-go library. -* The introduction of this feature further discourages (and discontinues) the use of native objects in the CRS featureset, since these do not have an explicit CRD associated with them, and conflict with internal stores defined specifically for such native resources. Please consider opening an issue or raising a PR if you'd like to expand on the current metric labelsets for them. Also, any such configuration will be ignored, and no metrics will be generated for the same. +- For cases where the GVKs defined in a CRD have multiple versions under a single group for the same kind, as expected, the wildcard value will resolve to *all* versions, but a query for any specific version will return all resources under all versions, in that versions' representation. This basically means that for two such versions `A` and `B`, if a resource exists under `B`, it will reflect in the metrics generated for `A` as well, in addition to any resources of itself, and vice-versa. This logic is based on the [current `list`ing behavior](https://github.com/kubernetes/client-go/issues/1251#issuecomment-1544083071) of the client-go library. +- The introduction of this feature further discourages (and discontinues) the use of native objects in the CRS featureset, since these do not have an explicit CRD associated with them, and conflict with internal stores defined specifically for such native resources. Please consider opening an issue or raising a PR if you'd like to expand on the current metric labelsets for them. Also, any such configuration will be ignored, and no metrics will be generated for the same. diff --git a/docs/design/metrics-store-performance-optimization.md b/docs/design/metrics-store-performance-optimization.md index 8c00c670c7..c1321503b2 100644 --- a/docs/design/metrics-store-performance-optimization.md +++ b/docs/design/metrics-store-performance-optimization.md @@ -1,8 +1,9 @@ # Kube-State-Metrics - Performance Optimization Proposal + --- -Author: Max Inden () +Author: Max Inden (IndenML@gmail.com) Date: 23. July 2018 @@ -10,14 +11,16 @@ Target release: v1.5.0 --- + ## Glossary -* kube-state-metrics: “Simple service that listens to the Kubernetes API server +- kube-state-metrics: “Simple service that listens to the Kubernetes API server and generates metrics about the state of the objects” -* Time series: A single line in a /metrics response e.g. +- Time series: A single line in a /metrics response e.g. “metric_name{label="value"} 1” + ## Problem Statement There has been repeated reports of two issues running kube-state-metrics on @@ -27,6 +30,7 @@ instances dropping the scrape interval request and marking the given time series as stale. Second kube-state-metrics uses a lot of memory and thereby being out-of-memory killed due to low set Kubernetes resource limits. + ## Goal The goal of this proposal can be split into the following sub-goals ordered by @@ -36,6 +40,7 @@ their priority: 2. Decrease overall runtime memory usage + ## Status Quo Instead of requesting the needed information from the Kubernetes API-Server on @@ -51,6 +56,7 @@ On a scrape request by e.g. Prometheus on the /metrics endpoint kube-state-metrics calculates the configured time series on demand based on the objects in its cache and converts them to the Prometheus string representation. + ## Proposal Instead of a full representation of all Kubernetes objects with all its @@ -133,9 +139,10 @@ pod_collector -> metrics_endpoint: concat(metrics) + ## FAQ / Follow up improvements -* If kube-state-metrics only listens on add, update and delete events, how is it +- If kube-state-metrics only listens on add, update and delete events, how is it aware of already existing Kubernetes objects created before kube-state-metrics was started? Leveraging Kubernetes client-go, reflectors can initialize all existing objects before any add, update or delete events. To ensure no events @@ -144,27 +151,27 @@ pod_collector -> metrics_endpoint: concat(metrics) costs, as Kubernetes client-go already gives decent guarantees on event delivery. -* What about metadata (HELP and description) in the /metrics output? As a first +- What about metadata (HELP and description) in the /metrics output? As a first iteration they would be skipped until we have a better idea on the design. -* How can the cache map be concurrently accessed? The core golang map +- How can the cache map be concurrently accessed? The core golang map implementation is not thread-safe. As a first iteration a simple mutex should be sufficient. Golang's sync.Map might be considered. -* To solve the problem of out of order events send by the Kubernetes API-Server +- To solve the problem of out of order events send by the Kubernetes API-Server to kube-state-metrics, to each blob of time series inside the cache map it can keep the Kubernetes resource version. On add and update events, first compare the resource version of the event with than the resource version in the cache. Only move forward if the former is higher than the latter. -* In case the memory consumption of the time series string blobs is a problem +- In case the memory consumption of the time series string blobs is a problem the following optimization can be considered: Among the time series strings, multiple sub-strings will be heavily duplicated like the metric name. Instead of saving unstructured strings inside the cache map, one can structure them, using pointers to deduplicate e.g. metric names. -* ... +- ... -* Kube-state-metrics does not make use of all properties of all Kubernetes +- Kube-state-metrics does not make use of all properties of all Kubernetes objects. Instead of unmarshalling unused properties, their json struct tags or their Protobuf representation could be removed. diff --git a/docs/developer/guide.md b/docs/developer/guide.md index b93f715001..eb5a72e51b 100644 --- a/docs/developer/guide.md +++ b/docs/developer/guide.md @@ -1,32 +1,33 @@ -# Developer Guide +# Developer Guide This developer guide documentation is intended to assist all contributors in various code contributions. Any contribution to improving this documentation will be appreciated. ## Table of Contents -* [Add New Kubernetes Resource Metric Collector](#add-new-kubernetes-resource-metric-collector) -* [Add New Metrics](#add-new-metrics) +- [Add New Kubernetes Resource Metric Collector](#add-new-kubernetes-resource-metric-collector) +- [Add New Metrics](#add-new-metrics) ### Add New Kubernetes Resource Metric Collector The following steps are needed to introduce a new resource and its respective resource metrics. -* Reference your new resource(s) to the [docs/README.md](https://github.com/kubernetes/kube-state-metrics/blob/main/docs/README.md#exposed-metrics). -* Reference your new resource(s) in the [docs/cli-arguments.md](https://github.com/kubernetes/kube-state-metrics/blob/main/docs/cli-arguments.md#available-options) as part of the `--resources` flag. -* Create a new `.md` in the [docs](https://github.com/kubernetes/kube-state-metrics/tree/main/docs) directory to provide documentation on the resource(s) and metrics you implemented. Follow the formatting of all other resources. -* Add the resource(s) you are representing to the [jsonnet/kube-state-metrics/kube-state-metrics.libsonnet](https://github.com/kubernetes/kube-state-metrics/blob/main/jsonnet/kube-state-metrics/kube-state-metrics.libsonnet) under the appropriate `apiGroup` using the `verbs`: `list` and `watch`. -* Run `make examples/standard`, this should re-generate [examples/standard/cluster-role.yaml](https://github.com/kubernetes/kube-state-metrics/blob/main/examples/standard/cluster-role.yaml) with the resource(s) added to [jsonnet/kube-state-metrics/kube-state-metrics.libsonnet](https://github.com/kubernetes/kube-state-metrics/blob/main/jsonnet/kube-state-metrics/kube-state-metrics.libsonnet). -* Reference and add build functions for the new resource(s) in [internal/store/builder.go](https://github.com/kubernetes/kube-state-metrics/blob/main/internal/store/builder.go). -* Reference the new resource in [pkg/options/resource.go](https://github.com/kubernetes/kube-state-metrics/blob/main/pkg/options/resource.go). -* Add a sample Kubernetes manifest to be used by tests in the [tests/manifests/](https://github.com/kubernetes/kube-state-metrics/tree/main/tests/manifests) directory. -* Lastly, and most importantly, actually implement your new resource(s) and its test binary in [internal/store](https://github.com/kubernetes/kube-state-metrics/tree/main/internal/store). Follow the formatting and structure of other resources. +- Reference your new resource(s) to the [docs/README.md](https://github.com/kubernetes/kube-state-metrics/blob/main/docs/README.md#exposed-metrics). +- Reference your new resource(s) in the [docs/cli-arguments.md](https://github.com/kubernetes/kube-state-metrics/blob/main/docs/cli-arguments.md#available-options) as part of the `--resources` flag. +- Create a new `.md` in the [docs](https://github.com/kubernetes/kube-state-metrics/tree/main/docs) directory to provide documentation on the resource(s) and metrics you implemented. Follow the formatting of all other resources. +- Add the resource(s) you are representing to the [jsonnet/kube-state-metrics/kube-state-metrics.libsonnet](https://github.com/kubernetes/kube-state-metrics/blob/main/jsonnet/kube-state-metrics/kube-state-metrics.libsonnet) under the appropriate `apiGroup` using the `verbs`: `list` and `watch`. +- Run `make examples/standard`, this should re-generate [examples/standard/cluster-role.yaml](https://github.com/kubernetes/kube-state-metrics/blob/main/examples/standard/cluster-role.yaml) with the resource(s) added to [jsonnet/kube-state-metrics/kube-state-metrics.libsonnet](https://github.com/kubernetes/kube-state-metrics/blob/main/jsonnet/kube-state-metrics/kube-state-metrics.libsonnet). +- Reference and add build functions for the new resource(s) in [internal/store/builder.go](https://github.com/kubernetes/kube-state-metrics/blob/main/internal/store/builder.go). +- Reference the new resource in [pkg/options/resource.go](https://github.com/kubernetes/kube-state-metrics/blob/main/pkg/options/resource.go). +- Add a sample Kubernetes manifest to be used by tests in the [tests/manifests/](https://github.com/kubernetes/kube-state-metrics/tree/main/tests/manifests) directory. +- Lastly, and most importantly, actually implement your new resource(s) and its test binary in [internal/store](https://github.com/kubernetes/kube-state-metrics/tree/main/internal/store). Follow the formatting and structure of other resources. ### Add New Metrics -* Make metrics experimental first when introducing them, refer [#1910](https://github.com/kubernetes/kube-state-metrics/pull/1910) for more information. +- Make metrics experimental first when introducing them, refer [#1910](https://github.com/kubernetes/kube-state-metrics/pull/1910) for more information. | Metric stability level | | |------------------------|--------------------| | EXPERIMENTAL | basemetrics.ALPHA | | STABLE | basemetrics.STABLE | + diff --git a/docs/networkpolicy-metrics.md b/docs/networkpolicy-metrics.md index 0ceeb1e141..c000d41dd7 100644 --- a/docs/networkpolicy-metrics.md +++ b/docs/networkpolicy-metrics.md @@ -1,5 +1,6 @@ # Network Policy Metrics + | Metric name | Metric type | Description | Labels/tags | Status | | ------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------ | | kube_networkpolicy_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `namespace`=<namespace name> `networkpolicy`=<networkpolicy name> | EXPERIMENTAL | diff --git a/docs/persistentvolumeclaim-metrics.md b/docs/persistentvolumeclaim-metrics.md index 33e76d262e..470ec7e850 100644 --- a/docs/persistentvolumeclaim-metrics.md +++ b/docs/persistentvolumeclaim-metrics.md @@ -14,7 +14,7 @@ Note: -* An empty string will be used if PVC has no storage class. +- An empty string will be used if PVC has no storage class. ## Useful metrics queries diff --git a/go.mod b/go.mod index 8c97d927fd..3711921fb6 100644 --- a/go.mod +++ b/go.mod @@ -17,12 +17,12 @@ require ( github.com/spf13/viper v1.16.0 github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.28.1 - k8s.io/apimachinery v0.28.2 - k8s.io/client-go v0.28.1 - k8s.io/component-base v0.28.1 + k8s.io/api v0.27.5 + k8s.io/apimachinery v0.27.5 + k8s.io/client-go v0.27.5 + k8s.io/component-base v0.27.5 k8s.io/klog/v2 v2.100.1 - k8s.io/sample-controller v0.28.1 + k8s.io/sample-controller v0.27.5 k8s.io/utils v0.0.0-20230726121419-3b25d923346b ) @@ -33,17 +33,17 @@ require ( github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/emicklei/go-restful/v3 v3.9.0 // indirect - github.com/evanphx/json-patch v5.6.0+incompatible // indirect + github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.2.3 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.20.1 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/gofuzz v1.2.0 // indirect + github.com/google/gnostic v0.5.7-v3refs // indirect + github.com/google/gofuzz v1.1.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/imdario/mergo v0.3.6 // indirect @@ -68,20 +68,20 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.4.2 // indirect - golang.org/x/crypto v0.11.0 // indirect - golang.org/x/net v0.13.0 // indirect + golang.org/x/crypto v0.9.0 // indirect + golang.org/x/net v0.10.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect - golang.org/x/time v0.3.0 // indirect + golang.org/x/sys v0.8.0 // indirect + golang.org/x/term v0.8.0 // indirect + golang.org/x/text v0.9.0 // indirect + golang.org/x/time v0.1.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect + k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/go.sum b/go.sum index 37c2b82456..d852989b43 100644 --- a/go.sum +++ b/go.sum @@ -61,6 +61,7 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/go-jump v0.0.0-20211018200510-ba001c3ffce0 h1:0wH6nO9QEa02Qx8sIQGw6ieKdz+BXjpccSOo9vXNl4U= github.com/dgryski/go-jump v0.0.0-20211018200510-ba001c3ffce0/go.mod h1:4hKCXuwrJoYvHZxJ86+bRVTOMyJ0Ej+RqfSm8mHi6KA= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -69,8 +70,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= @@ -82,15 +83,15 @@ github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBj github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -122,12 +123,13 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -141,8 +143,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -186,6 +188,7 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -211,8 +214,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= -github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= -github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/ginkgo/v2 v2.9.1 h1:zie5Ly042PD3bsCvsSOPvRnFwyo3rKe64TJlD6nu0mk= +github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -234,7 +237,7 @@ github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPH github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= @@ -248,6 +251,7 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -281,8 +285,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -348,8 +352,8 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= -golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -409,11 +413,11 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -422,13 +426,13 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -478,7 +482,7 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -540,6 +544,7 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -578,6 +583,7 @@ google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cn google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -590,6 +596,7 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -599,20 +606,20 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.1 h1:i+0O8k2NPBCPYaMB+uCkseEbawEt/eFaiRqUx8aB108= -k8s.io/api v0.28.1/go.mod h1:uBYwID+66wiL28Kn2tBjBYQdEU0Xk0z5qF8bIBqk/Dg= -k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= -k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= -k8s.io/client-go v0.28.1 h1:pRhMzB8HyLfVwpngWKE8hDcXRqifh1ga2Z/PU9SXVK8= -k8s.io/client-go v0.28.1/go.mod h1:pEZA3FqOsVkCc07pFVzK076R+P/eXqsgx5zuuRWukNE= -k8s.io/component-base v0.28.1 h1:LA4AujMlK2mr0tZbQDZkjWbdhTV5bRyEyAFe0TJxlWg= -k8s.io/component-base v0.28.1/go.mod h1:jI11OyhbX21Qtbav7JkhehyBsIRfnO8oEgoAR12ArIU= +k8s.io/api v0.27.5 h1:49hIzqJNSuOQpA53MMihgAS4YDcQitTy58B9PMFthLc= +k8s.io/api v0.27.5/go.mod h1:zjBZB+c0KDU55Wxb9Bob9WZGxu9zdKHitzHxBtaIVoA= +k8s.io/apimachinery v0.27.5 h1:6Q5HBXYJJPisd6yDVAprLe6FQsmw7a7Cu69dcrpQET8= +k8s.io/apimachinery v0.27.5/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/client-go v0.27.5 h1:sH/fkqzk35kuf0GPx+dZuN7fhEswBSAVCrWFq3E1km0= +k8s.io/client-go v0.27.5/go.mod h1:u+IKnqPZSPw51snIMKiIAV8LQQ+hya5bvxpOOPTUXPI= +k8s.io/component-base v0.27.5 h1:IXo80yOVx7qXG2g1loPpo2g1HUK3CnxNpq9LtGmXAmM= +k8s.io/component-base v0.27.5/go.mod h1:AGJyFHmaxplY4C4lu18UrJBNHcxdv0o6jOL/+HcC0S0= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/sample-controller v0.28.1 h1:aNzAaCOvQ2itFyRieIyRcVvMBe93m9l9Ly94+m5Y0pE= -k8s.io/sample-controller v0.28.1/go.mod h1:0Cygo2yptWMksOfi5xYOpVnt8x0pJ26zbBrdH7mqEPg= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= +k8s.io/sample-controller v0.27.5 h1:N3mMPdEFJ8gdn7HMCIecnTU7h6YVfVJjSDt72nxAocc= +k8s.io/sample-controller v0.27.5/go.mod h1:KtTxV9H5DpvbU5WpM2o/Cpv/fuZykJhqBqCJdNfFRpg= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/tests/e2e.sh b/tests/e2e.sh index fc6ca48b40..a72403b5fd 100755 --- a/tests/e2e.sh +++ b/tests/e2e.sh @@ -24,7 +24,7 @@ case $(uname -m) in esac NODE_IMAGE_NAME="docker.io/kindest/node" -KUBERNETES_VERSION=${KUBERNETES_VERSION:-"v1.28.0"} +KUBERNETES_VERSION=${KUBERNETES_VERSION:-"v1.27.0"} KUBE_STATE_METRICS_LOG_DIR=./log KUBE_STATE_METRICS_CURRENT_IMAGE_NAME="registry.k8s.io/kube-state-metrics/kube-state-metrics" KUBE_STATE_METRICS_IMAGE_NAME="registry.k8s.io/kube-state-metrics/kube-state-metrics-${ARCH}" diff --git a/tests/e2e/README.md b/tests/e2e/README.md index b8eb4b2976..edebccf00b 100644 --- a/tests/e2e/README.md +++ b/tests/e2e/README.md @@ -1,7 +1,7 @@ To run these tests, you need to provide two CLI flags: -* `--ksm-http-metrics-url`: url to access the kube-state-metrics service -* `--ksm-telemetry-url`: url to access the kube-state-metrics telemetry endpoint +- `--ksm-http-metrics-url`: url to access the kube-state-metrics service +- `--ksm-telemetry-url`: url to access the kube-state-metrics telemetry endpoint Example: From abf59a9c602a7150660f8ef652673be9781f4dbb Mon Sep 17 00:00:00 2001 From: Pranshu Srivastava Date: Sun, 8 Oct 2023 22:47:38 +0530 Subject: [PATCH 3/8] Revert "Merge pull request #2192 from rexagod/prep-v2.10.1" This reverts commit d68bad28235354a675705fbe532f4c1162ee1101, reversing changes made to 25fb4fa0767de7ee314500fcb7481ca7b3a55a35. --- CHANGELOG.md | 8 -------- Makefile | 2 +- README.md | 8 ++++---- VERSION | 2 +- examples/autosharding/cluster-role-binding.yaml | 2 +- examples/autosharding/cluster-role.yaml | 2 +- examples/autosharding/role-binding.yaml | 2 +- examples/autosharding/role.yaml | 2 +- examples/autosharding/service-account.yaml | 2 +- examples/autosharding/service.yaml | 2 +- examples/autosharding/statefulset.yaml | 6 +++--- examples/daemonsetsharding/cluster-role-binding.yaml | 2 +- examples/daemonsetsharding/cluster-role.yaml | 2 +- examples/daemonsetsharding/daemonset-service.yaml | 2 +- examples/daemonsetsharding/daemonset.yaml | 6 +++--- examples/daemonsetsharding/deployment-service.yaml | 2 +- examples/daemonsetsharding/deployment.yaml | 6 +++--- examples/daemonsetsharding/service-account.yaml | 2 +- examples/standard/cluster-role-binding.yaml | 2 +- examples/standard/cluster-role.yaml | 2 +- examples/standard/deployment.yaml | 6 +++--- examples/standard/service-account.yaml | 2 +- examples/standard/service.yaml | 2 +- internal/store/certificatesigningrequest.go | 4 +++- internal/store/clusterrole.go | 4 +++- internal/store/clusterrolebinding.go | 4 +++- internal/store/ingressclass.go | 4 +++- internal/store/mutatingwebhookconfiguration.go | 4 +++- internal/store/namespace.go | 4 +++- internal/store/node.go | 4 +++- internal/store/persistentvolume.go | 4 +++- internal/store/storageclass.go | 4 +++- internal/store/validatingwebhookconfiguration.go | 4 +++- 33 files changed, 63 insertions(+), 51 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18ef2cfeb9..41cd142fb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,3 @@ -## v2.10.1 / 2023-09-13 - -### Note -- This release addresses a regression introduced in https://github.com/kubernetes/kube-state-metrics/pull/2105. - -* [BUGFIX] Remove FieldSelector from non-namespaced resources by @mrueg and @dgrisonnet in https://github.com/kubernetes/kube-state-metrics/pull/2190 -* [ENHANCEMENT] Bump Go to v1.20.8 - ## v2.10.0 / 2023-08-31 ### Note diff --git a/Makefile b/Makefile index db597b86df..38c8f9e5a3 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ OS ?= $(shell uname -s | tr A-Z a-z) ALL_ARCH = amd64 arm arm64 ppc64le s390x PKG = github.com/prometheus/common PROMETHEUS_VERSION = 2.46.0 -GO_VERSION = 1.20.8 +GO_VERSION = 1.20.7 IMAGE = $(REGISTRY)/kube-state-metrics MULTI_ARCH_IMG = $(IMAGE)-$(ARCH) USER ?= $(shell id -u -n) diff --git a/README.md b/README.md index 08d0a05bff..54ddc6b9e9 100644 --- a/README.md +++ b/README.md @@ -77,8 +77,8 @@ Generally, it is recommended to use the latest release of kube-state-metrics. If | **v2.7.0** | v1.25 | | **v2.8.2** | v1.26 | | **v2.9.2** | v1.26 | -| **v2.10.1** | v1.27 | -| **main** | v1.28 | +| **v2.10.0** | v1.27 | +| **main** | v1.27 | #### Resource group version compatibility @@ -90,8 +90,8 @@ release. #### Container Image The latest container image can be found at: -* `registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.1` (arch: `amd64`, `arm`, `arm64`, `ppc64le` and `s390x`) -* View all multi-architecture images at [here](https://explore.ggcr.dev/?image=registry.k8s.io%2Fkube-state-metrics%2Fkube-state-metrics:v2.10.1) +* `registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.0` (arch: `amd64`, `arm`, `arm64`, `ppc64le` and `s390x`) +* View all multi-architecture images at [here](https://explore.ggcr.dev/?image=registry.k8s.io%2Fkube-state-metrics%2Fkube-state-metrics:v2.10.0) ### Metrics Documentation diff --git a/VERSION b/VERSION index 8bbb6e406a..10c2c0c3d6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.10.1 +2.10.0 diff --git a/examples/autosharding/cluster-role-binding.yaml b/examples/autosharding/cluster-role-binding.yaml index 29645f249e..ac698e55b6 100644 --- a/examples/autosharding/cluster-role-binding.yaml +++ b/examples/autosharding/cluster-role-binding.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/examples/autosharding/cluster-role.yaml b/examples/autosharding/cluster-role.yaml index 6951d6481c..3171418165 100644 --- a/examples/autosharding/cluster-role.yaml +++ b/examples/autosharding/cluster-role.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics rules: - apiGroups: diff --git a/examples/autosharding/role-binding.yaml b/examples/autosharding/role-binding.yaml index c5c0dd4188..252f59598c 100644 --- a/examples/autosharding/role-binding.yaml +++ b/examples/autosharding/role-binding.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics namespace: kube-system roleRef: diff --git a/examples/autosharding/role.yaml b/examples/autosharding/role.yaml index dd15387b69..e4562c3732 100644 --- a/examples/autosharding/role.yaml +++ b/examples/autosharding/role.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics namespace: kube-system rules: diff --git a/examples/autosharding/service-account.yaml b/examples/autosharding/service-account.yaml index 206b746915..fa83a8e6e0 100644 --- a/examples/autosharding/service-account.yaml +++ b/examples/autosharding/service-account.yaml @@ -5,6 +5,6 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics namespace: kube-system diff --git a/examples/autosharding/service.yaml b/examples/autosharding/service.yaml index caada6028a..19aca0a936 100644 --- a/examples/autosharding/service.yaml +++ b/examples/autosharding/service.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics namespace: kube-system spec: diff --git a/examples/autosharding/statefulset.yaml b/examples/autosharding/statefulset.yaml index 978c998202..4cebb09b61 100644 --- a/examples/autosharding/statefulset.yaml +++ b/examples/autosharding/statefulset.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics namespace: kube-system spec: @@ -18,7 +18,7 @@ spec: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 spec: automountServiceAccountToken: true containers: @@ -34,7 +34,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.1 + image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.0 livenessProbe: httpGet: path: /healthz diff --git a/examples/daemonsetsharding/cluster-role-binding.yaml b/examples/daemonsetsharding/cluster-role-binding.yaml index 29645f249e..ac698e55b6 100644 --- a/examples/daemonsetsharding/cluster-role-binding.yaml +++ b/examples/daemonsetsharding/cluster-role-binding.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/examples/daemonsetsharding/cluster-role.yaml b/examples/daemonsetsharding/cluster-role.yaml index 6951d6481c..3171418165 100644 --- a/examples/daemonsetsharding/cluster-role.yaml +++ b/examples/daemonsetsharding/cluster-role.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics rules: - apiGroups: diff --git a/examples/daemonsetsharding/daemonset-service.yaml b/examples/daemonsetsharding/daemonset-service.yaml index 630d4d2bac..739889210a 100644 --- a/examples/daemonsetsharding/daemonset-service.yaml +++ b/examples/daemonsetsharding/daemonset-service.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics-shard - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics-shard namespace: kube-system spec: diff --git a/examples/daemonsetsharding/daemonset.yaml b/examples/daemonsetsharding/daemonset.yaml index 2d638ee080..3ae83cf6c4 100644 --- a/examples/daemonsetsharding/daemonset.yaml +++ b/examples/daemonsetsharding/daemonset.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics-shard - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics-shard namespace: kube-system spec: @@ -16,7 +16,7 @@ spec: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics-shard - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 spec: automountServiceAccountToken: true containers: @@ -29,7 +29,7 @@ spec: fieldRef: apiVersion: v1 fieldPath: spec.nodeName - image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.1 + image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.0 livenessProbe: httpGet: path: /healthz diff --git a/examples/daemonsetsharding/deployment-service.yaml b/examples/daemonsetsharding/deployment-service.yaml index caada6028a..19aca0a936 100644 --- a/examples/daemonsetsharding/deployment-service.yaml +++ b/examples/daemonsetsharding/deployment-service.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics namespace: kube-system spec: diff --git a/examples/daemonsetsharding/deployment.yaml b/examples/daemonsetsharding/deployment.yaml index c0457422b4..57a43aaa91 100644 --- a/examples/daemonsetsharding/deployment.yaml +++ b/examples/daemonsetsharding/deployment.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics namespace: kube-system spec: @@ -17,13 +17,13 @@ spec: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 spec: automountServiceAccountToken: true containers: - args: - --resources=certificatesigningrequests,configmaps,cronjobs,daemonsets,deployments,endpoints,horizontalpodautoscalers,ingresses,jobs,leases,limitranges,mutatingwebhookconfigurations,namespaces,networkpolicies,nodes,persistentvolumeclaims,persistentvolumes,poddisruptionbudgets,replicasets,replicationcontrollers,resourcequotas,secrets,services,statefulsets,storageclasses,validatingwebhookconfigurations,volumeattachments - image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.1 + image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.0 livenessProbe: httpGet: path: /healthz diff --git a/examples/daemonsetsharding/service-account.yaml b/examples/daemonsetsharding/service-account.yaml index 206b746915..fa83a8e6e0 100644 --- a/examples/daemonsetsharding/service-account.yaml +++ b/examples/daemonsetsharding/service-account.yaml @@ -5,6 +5,6 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics namespace: kube-system diff --git a/examples/standard/cluster-role-binding.yaml b/examples/standard/cluster-role-binding.yaml index 29645f249e..ac698e55b6 100644 --- a/examples/standard/cluster-role-binding.yaml +++ b/examples/standard/cluster-role-binding.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/examples/standard/cluster-role.yaml b/examples/standard/cluster-role.yaml index 6951d6481c..3171418165 100644 --- a/examples/standard/cluster-role.yaml +++ b/examples/standard/cluster-role.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics rules: - apiGroups: diff --git a/examples/standard/deployment.yaml b/examples/standard/deployment.yaml index 9249a20f51..471275b152 100644 --- a/examples/standard/deployment.yaml +++ b/examples/standard/deployment.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics namespace: kube-system spec: @@ -17,11 +17,11 @@ spec: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 spec: automountServiceAccountToken: true containers: - - image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.1 + - image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.0 livenessProbe: httpGet: path: /healthz diff --git a/examples/standard/service-account.yaml b/examples/standard/service-account.yaml index 206b746915..fa83a8e6e0 100644 --- a/examples/standard/service-account.yaml +++ b/examples/standard/service-account.yaml @@ -5,6 +5,6 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics namespace: kube-system diff --git a/examples/standard/service.yaml b/examples/standard/service.yaml index caada6028a..19aca0a936 100644 --- a/examples/standard/service.yaml +++ b/examples/standard/service.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.1 + app.kubernetes.io/version: 2.10.0 name: kube-state-metrics namespace: kube-system spec: diff --git a/internal/store/certificatesigningrequest.go b/internal/store/certificatesigningrequest.go index ea287e1490..c70cf801bd 100644 --- a/internal/store/certificatesigningrequest.go +++ b/internal/store/certificatesigningrequest.go @@ -153,12 +153,14 @@ func wrapCSRFunc(f func(*certv1.CertificateSigningRequest) *metric.Family) func( } } -func createCSRListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { +func createCSRListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { + opts.FieldSelector = fieldSelector return kubeClient.CertificatesV1().CertificateSigningRequests().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { + opts.FieldSelector = fieldSelector return kubeClient.CertificatesV1().CertificateSigningRequests().Watch(context.TODO(), opts) }, } diff --git a/internal/store/clusterrole.go b/internal/store/clusterrole.go index 86642ab229..ee7a7384df 100644 --- a/internal/store/clusterrole.go +++ b/internal/store/clusterrole.go @@ -138,12 +138,14 @@ func clusterRoleMetricFamilies(allowAnnotationsList, allowLabelsList []string) [ } } -func createClusterRoleListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { +func createClusterRoleListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { + opts.FieldSelector = fieldSelector return kubeClient.RbacV1().ClusterRoles().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { + opts.FieldSelector = fieldSelector return kubeClient.RbacV1().ClusterRoles().Watch(context.TODO(), opts) }, } diff --git a/internal/store/clusterrolebinding.go b/internal/store/clusterrolebinding.go index 494095221e..c046008b23 100644 --- a/internal/store/clusterrolebinding.go +++ b/internal/store/clusterrolebinding.go @@ -140,12 +140,14 @@ func clusterRoleBindingMetricFamilies(allowAnnotationsList, allowLabelsList []st } } -func createClusterRoleBindingListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { +func createClusterRoleBindingListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { + opts.FieldSelector = fieldSelector return kubeClient.RbacV1().ClusterRoleBindings().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { + opts.FieldSelector = fieldSelector return kubeClient.RbacV1().ClusterRoleBindings().Watch(context.TODO(), opts) }, } diff --git a/internal/store/ingressclass.go b/internal/store/ingressclass.go index 0724c9110a..ec7a0f7d71 100644 --- a/internal/store/ingressclass.go +++ b/internal/store/ingressclass.go @@ -134,12 +134,14 @@ func wrapIngressClassFunc(f func(*networkingv1.IngressClass) *metric.Family) fun } } -func createIngressClassListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { +func createIngressClassListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { + opts.FieldSelector = fieldSelector return kubeClient.NetworkingV1().IngressClasses().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { + opts.FieldSelector = fieldSelector return kubeClient.NetworkingV1().IngressClasses().Watch(context.TODO(), opts) }, } diff --git a/internal/store/mutatingwebhookconfiguration.go b/internal/store/mutatingwebhookconfiguration.go index c09df4773f..1a003f490a 100644 --- a/internal/store/mutatingwebhookconfiguration.go +++ b/internal/store/mutatingwebhookconfiguration.go @@ -111,12 +111,14 @@ var ( } ) -func createMutatingWebhookConfigurationListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { +func createMutatingWebhookConfigurationListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { + opts.FieldSelector = fieldSelector return kubeClient.AdmissionregistrationV1().MutatingWebhookConfigurations().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { + opts.FieldSelector = fieldSelector return kubeClient.AdmissionregistrationV1().MutatingWebhookConfigurations().Watch(context.TODO(), opts) }, } diff --git a/internal/store/namespace.go b/internal/store/namespace.go index e46c73cf28..df3f1f0578 100644 --- a/internal/store/namespace.go +++ b/internal/store/namespace.go @@ -176,12 +176,14 @@ func wrapNamespaceFunc(f func(*v1.Namespace) *metric.Family) func(interface{}) * } } -func createNamespaceListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { +func createNamespaceListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { + opts.FieldSelector = fieldSelector return kubeClient.CoreV1().Namespaces().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { + opts.FieldSelector = fieldSelector return kubeClient.CoreV1().Namespaces().Watch(context.TODO(), opts) }, } diff --git a/internal/store/node.go b/internal/store/node.go index 1d4d6bee4f..fb577a0bec 100644 --- a/internal/store/node.go +++ b/internal/store/node.go @@ -495,12 +495,14 @@ func wrapNodeFunc(f func(*v1.Node) *metric.Family) func(interface{}) *metric.Fam } } -func createNodeListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { +func createNodeListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { + opts.FieldSelector = fieldSelector return kubeClient.CoreV1().Nodes().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { + opts.FieldSelector = fieldSelector return kubeClient.CoreV1().Nodes().Watch(context.TODO(), opts) }, } diff --git a/internal/store/persistentvolume.go b/internal/store/persistentvolume.go index bd534ea87b..18778e33a5 100644 --- a/internal/store/persistentvolume.go +++ b/internal/store/persistentvolume.go @@ -366,12 +366,14 @@ func wrapPersistentVolumeFunc(f func(*v1.PersistentVolume) *metric.Family) func( } } -func createPersistentVolumeListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { +func createPersistentVolumeListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { + opts.FieldSelector = fieldSelector return kubeClient.CoreV1().PersistentVolumes().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { + opts.FieldSelector = fieldSelector return kubeClient.CoreV1().PersistentVolumes().Watch(context.TODO(), opts) }, } diff --git a/internal/store/storageclass.go b/internal/store/storageclass.go index 15c76d7965..d5ed3bae1a 100644 --- a/internal/store/storageclass.go +++ b/internal/store/storageclass.go @@ -146,12 +146,14 @@ func wrapStorageClassFunc(f func(*storagev1.StorageClass) *metric.Family) func(i } } -func createStorageClassListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { +func createStorageClassListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { + opts.FieldSelector = fieldSelector return kubeClient.StorageV1().StorageClasses().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { + opts.FieldSelector = fieldSelector return kubeClient.StorageV1().StorageClasses().Watch(context.TODO(), opts) }, } diff --git a/internal/store/validatingwebhookconfiguration.go b/internal/store/validatingwebhookconfiguration.go index 5084e8dd3e..17996419ac 100644 --- a/internal/store/validatingwebhookconfiguration.go +++ b/internal/store/validatingwebhookconfiguration.go @@ -111,12 +111,14 @@ var ( } ) -func createValidatingWebhookConfigurationListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { +func createValidatingWebhookConfigurationListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { + opts.FieldSelector = fieldSelector return kubeClient.AdmissionregistrationV1().ValidatingWebhookConfigurations().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { + opts.FieldSelector = fieldSelector return kubeClient.AdmissionregistrationV1().ValidatingWebhookConfigurations().Watch(context.TODO(), opts) }, } From 631aa2780479dffc7bcd343f9814a25083c79338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20R=C3=BCger?= Date: Mon, 11 Sep 2023 15:23:33 +0200 Subject: [PATCH 4/8] Fix: Remove FieldSelector from non-namespaced resources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should resolve the issue with namespace-denylist as discovered in https://github.com/kubernetes/kube-state-metrics/issues/2187 Regression introduced in https://github.com/kubernetes/kube-state-metrics/commit/c3c552821af3432afdaedec607f43ba1efba1be0 Signed-off-by: Manuel Rüger --- internal/store/certificatesigningrequest.go | 4 +--- internal/store/clusterrole.go | 4 +--- internal/store/mutatingwebhookconfiguration.go | 4 +--- internal/store/namespace.go | 4 +--- internal/store/node.go | 4 +--- internal/store/persistentvolume.go | 4 +--- internal/store/validatingwebhookconfiguration.go | 4 +--- 7 files changed, 7 insertions(+), 21 deletions(-) diff --git a/internal/store/certificatesigningrequest.go b/internal/store/certificatesigningrequest.go index c70cf801bd..ea287e1490 100644 --- a/internal/store/certificatesigningrequest.go +++ b/internal/store/certificatesigningrequest.go @@ -153,14 +153,12 @@ func wrapCSRFunc(f func(*certv1.CertificateSigningRequest) *metric.Family) func( } } -func createCSRListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { +func createCSRListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - opts.FieldSelector = fieldSelector return kubeClient.CertificatesV1().CertificateSigningRequests().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - opts.FieldSelector = fieldSelector return kubeClient.CertificatesV1().CertificateSigningRequests().Watch(context.TODO(), opts) }, } diff --git a/internal/store/clusterrole.go b/internal/store/clusterrole.go index ee7a7384df..86642ab229 100644 --- a/internal/store/clusterrole.go +++ b/internal/store/clusterrole.go @@ -138,14 +138,12 @@ func clusterRoleMetricFamilies(allowAnnotationsList, allowLabelsList []string) [ } } -func createClusterRoleListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { +func createClusterRoleListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - opts.FieldSelector = fieldSelector return kubeClient.RbacV1().ClusterRoles().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - opts.FieldSelector = fieldSelector return kubeClient.RbacV1().ClusterRoles().Watch(context.TODO(), opts) }, } diff --git a/internal/store/mutatingwebhookconfiguration.go b/internal/store/mutatingwebhookconfiguration.go index 1a003f490a..c09df4773f 100644 --- a/internal/store/mutatingwebhookconfiguration.go +++ b/internal/store/mutatingwebhookconfiguration.go @@ -111,14 +111,12 @@ var ( } ) -func createMutatingWebhookConfigurationListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { +func createMutatingWebhookConfigurationListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - opts.FieldSelector = fieldSelector return kubeClient.AdmissionregistrationV1().MutatingWebhookConfigurations().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - opts.FieldSelector = fieldSelector return kubeClient.AdmissionregistrationV1().MutatingWebhookConfigurations().Watch(context.TODO(), opts) }, } diff --git a/internal/store/namespace.go b/internal/store/namespace.go index df3f1f0578..e46c73cf28 100644 --- a/internal/store/namespace.go +++ b/internal/store/namespace.go @@ -176,14 +176,12 @@ func wrapNamespaceFunc(f func(*v1.Namespace) *metric.Family) func(interface{}) * } } -func createNamespaceListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { +func createNamespaceListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - opts.FieldSelector = fieldSelector return kubeClient.CoreV1().Namespaces().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - opts.FieldSelector = fieldSelector return kubeClient.CoreV1().Namespaces().Watch(context.TODO(), opts) }, } diff --git a/internal/store/node.go b/internal/store/node.go index fb577a0bec..1d4d6bee4f 100644 --- a/internal/store/node.go +++ b/internal/store/node.go @@ -495,14 +495,12 @@ func wrapNodeFunc(f func(*v1.Node) *metric.Family) func(interface{}) *metric.Fam } } -func createNodeListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { +func createNodeListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - opts.FieldSelector = fieldSelector return kubeClient.CoreV1().Nodes().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - opts.FieldSelector = fieldSelector return kubeClient.CoreV1().Nodes().Watch(context.TODO(), opts) }, } diff --git a/internal/store/persistentvolume.go b/internal/store/persistentvolume.go index 18778e33a5..bd534ea87b 100644 --- a/internal/store/persistentvolume.go +++ b/internal/store/persistentvolume.go @@ -366,14 +366,12 @@ func wrapPersistentVolumeFunc(f func(*v1.PersistentVolume) *metric.Family) func( } } -func createPersistentVolumeListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { +func createPersistentVolumeListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - opts.FieldSelector = fieldSelector return kubeClient.CoreV1().PersistentVolumes().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - opts.FieldSelector = fieldSelector return kubeClient.CoreV1().PersistentVolumes().Watch(context.TODO(), opts) }, } diff --git a/internal/store/validatingwebhookconfiguration.go b/internal/store/validatingwebhookconfiguration.go index 17996419ac..5084e8dd3e 100644 --- a/internal/store/validatingwebhookconfiguration.go +++ b/internal/store/validatingwebhookconfiguration.go @@ -111,14 +111,12 @@ var ( } ) -func createValidatingWebhookConfigurationListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { +func createValidatingWebhookConfigurationListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - opts.FieldSelector = fieldSelector return kubeClient.AdmissionregistrationV1().ValidatingWebhookConfigurations().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - opts.FieldSelector = fieldSelector return kubeClient.AdmissionregistrationV1().ValidatingWebhookConfigurations().Watch(context.TODO(), opts) }, } From adf0f20a98db43cc18a9f722f5dc9689fa2ba82c Mon Sep 17 00:00:00 2001 From: Damien Grisonnet Date: Tue, 12 Sep 2023 09:40:21 +0200 Subject: [PATCH 5/8] store: fix missing cluster-scoped resources Signed-off-by: Damien Grisonnet --- internal/store/clusterrolebinding.go | 4 +--- internal/store/ingressclass.go | 4 +--- internal/store/storageclass.go | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/internal/store/clusterrolebinding.go b/internal/store/clusterrolebinding.go index c046008b23..494095221e 100644 --- a/internal/store/clusterrolebinding.go +++ b/internal/store/clusterrolebinding.go @@ -140,14 +140,12 @@ func clusterRoleBindingMetricFamilies(allowAnnotationsList, allowLabelsList []st } } -func createClusterRoleBindingListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { +func createClusterRoleBindingListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - opts.FieldSelector = fieldSelector return kubeClient.RbacV1().ClusterRoleBindings().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - opts.FieldSelector = fieldSelector return kubeClient.RbacV1().ClusterRoleBindings().Watch(context.TODO(), opts) }, } diff --git a/internal/store/ingressclass.go b/internal/store/ingressclass.go index ec7a0f7d71..0724c9110a 100644 --- a/internal/store/ingressclass.go +++ b/internal/store/ingressclass.go @@ -134,14 +134,12 @@ func wrapIngressClassFunc(f func(*networkingv1.IngressClass) *metric.Family) fun } } -func createIngressClassListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { +func createIngressClassListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - opts.FieldSelector = fieldSelector return kubeClient.NetworkingV1().IngressClasses().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - opts.FieldSelector = fieldSelector return kubeClient.NetworkingV1().IngressClasses().Watch(context.TODO(), opts) }, } diff --git a/internal/store/storageclass.go b/internal/store/storageclass.go index d5ed3bae1a..15c76d7965 100644 --- a/internal/store/storageclass.go +++ b/internal/store/storageclass.go @@ -146,14 +146,12 @@ func wrapStorageClassFunc(f func(*storagev1.StorageClass) *metric.Family) func(i } } -func createStorageClassListWatch(kubeClient clientset.Interface, _ string, fieldSelector string) cache.ListerWatcher { +func createStorageClassListWatch(kubeClient clientset.Interface, _ string, _ string) cache.ListerWatcher { return &cache.ListWatch{ ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - opts.FieldSelector = fieldSelector return kubeClient.StorageV1().StorageClasses().List(context.TODO(), opts) }, WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - opts.FieldSelector = fieldSelector return kubeClient.StorageV1().StorageClasses().Watch(context.TODO(), opts) }, } From 1bc4aa92d3233ef76ad0971a5099ea606667dceb Mon Sep 17 00:00:00 2001 From: Pranshu Srivastava Date: Sun, 8 Oct 2023 22:12:43 +0530 Subject: [PATCH 6/8] chore: Bump Go to 1.20.8 Bump Go to 1.20.8 from 1.20.7. Signed-off-by: Pranshu Srivastava --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 38c8f9e5a3..db597b86df 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ OS ?= $(shell uname -s | tr A-Z a-z) ALL_ARCH = amd64 arm arm64 ppc64le s390x PKG = github.com/prometheus/common PROMETHEUS_VERSION = 2.46.0 -GO_VERSION = 1.20.7 +GO_VERSION = 1.20.8 IMAGE = $(REGISTRY)/kube-state-metrics MULTI_ARCH_IMG = $(IMAGE)-$(ARCH) USER ?= $(shell id -u -n) From 6afd8ff206a822f7dd5df81180d3a1bee67bda6d Mon Sep 17 00:00:00 2001 From: Pranshu Srivastava Date: Sun, 8 Oct 2023 22:18:18 +0530 Subject: [PATCH 7/8] chore: cut v2.10.1 Signed-off-by: Pranshu Srivastava --- CHANGELOG.md | 8 ++++++++ README.md | 8 ++++---- VERSION | 2 +- examples/autosharding/cluster-role-binding.yaml | 2 +- examples/autosharding/cluster-role.yaml | 2 +- examples/autosharding/role-binding.yaml | 2 +- examples/autosharding/role.yaml | 2 +- examples/autosharding/service-account.yaml | 2 +- examples/autosharding/service.yaml | 2 +- examples/autosharding/statefulset.yaml | 6 +++--- examples/daemonsetsharding/cluster-role-binding.yaml | 2 +- examples/daemonsetsharding/cluster-role.yaml | 2 +- examples/daemonsetsharding/daemonset-service.yaml | 2 +- examples/daemonsetsharding/daemonset.yaml | 6 +++--- examples/daemonsetsharding/deployment-service.yaml | 2 +- examples/daemonsetsharding/deployment.yaml | 6 +++--- examples/daemonsetsharding/service-account.yaml | 2 +- examples/standard/cluster-role-binding.yaml | 2 +- examples/standard/cluster-role.yaml | 2 +- examples/standard/deployment.yaml | 6 +++--- examples/standard/service-account.yaml | 2 +- examples/standard/service.yaml | 2 +- 22 files changed, 40 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41cd142fb4..3487aad1d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## v2.10.1 / 2023-10-09 + +### Note +- This release addresses a regression introduced in https://github.com/kubernetes/kube-state-metrics/pull/2105. + +* [BUGFIX] Remove FieldSelector from non-namespaced resources by @mrueg and @dgrisonnet in https://github.com/kubernetes/kube-state-metrics/pull/2190 +* [ENHANCEMENT] Bump Go to v1.20.8 + ## v2.10.0 / 2023-08-31 ### Note diff --git a/README.md b/README.md index 54ddc6b9e9..08d0a05bff 100644 --- a/README.md +++ b/README.md @@ -77,8 +77,8 @@ Generally, it is recommended to use the latest release of kube-state-metrics. If | **v2.7.0** | v1.25 | | **v2.8.2** | v1.26 | | **v2.9.2** | v1.26 | -| **v2.10.0** | v1.27 | -| **main** | v1.27 | +| **v2.10.1** | v1.27 | +| **main** | v1.28 | #### Resource group version compatibility @@ -90,8 +90,8 @@ release. #### Container Image The latest container image can be found at: -* `registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.0` (arch: `amd64`, `arm`, `arm64`, `ppc64le` and `s390x`) -* View all multi-architecture images at [here](https://explore.ggcr.dev/?image=registry.k8s.io%2Fkube-state-metrics%2Fkube-state-metrics:v2.10.0) +* `registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.1` (arch: `amd64`, `arm`, `arm64`, `ppc64le` and `s390x`) +* View all multi-architecture images at [here](https://explore.ggcr.dev/?image=registry.k8s.io%2Fkube-state-metrics%2Fkube-state-metrics:v2.10.1) ### Metrics Documentation diff --git a/VERSION b/VERSION index 10c2c0c3d6..8bbb6e406a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.10.0 +2.10.1 diff --git a/examples/autosharding/cluster-role-binding.yaml b/examples/autosharding/cluster-role-binding.yaml index ac698e55b6..29645f249e 100644 --- a/examples/autosharding/cluster-role-binding.yaml +++ b/examples/autosharding/cluster-role-binding.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/examples/autosharding/cluster-role.yaml b/examples/autosharding/cluster-role.yaml index 3171418165..6951d6481c 100644 --- a/examples/autosharding/cluster-role.yaml +++ b/examples/autosharding/cluster-role.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics rules: - apiGroups: diff --git a/examples/autosharding/role-binding.yaml b/examples/autosharding/role-binding.yaml index 252f59598c..c5c0dd4188 100644 --- a/examples/autosharding/role-binding.yaml +++ b/examples/autosharding/role-binding.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics namespace: kube-system roleRef: diff --git a/examples/autosharding/role.yaml b/examples/autosharding/role.yaml index e4562c3732..dd15387b69 100644 --- a/examples/autosharding/role.yaml +++ b/examples/autosharding/role.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics namespace: kube-system rules: diff --git a/examples/autosharding/service-account.yaml b/examples/autosharding/service-account.yaml index fa83a8e6e0..206b746915 100644 --- a/examples/autosharding/service-account.yaml +++ b/examples/autosharding/service-account.yaml @@ -5,6 +5,6 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics namespace: kube-system diff --git a/examples/autosharding/service.yaml b/examples/autosharding/service.yaml index 19aca0a936..caada6028a 100644 --- a/examples/autosharding/service.yaml +++ b/examples/autosharding/service.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics namespace: kube-system spec: diff --git a/examples/autosharding/statefulset.yaml b/examples/autosharding/statefulset.yaml index 4cebb09b61..978c998202 100644 --- a/examples/autosharding/statefulset.yaml +++ b/examples/autosharding/statefulset.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics namespace: kube-system spec: @@ -18,7 +18,7 @@ spec: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 spec: automountServiceAccountToken: true containers: @@ -34,7 +34,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.0 + image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.1 livenessProbe: httpGet: path: /healthz diff --git a/examples/daemonsetsharding/cluster-role-binding.yaml b/examples/daemonsetsharding/cluster-role-binding.yaml index ac698e55b6..29645f249e 100644 --- a/examples/daemonsetsharding/cluster-role-binding.yaml +++ b/examples/daemonsetsharding/cluster-role-binding.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/examples/daemonsetsharding/cluster-role.yaml b/examples/daemonsetsharding/cluster-role.yaml index 3171418165..6951d6481c 100644 --- a/examples/daemonsetsharding/cluster-role.yaml +++ b/examples/daemonsetsharding/cluster-role.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics rules: - apiGroups: diff --git a/examples/daemonsetsharding/daemonset-service.yaml b/examples/daemonsetsharding/daemonset-service.yaml index 739889210a..630d4d2bac 100644 --- a/examples/daemonsetsharding/daemonset-service.yaml +++ b/examples/daemonsetsharding/daemonset-service.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics-shard - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics-shard namespace: kube-system spec: diff --git a/examples/daemonsetsharding/daemonset.yaml b/examples/daemonsetsharding/daemonset.yaml index 3ae83cf6c4..2d638ee080 100644 --- a/examples/daemonsetsharding/daemonset.yaml +++ b/examples/daemonsetsharding/daemonset.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics-shard - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics-shard namespace: kube-system spec: @@ -16,7 +16,7 @@ spec: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics-shard - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 spec: automountServiceAccountToken: true containers: @@ -29,7 +29,7 @@ spec: fieldRef: apiVersion: v1 fieldPath: spec.nodeName - image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.0 + image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.1 livenessProbe: httpGet: path: /healthz diff --git a/examples/daemonsetsharding/deployment-service.yaml b/examples/daemonsetsharding/deployment-service.yaml index 19aca0a936..caada6028a 100644 --- a/examples/daemonsetsharding/deployment-service.yaml +++ b/examples/daemonsetsharding/deployment-service.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics namespace: kube-system spec: diff --git a/examples/daemonsetsharding/deployment.yaml b/examples/daemonsetsharding/deployment.yaml index 57a43aaa91..c0457422b4 100644 --- a/examples/daemonsetsharding/deployment.yaml +++ b/examples/daemonsetsharding/deployment.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics namespace: kube-system spec: @@ -17,13 +17,13 @@ spec: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 spec: automountServiceAccountToken: true containers: - args: - --resources=certificatesigningrequests,configmaps,cronjobs,daemonsets,deployments,endpoints,horizontalpodautoscalers,ingresses,jobs,leases,limitranges,mutatingwebhookconfigurations,namespaces,networkpolicies,nodes,persistentvolumeclaims,persistentvolumes,poddisruptionbudgets,replicasets,replicationcontrollers,resourcequotas,secrets,services,statefulsets,storageclasses,validatingwebhookconfigurations,volumeattachments - image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.0 + image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.1 livenessProbe: httpGet: path: /healthz diff --git a/examples/daemonsetsharding/service-account.yaml b/examples/daemonsetsharding/service-account.yaml index fa83a8e6e0..206b746915 100644 --- a/examples/daemonsetsharding/service-account.yaml +++ b/examples/daemonsetsharding/service-account.yaml @@ -5,6 +5,6 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics namespace: kube-system diff --git a/examples/standard/cluster-role-binding.yaml b/examples/standard/cluster-role-binding.yaml index ac698e55b6..29645f249e 100644 --- a/examples/standard/cluster-role-binding.yaml +++ b/examples/standard/cluster-role-binding.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/examples/standard/cluster-role.yaml b/examples/standard/cluster-role.yaml index 3171418165..6951d6481c 100644 --- a/examples/standard/cluster-role.yaml +++ b/examples/standard/cluster-role.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics rules: - apiGroups: diff --git a/examples/standard/deployment.yaml b/examples/standard/deployment.yaml index 471275b152..9249a20f51 100644 --- a/examples/standard/deployment.yaml +++ b/examples/standard/deployment.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics namespace: kube-system spec: @@ -17,11 +17,11 @@ spec: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 spec: automountServiceAccountToken: true containers: - - image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.0 + - image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.1 livenessProbe: httpGet: path: /healthz diff --git a/examples/standard/service-account.yaml b/examples/standard/service-account.yaml index fa83a8e6e0..206b746915 100644 --- a/examples/standard/service-account.yaml +++ b/examples/standard/service-account.yaml @@ -5,6 +5,6 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics namespace: kube-system diff --git a/examples/standard/service.yaml b/examples/standard/service.yaml index 19aca0a936..caada6028a 100644 --- a/examples/standard/service.yaml +++ b/examples/standard/service.yaml @@ -4,7 +4,7 @@ metadata: labels: app.kubernetes.io/component: exporter app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.10.0 + app.kubernetes.io/version: 2.10.1 name: kube-state-metrics namespace: kube-system spec: From 73c6360b5734ad7ca308361285741599c715f4d5 Mon Sep 17 00:00:00 2001 From: Pranshu Srivastava Date: Mon, 16 Oct 2023 20:17:57 +0530 Subject: [PATCH 8/8] chore: Bump Go to v1.20.10 Additionally bump x/net to v0.17.0 on `main` as well. Signed-off-by: Pranshu Srivastava --- Makefile | 2 +- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index db597b86df..db7ee5a456 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ OS ?= $(shell uname -s | tr A-Z a-z) ALL_ARCH = amd64 arm arm64 ppc64le s390x PKG = github.com/prometheus/common PROMETHEUS_VERSION = 2.46.0 -GO_VERSION = 1.20.8 +GO_VERSION = 1.20.10 IMAGE = $(REGISTRY)/kube-state-metrics MULTI_ARCH_IMG = $(IMAGE)-$(ARCH) USER ?= $(shell id -u -n) diff --git a/go.mod b/go.mod index 3711921fb6..0247dcd150 100644 --- a/go.mod +++ b/go.mod @@ -68,13 +68,13 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.4.2 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/net v0.10.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.1.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.30.0 // indirect diff --git a/go.sum b/go.sum index d852989b43..e6244b9177 100644 --- a/go.sum +++ b/go.sum @@ -285,8 +285,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -352,8 +352,8 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -413,11 +413,11 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -426,8 +426,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=