Skip to content

Commit 98ade63

Browse files
authored
Merge branch 'main' into release-2.10
2 parents d68bad2 + ac7f9fb commit 98ade63

23 files changed

+289
-266
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ If the matter is security related, please disclose it privately see https://gith
2121
**Anything else we need to know?**:
2222

2323
**Environment**:
24-
- kube-state-metrics version:
25-
- Kubernetes version (use `kubectl version`):
26-
- Cloud provider or hardware configuration:
27-
- Other info:
24+
25+
* kube-state-metrics version:
26+
* Kubernetes version (use `kubectl version`):
27+
* Cloud provider or hardware configuration:
28+
* Other info:

.github/workflows/ci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ env:
2020
E2E_SETUP_KIND: yes
2121
E2E_SETUP_KUBECTL: yes
2222
SUDO: sudo
23-
GO_VERSION: "^1.20"
23+
GO_VERSION: "^1.21"
2424
GOLANGCI_LINT_VERSION: "v1.54.2"
2525

2626
jobs:
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030
steps:
3131
- name: Check out code into the Go module directory
32-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
3333

3434
- name: Set up Go 1.x
3535
uses: actions/setup-go@v4
@@ -51,7 +51,7 @@ jobs:
5151
runs-on: ubuntu-latest
5252
steps:
5353
- name: Check out code into the Go module directory
54-
uses: actions/checkout@v3
54+
uses: actions/checkout@v4
5555

5656
- name: Set up Go 1.x
5757
uses: actions/setup-go@v4
@@ -72,7 +72,7 @@ jobs:
7272
runs-on: ubuntu-latest
7373
steps:
7474
- name: Check out code into the Go module directory
75-
uses: actions/checkout@v3
75+
uses: actions/checkout@v4
7676

7777
- name: Set up Go 1.x
7878
uses: actions/setup-go@v4
@@ -93,7 +93,7 @@ jobs:
9393
runs-on: ubuntu-latest
9494
steps:
9595
- name: Check out code into the Go module directory
96-
uses: actions/checkout@v3
96+
uses: actions/checkout@v4
9797

9898
- name: Set up Go 1.x
9999
uses: actions/setup-go@v4
@@ -114,7 +114,7 @@ jobs:
114114
runs-on: ubuntu-latest
115115
steps:
116116
- name: Check out code into the Go module directory
117-
uses: actions/checkout@v3
117+
uses: actions/checkout@v4
118118

119119
- name: Set up Go 1.x
120120
uses: actions/setup-go@v4
@@ -135,7 +135,7 @@ jobs:
135135
runs-on: ubuntu-latest
136136
steps:
137137
- name: Check out code into the Go module directory
138-
uses: actions/checkout@v3
138+
uses: actions/checkout@v4
139139

140140
- name: Setup promtool
141141
run: |
@@ -150,7 +150,7 @@ jobs:
150150
runs-on: ubuntu-latest
151151
steps:
152152
- name: Check out code into the Go module directory
153-
uses: actions/checkout@v3
153+
uses: actions/checkout@v4
154154

155155
- name: Set up Go 1.x
156156
uses: actions/setup-go@v4
@@ -171,7 +171,7 @@ jobs:
171171
runs-on: ubuntu-latest
172172
steps:
173173
- name: Check out code into the Go module directory
174-
uses: actions/checkout@v3
174+
uses: actions/checkout@v4
175175

176176
- name: Set up Go 1.x
177177
uses: actions/setup-go@v4
@@ -192,7 +192,7 @@ jobs:
192192
runs-on: ubuntu-latest
193193
steps:
194194
- name: Check out code into the Go module directory
195-
uses: actions/checkout@v3
195+
uses: actions/checkout@v4
196196

197197
- name: Set up Go 1.x
198198
uses: actions/setup-go@v4

.github/workflows/govulncheck.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ on:
66
- cron: '0 0 * * 1'
77

88
env:
9-
GO_VERSION: "^1.20"
9+
GO_VERSION: "^1.21"
1010

1111
jobs:
1212
ci-security-checks:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616
name: Checkout code
1717
- name: Set up Go 1.x
1818
uses: actions/setup-go@v4

.markdownlint-cli2.jsonc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"globs": [
3+
"**/*.md"
4+
],
5+
// ToDo: Following rules can't be fixed automatically. They should be enabled when fixed.
6+
"config": {
7+
"MD004": {
8+
"style": "asterisk"
9+
},
10+
"MD013": false, // https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md013---line-length
11+
"MD024": false, // https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md024---multiple-headers-with-the-same-content
12+
"MD033": false, // https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md033---inline-html
13+
"MD036": false, // https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md036---emphasis-used-instead-of-a-header
14+
"MD040": false, // https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md040---fenced-code-blocks-should-have-a-language-specified
15+
"MD041": false // https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md041---first-line-in-file-should-be-a-top-level-header
16+
}
17+
}

CHANGELOG.md

Lines changed: 62 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,25 @@
99
## v2.10.0 / 2023-08-31
1010

1111
### Note
12-
- 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.
13-
14-
* [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
15-
* [BUGFIX] Don't crash on non-existent valueFrom path values by @chihshenghuang in https://github.com/kubernetes/kube-state-metrics/pull/2140
16-
* [BUGFIX] Index out of range in metrics_store.SanitizeHeaders by @mrueg in https://github.com/kubernetes/kube-state-metrics/pull/2166
17-
* [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
18-
* [BUGFIX] Add filtering for Lease metrics by @ntoofu in https://github.com/kubernetes/kube-state-metrics/pull/2122
19-
* [FEATURE] Implement kube_pod_status_initialized_time by @opeco17 in https://github.com/kubernetes/kube-state-metrics/pull/2148
20-
* [FEATURE] Disable labels and annotations metrics when metric-annotations-… by @opeco17 in https://github.com/kubernetes/kube-state-metrics/pull/2145
21-
* [FEATURE] Add webhooks client config service metrics by @dgrisonnet in https://github.com/kubernetes/kube-state-metrics/pull/2114
22-
* [FEATURE] Support kube_persistentvolumeclaim_deletion_timestamp by @maxime1907 in https://github.com/kubernetes/kube-state-metrics/pull/2074
23-
* [FEATURE] Support kube_persistentvolume_deletion_timestamp by @maxime1907 in https://github.com/kubernetes/kube-state-metrics/pull/2075
24-
* [FEATURE] Adds new metric `kube_pod_service_account` by @swarup-stripe in https://github.com/kubernetes/kube-state-metrics/pull/2096
25-
* [FEATURE] Add volumemode to PVC info metric by @machadovilaca in https://github.com/kubernetes/kube-state-metrics/pull/2134
26-
* [FEATURE] Enable metric-annotations-allowlist and metric-labels-allowlist for ResourceQuota by @opeco17 in https://github.com/kubernetes/kube-state-metrics/pull/2175
27-
* [FEATURE] Allow field KV general matching by @rexagod in https://github.com/kubernetes/kube-state-metrics/pull/2067
28-
* [FEATURE] Support hot reload for kubeconfig by @opeco17 in https://github.com/kubernetes/kube-state-metrics/pull/2144
29-
* [FEATURE] Add support for endpoint topology routing hints by @MarkSRobinson in https://github.com/kubernetes/kube-state-metrics/pull/2090
12+
13+
* 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.
14+
15+
* [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>
16+
* [BUGFIX] Don't crash on non-existent valueFrom path values by @chihshenghuang in <https://github.com/kubernetes/kube-state-metrics/pull/2140>
17+
* [BUGFIX] Index out of range in metrics_store.SanitizeHeaders by @mrueg in <https://github.com/kubernetes/kube-state-metrics/pull/2166>
18+
* [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>
19+
* [BUGFIX] Add filtering for Lease metrics by @ntoofu in <https://github.com/kubernetes/kube-state-metrics/pull/2122>
20+
* [FEATURE] Implement kube_pod_status_initialized_time by @opeco17 in <https://github.com/kubernetes/kube-state-metrics/pull/2148>
21+
* [FEATURE] Disable labels and annotations metrics when metric-annotations-… by @opeco17 in <https://github.com/kubernetes/kube-state-metrics/pull/2145>
22+
* [FEATURE] Add webhooks client config service metrics by @dgrisonnet in <https://github.com/kubernetes/kube-state-metrics/pull/2114>
23+
* [FEATURE] Support kube_persistentvolumeclaim_deletion_timestamp by @maxime1907 in <https://github.com/kubernetes/kube-state-metrics/pull/2074>
24+
* [FEATURE] Support kube_persistentvolume_deletion_timestamp by @maxime1907 in <https://github.com/kubernetes/kube-state-metrics/pull/2075>
25+
* [FEATURE] Adds new metric `kube_pod_service_account` by @swarup-stripe in <https://github.com/kubernetes/kube-state-metrics/pull/2096>
26+
* [FEATURE] Add volumemode to PVC info metric by @machadovilaca in <https://github.com/kubernetes/kube-state-metrics/pull/2134>
27+
* [FEATURE] Enable metric-annotations-allowlist and metric-labels-allowlist for ResourceQuota by @opeco17 in <https://github.com/kubernetes/kube-state-metrics/pull/2175>
28+
* [FEATURE] Allow field KV general matching by @rexagod in <https://github.com/kubernetes/kube-state-metrics/pull/2067>
29+
* [FEATURE] Support hot reload for kubeconfig by @opeco17 in <https://github.com/kubernetes/kube-state-metrics/pull/2144>
30+
* [FEATURE] Add support for endpoint topology routing hints by @MarkSRobinson in <https://github.com/kubernetes/kube-state-metrics/pull/2090>
3031

3132
## v2.9.2 / 2023-05-30
3233

@@ -42,8 +43,8 @@ The changes mentioned below are only the user-facing ones. For a list of the com
4243

4344
### Note
4445

45-
- 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.
46-
- #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.
46+
* 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.
47+
* #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.
4748

4849
* [BUGFIX] Adhere to OTel-Prometheus standard for labels #2004 @rexagod
4950
* [BUGFIX] Respect relative paths for label resolutions #2007 @rexagod
@@ -126,6 +127,7 @@ See: #1847
126127
* [BUGFIX] Allow lease metrics to be exported across all namespaces #1845 @lantingchiang
127128

128129
## v2.6.0 / 2022-08-26
130+
129131
* [FEATURE] Add local storage labels to kube_persistentvolume_info #1814 @nabokihms
130132
* [FEATURE] Add support for StateSet and Info metrics for Custom-Resource State #1777 @chrischdi
131133
* [FEATURE] Add support for Rolebinding resource metrics #1799 @kaitoii11
@@ -159,9 +161,11 @@ See: #1847
159161
* [BUGFIX] Properly initialize KSM Server test #1699 @fpetkovski
160162

161163
## v2.4.2 / 2022-02-10
162-
* [BUGFIX] Publish images with with the correct tag
164+
165+
* [BUGFIX] Publish images with with the correct tag
163166

164167
## v2.4.1 / 2022-02-10
168+
165169
* [FEATURE] Add `ingressclass` label to `kube_ingress_info` metric #1652 @adammw
166170
* [FEATURE] Extend KSM library to support custom resource metrics #1644 @Garrybest
167171
* [ENHANCEMENT] Use apiVersion `v1` for `PodDisruptionBudget` and `CronJob` resources #1491 @bison
@@ -186,9 +190,10 @@ See: #1847
186190

187191
## v2.2.3 / 2021-10-13
188192

189-
* [BUGFIX] Fix the image build job. Reverts #1602
193+
* [BUGFIX] Fix the image build job. Reverts #1602
190194

191195
## v2.2.2 / 2021-10-13
196+
192197
* [BUGFIX] Downgrade latest allowed go version to 1.16.9 #1601 @mrueg
193198
* [BUGFIX] Fix CI variable names used for building KSM images @mrueg
194199

@@ -262,6 +267,7 @@ Location on quay.io will not be updated anymore. Previously pushed images will b
262267
* [BUGFIX] Propagate resource version when sharded #1402
263268

264269
## v2.0.0-beta / 2020-12-04
270+
265271
Promotion to beta release after a period of no bugs.
266272

267273
## v2.0.0-alpha.3 / 2020-11-19
@@ -284,69 +290,68 @@ kube_pod_container_resource_requests and kube_pod_container_resource_limits
284290

285291
* [CHANGE] Update go module path to k8s.io/kube-state-metrics/v2 #1238
286292
* [CHANGE] Bump klog to v2 and client-go to 1.19 #1250
287-
* [FEATURE] Add iscsi initiator name to persistentvolume_info #1235
288-
* [BUGFIX] Added Namespace to Rolebinding Jsonnet #1233
289-
* [BUGFIX] Reference closure scoped family generator #1240
293+
* [FEATURE] Add iscsi initiator name to persistentvolume_info #1235
294+
* [BUGFIX] Added Namespace to Rolebinding Jsonnet #1233
295+
* [BUGFIX] Reference closure scoped family generator #1240
290296

291297
## v2.0.0-alpha / 2020-09-16
292298

293299
NOTE: This is a major new alpha 2.0 release with breaking changes and removed metrics. See details below!
294300

295-
* [CHANGE] Apply boundaries to metrics and allow via flag (--labels-allow-list) what labels to include #1125
301+
* [CHANGE] Apply boundaries to metrics and allow via flag (--labels-allow-list) what labels to include #1125
296302
* [CHANGE] Update DaemonSet updated_number_scheduled metric name to be consistent #1181
297-
Metric was changed from kube_daemonset_updated_number_scheduled to kube_daemonset_status_updated_number_scheduled
303+
Metric was changed from kube_daemonset_updated_number_scheduled to kube_daemonset_status_updated_number_scheduled
298304
* [CHANGE] Rework resource metrics #1168
299305
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
300-
* [CHANGE] Convert k8s labels to snake case #1165
301-
* [CHANGE] Mutatingwebhookconfiguration.go: Switch to v1 #1144
306+
* [CHANGE] Convert k8s labels to snake case #1165
307+
* [CHANGE] Mutatingwebhookconfiguration.go: Switch to v1 #1144
302308
* [CHANGE] v2: Rename storage class labels reclaimPolicy to reclaim_policy and volumeBindingMode to volume_binding_mode #1107
303309
* [CHANGE] v2: Renamed --namespace flag to --namespaces #1098
304310
* [CHANGE] Rename kube_pod_deleted to kube_pod_deletion_timestamp #1079
305311
* [CHANGE] v2: Rename collector flag to resource flag #1006
306312
--resources is the new flag
307-
* [CHANGE] Remove non-identifying labels from pod metrics #1009
313+
* [CHANGE] Remove non-identifying labels from pod metrics #1009
308314
* [CHANGE] v2: Remove deprecated stable metrics #1004
309315
Note that some of these were replaced with EXPERIMENTAL resource metrics. See #1168 for more details.
310316
`kube_pod_container_resource_requests` and `kube_pod_container_resource_limits` are the replacements with `resource` labels
311317
representing the resource name and `unit` labels representing the resource unit.
312-
- kube_pod_container_resource_requests_cpu_cores
313-
- kube_pod_container_resource_limits_cpu_cores
314-
- kube_pod_container_resource_requests_memory_bytes
315-
- kube_pod_container_resource_limits_memory_bytes
316-
- `kube_node_status_capacity` and `kube_node_status_allocatable` are the replacements with `resource` labels
318+
* kube_pod_container_resource_requests_cpu_cores
319+
* kube_pod_container_resource_limits_cpu_cores
320+
* kube_pod_container_resource_requests_memory_bytes
321+
* kube_pod_container_resource_limits_memory_bytes
322+
* `kube_node_status_capacity` and `kube_node_status_allocatable` are the replacements with `resource` labels
317323
representing the resource name and `unit` labels representing the resource unit.
318-
- kube_node_status_capacity_pods
319-
- kube_node_status_capacity_cpu_cores
320-
- kube_node_status_capacity_memory_bytes
321-
- kube_node_status_allocatable_pods
322-
- kube_node_status_allocatable_cpu_cores
323-
- kube_node_status_allocatable_memory_bytes
324+
* kube_node_status_capacity_pods
325+
* kube_node_status_capacity_cpu_cores
326+
* kube_node_status_capacity_memory_bytes
327+
* kube_node_status_allocatable_pods
328+
* kube_node_status_allocatable_cpu_cores
329+
* kube_node_status_allocatable_memory_bytes
324330
* [CHANGE] Rename black-/whitelist to allow/deny-list #1045
325331
New flags are --metric-allowlist and --metric-denylist
326-
* [CHANGE] Update telemetry port to 8081 #1049
327-
* [CHANGE] v2: Rename hpa metrics to use full horizontalpodautoscaler #1003
332+
* [CHANGE] Update telemetry port to 8081 #1049
333+
* [CHANGE] v2: Rename hpa metrics to use full horizontalpodautoscaler #1003
328334
All metrics with prefix of kube_hpa_ were renamed to kube_horizontalpodautoscaler_
329-
* [CHANGE] v2: change metrics port to 8080, telemetry port to 8081 #1005
335+
* [CHANGE] v2: change metrics port to 8080, telemetry port to 8081 #1005
330336
* [FEATURE] Add http request metric for kube-state-metrics main /metrics #1218
331-
* [FEATURE] Add fc/iscsi/nfs identifier tags to persistentvolume_info metric #1208
332-
* [FEATURE] Adds new pod metric kube_pod_container_state_started #1183
337+
* [FEATURE] Add fc/iscsi/nfs identifier tags to persistentvolume_info metric #1208
338+
* [FEATURE] Adds new pod metric kube_pod_container_state_started #1183
333339
* [FEATURE] Add observedGeneration metric (kube_daemonset_status_observed_generation) for DaemonSets #1178
334-
* [FEATURE] Add internal_ip to node_info #1172
335-
* [FEATURE] Avoid conflicts when mapping Kubernetes labels to Prometheus labels #1156
340+
* [FEATURE] Add internal_ip to node_info #1172
341+
* [FEATURE] Avoid conflicts when mapping Kubernetes labels to Prometheus labels #1156
336342
* [FEATURE] Add aws/gce volume id to kube_persistentvolume_info #1146
337343
* [FEATURE] Add UnexpectedAdmissionError to kube_pod_status_reason metric #1145
338344
* [FEATURE] Add init container requests (kube_pod_init_container_resource_requests) #1123
339-
* [FEATURE] Add host_network to kube_pod_info #1100
340-
* [FEATURE] Add kube_replicationcontroller_owner #1058
341-
* [FEATURE] Pod: add gauges for pod overhead (kube_pod_overhead) #1053
342-
* [FEATURE] Add "Terminating" status in kube_pod_status_phase metrics #1013
343-
* [FEATURE] Add lease collector metrics #1038
345+
* [FEATURE] Add host_network to kube_pod_info #1100
346+
* [FEATURE] Add kube_replicationcontroller_owner #1058
347+
* [FEATURE] Pod: add gauges for pod overhead (kube_pod_overhead) #1053
348+
* [FEATURE] Add "Terminating" status in kube_pod_status_phase metrics #1013
349+
* [FEATURE] Add lease collector metrics #1038
344350
* [ENHANCEMENT] Add DeprecatedVersion to struct FamilyGenerator and func NewFamilyGenerator #1160
345-
* [ENHANCEMENT] Add security context to deployment and statefulset #1034
351+
* [ENHANCEMENT] Add security context to deployment and statefulset #1034
346352
* [BUGFIX] Fix VolumeAttachment API version mismatch: expected v1 but watching v1beta1 #1136
347-
* [BUGFIX] Fix various CI issues (kube_volumeattachment_info nodeName -> node label rename) #1117
348-
* [BUGFIX] Fix maxUnavailable to round down instead up #1076
349-
353+
* [BUGFIX] Fix various CI issues (kube_volumeattachment_info nodeName -> node label rename) #1117
354+
* [BUGFIX] Fix maxUnavailable to round down instead up #1076
350355

351356
## v1.9.7 / 2020-05-24
352357

0 commit comments

Comments
 (0)