Skip to content

Commit d13d44f

Browse files
Merge pull request #95 from rexagod/openshift-master
Merge with `upstream/release-2.9`
2 parents aa20a48 + 325b387 commit d13d44f

File tree

1,317 files changed

+74729
-30997
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,317 files changed

+74729
-30997
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 9 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.19"
23+
GO_VERSION: "^1.20"
2424
GOLANGCI_LINT_VERSION: "v1.51.2"
2525

2626
jobs:
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030
steps:
3131
- name: Set up Go 1.x
32-
uses: actions/setup-go@v3
32+
uses: actions/setup-go@v4
3333
with:
3434
go-version: ${{ env.GO_VERSION }}
3535
id: go
@@ -51,7 +51,7 @@ jobs:
5151
runs-on: ubuntu-latest
5252
steps:
5353
- name: Set up Go 1.x
54-
uses: actions/setup-go@v3
54+
uses: actions/setup-go@v4
5555
with:
5656
go-version: ${{ env.GO_VERSION }}
5757
id: go
@@ -72,7 +72,7 @@ jobs:
7272
runs-on: ubuntu-latest
7373
steps:
7474
- name: Set up Go 1.x
75-
uses: actions/setup-go@v3
75+
uses: actions/setup-go@v4
7676
with:
7777
go-version: ${{ env.GO_VERSION }}
7878
id: go
@@ -93,7 +93,7 @@ jobs:
9393
runs-on: ubuntu-latest
9494
steps:
9595
- name: Set up Go 1.x
96-
uses: actions/setup-go@v3
96+
uses: actions/setup-go@v4
9797
with:
9898
go-version: ${{ env.GO_VERSION }}
9999
id: go
@@ -114,7 +114,7 @@ jobs:
114114
runs-on: ubuntu-latest
115115
steps:
116116
- name: Set up Go 1.x
117-
uses: actions/setup-go@v3
117+
uses: actions/setup-go@v4
118118
with:
119119
go-version: ${{ env.GO_VERSION }}
120120
id: go
@@ -150,7 +150,7 @@ jobs:
150150
runs-on: ubuntu-latest
151151
steps:
152152
- name: Set up Go 1.x
153-
uses: actions/setup-go@v3
153+
uses: actions/setup-go@v4
154154
with:
155155
go-version: ${{ env.GO_VERSION }}
156156
id: go
@@ -171,7 +171,7 @@ jobs:
171171
runs-on: ubuntu-latest
172172
steps:
173173
- name: Set up Go 1.x
174-
uses: actions/setup-go@v3
174+
uses: actions/setup-go@v4
175175
with:
176176
go-version: ${{ env.GO_VERSION }}
177177
id: go
@@ -192,7 +192,7 @@ jobs:
192192
runs-on: ubuntu-latest
193193
steps:
194194
- name: Set up Go 1.x
195-
uses: actions/setup-go@v3
195+
uses: actions/setup-go@v4
196196
with:
197197
go-version: ${{ env.GO_VERSION }}
198198
id: go

.github/workflows/govulncheck.yml

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

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

1111
jobs:
1212
ci-security-checks:
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v3
1616
name: Checkout code
1717
- name: Set up Go 1.x
18-
uses: actions/setup-go@v3
18+
uses: actions/setup-go@v4
1919
with:
2020
go-version: ${{ env.GO_VERSION }}
2121
- name: Install govulncheck binary

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
## v2.9.2 / 2023-05-30
2+
3+
This release does not incorporate any user-facing changes. Re-running release procedures as the process for the previous release failed. Changes are listed in v2.9.0.
4+
5+
## v2.9.1 / 2023-05-29
6+
7+
This release does not incorporate any user-facing changes. Re-running release procedures as the process for the previous release failed. Changes are listed in v2.9.0.
8+
9+
## v2.9.0 / 2023-05-23
10+
11+
The changes mentioned below are only the user-facing ones. For a list of the complete set of changes, refer the changelog associated with the release tag.
12+
13+
### Note
14+
15+
- 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.
16+
- #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.
17+
18+
* [BUGFIX] Adhere to OTel-Prometheus standard for labels #2004 @rexagod
19+
* [BUGFIX] Respect relative paths for label resolutions #2007 @rexagod
20+
* [BUGFIX] Support LabelsFromPath functionality for Info-typed metrics #2048 @murphd40
21+
* [CHANGE] Remove VerticalPodAutoscaler #2017 @mrueg
22+
* [ENHANCEMENT] Add StatefulSet Start Ordinal metrics for KEP-3335 #1959 @pwschuurman
23+
* [ENHANCEMENT] Add namespace label to `kube_lease_renew_time` #2073 @A-Hilaly
24+
* [ENHANCEMENT] Add parameters for PodSecurity #2042 @jcpunk
25+
* [ENHANCEMENT] Add support for multi cluster prometheus alerts #2058 @jkroepke
26+
* [ENHANCEMENT] Don't crash on non-existent path values #1998 @rexagod
27+
* [ENHANCEMENT] Only use OpenMetrics and Text in contentType #2024 @CatherineF-dev
28+
* [ENHANCEMENT] Update go version to 1.20.4 #2056 @RamakrishnanArun
29+
* [FEATURE] Add support for variable VKs in CRS config #1851 @rexagod
30+
* [FEATURE] Support quantities and percentages #1989 @mrueg
31+
* [FEATURE] Use prometheus/exporter-toolkit landing page #2034 @mrueg
32+
133
## v2.8.2 / 2023-03-17
234

335
* [BUGFIX] Only use OpenMetrics and Text in contentType #2024 @CatherineF-dev

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GOVERSION=1.19
1+
ARG GOVERSION=1.20
22
ARG GOARCH
33
FROM golang:${GOVERSION} as builder
44
ARG GOARCH

MAINTAINER.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Maintaining kube-state-metrics
2+
3+
kube-state-metrics is welcoming contributions from the community. If you are interested in intensifying your contributions and becoming a maintainer, this doc describes the necessary steps.
4+
5+
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.
6+
7+
## Adding a new reviewer
8+
* Ensure the new reviewer is a member of the [kubernetes organization](https://github.com/kubernetes/org/blob/main/config/kubernetes/org.yaml).
9+
* Add the new reviewer to the [OWNERS](OWNERS) file to be able to review pull requests.
10+
* 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).
11+
12+
13+
## Adding a new approver
14+
* Ensure the new approver is already a reviewer in the [OWNERS](OWNERS) file.
15+
* Add the new approver to the [OWNERS](OWNERS) file to be able to approve pull requests.
16+
* Add the new approver to the [SECURITY_CONTACTS](SECURITY_CONTACTS) file to be able to get notified on security related incidents.
17+
* Add the new approver to the [kube-state-metrics-admin group](https://github.com/kubernetes/org/blob/main/config/kubernetes/sig-instrumentation/teams.yaml), to get admin access to the kube-state-metrics repository.
18+
* Add the new approver to the k8s.io [OWNERS](https://github.com/kubernetes/k8s.io/blob/main/k8s.gcr.io/images/k8s-staging-kube-state-metrics/OWNERS) file to be able to approve image promotion from the staging registry.

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ GIT_COMMIT ?= $(shell git rev-parse --short HEAD)
1515
OS ?= $(shell uname -s | tr A-Z a-z)
1616
ALL_ARCH = amd64 arm arm64 ppc64le s390x
1717
PKG = github.com/prometheus/common
18-
PROMETHEUS_VERSION = 2.40.6
19-
GO_VERSION = 1.19.7
18+
PROMETHEUS_VERSION = 2.44.0
19+
GO_VERSION = 1.20.4
2020
IMAGE = $(REGISTRY)/kube-state-metrics
2121
MULTI_ARCH_IMG = $(IMAGE)-$(ARCH)
2222
USER ?= $(shell id -u -n)
@@ -134,7 +134,7 @@ examples/prometheus-alerting-rules/alerts.yaml: jsonnet $(shell find jsonnet | g
134134
mkdir -p examples/prometheus-alerting-rules
135135
jsonnet -J scripts/vendor scripts/mixin.jsonnet | gojsontoyaml > examples/prometheus-alerting-rules/alerts.yaml
136136

137-
examples: examples/standard examples/autosharding mixin
137+
examples: examples/standard examples/autosharding examples/daemonsetsharding mixin
138138

139139
examples/standard: jsonnet $(shell find jsonnet | grep ".libsonnet") scripts/standard.jsonnet scripts/vendor VERSION
140140
mkdir -p examples/standard
@@ -146,6 +146,11 @@ examples/autosharding: jsonnet $(shell find jsonnet | grep ".libsonnet") scripts
146146
jsonnet -J scripts/vendor -m examples/autosharding --ext-str version="$(VERSION)" scripts/autosharding.jsonnet | xargs -I{} sh -c 'cat {} | gojsontoyaml > `echo {} | sed "s/\(.\)\([A-Z]\)/\1-\2/g" | tr "[:upper:]" "[:lower:]"`.yaml' -- {}
147147
find examples -type f ! -name '*.yaml' -delete
148148

149+
examples/daemonsetsharding: jsonnet $(shell find jsonnet | grep ".libsonnet") scripts/daemonsetsharding.jsonnet scripts/vendor VERSION
150+
mkdir -p examples/daemonsetsharding
151+
jsonnet -J scripts/vendor -m examples/daemonsetsharding --ext-str version="$(VERSION)" scripts/daemonsetsharding.jsonnet | xargs -I{} sh -c 'cat {} | gojsontoyaml > `echo {} | sed "s/\(.\)\([A-Z]\)/\1-\2/g" | tr "[:upper:]" "[:lower:]"`.yaml' -- {}
152+
find examples -type f ! -name '*.yaml' -delete
153+
149154
scripts/vendor: scripts/jsonnetfile.json scripts/jsonnetfile.lock.json
150155
cd scripts && jb install
151156

README.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ are deleted they are no longer visible on the `/metrics` endpoint.
3737
- [Container Image](#container-image)
3838
- [Metrics Documentation](#metrics-documentation)
3939
- [Conflict resolution in label names](#conflict-resolution-in-label-names)
40-
- [Enabling VerticalPodAutoscalers](#enabling-verticalpodautoscalers)
4140
- [Kube-state-metrics self metrics](#kube-state-metrics-self-metrics)
4241
- [Resource recommendation](#resource-recommendation)
4342
- [Latency](#latency)
@@ -74,11 +73,11 @@ Generally, it is recommended to use the latest release of kube-state-metrics. If
7473

7574
| kube-state-metrics | Kubernetes client-go Version |
7675
|--------------------|:----------------------------:|
77-
| **v2.4.2** | v1.23 |
7876
| **v2.5.0** | v1.24 |
7977
| **v2.6.0** | v1.24 |
8078
| **v2.7.0** | v1.25 |
81-
| **v2.8.1** | v1.26 |
79+
| **v2.8.2** | v1.26 |
80+
| **v2.9.2** | v1.26 |
8281
| **main** | v1.26 |
8382

8483

@@ -91,7 +90,8 @@ release.
9190
#### Container Image
9291

9392
The latest container image can be found at:
94-
* `registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.8.1` (arch: `amd64`, `arm`, `arm64`, `ppc64le` and `s390x`)
93+
* `registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.9.2` (arch: `amd64`, `arm`, `arm64`, `ppc64le` and `s390x`)
94+
* View all multi-architecture images at [here](https://explore.ggcr.dev/?image=registry.k8s.io%2Fkube-state-metrics%2Fkube-state-metrics:v2.9.1)
9595

9696
### Metrics Documentation
9797

@@ -123,13 +123,6 @@ e.g. by standardizing Kubernetes labels using an
123123
[Admission Webhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/)
124124
that ensures that there are no possible conflicts.
125125

126-
#### Enabling VerticalPodAutoscalers
127-
128-
Please note that the collector for `verticalpodautoscalers` is **disabled** by default; Vertical Pod Autoscaler metrics will not be collected until the collector is enabled. This is because Vertical Pod Autoscalers are managed as custom resources.
129-
130-
If you want to enable this collector,
131-
the [instructions](./docs/verticalpodautoscaler-metrics.md#Configuration) are located in the [Vertical Pod Autoscaler Metrics](./docs/verticalpodautoscaler-metrics.md) documentation.
132-
133126
### Kube-state-metrics self metrics
134127

135128
kube-state-metrics exposes its own general process metrics under `--telemetry-host` and `--telemetry-port` (default 8081).
@@ -305,7 +298,7 @@ service account token that has read-only access to the Kubernetes cluster.
305298

306299
The ([`kube-prometheus`](https://github.com/prometheus-operator/kube-prometheus/)) stack installs kube-state-metrics as one of its [components](https://github.com/prometheus-operator/kube-prometheus#kube-prometheus); you do not need to install kube-state-metrics if you're using the kube-prometheus stack.
307300

308-
If you want to revise the default configuration for kube-prometheus, for example to enable non-default metrics, have a look at [Customizing Kube-Prometheus](https://github.com/prometheus-operator/kube-prometheus#customizing-kube-prometheus).
301+
If you want to revise the default configuration for kube-prometheus, for example to enable non-default metrics, have a look at [Customizing Kube-Prometheus](https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/customizing.md).
309302

310303
#### Kubernetes Deployment
311304

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.8.2
1+
2.9.2

cloudbuild.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# See https://cloud.google.com/cloud-build/docs/build-config
2-
timeout: 1800s
2+
timeout: 2400s
33
options:
44
substitution_option: ALLOW_LOOSE
55
steps:
6-
- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20220609-2e4c91eb7e'
6+
- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20230522-312425ae46'
77
entrypoint: make
88
env:
99
- TAG=$_PULL_BASE_REF

docs/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ See each file for specific documentation about the exposed metrics:
7070
- [Role Metrics](role-metrics.md)
7171
- [RoleBinding Metrics](rolebinding-metrics.md)
7272
- [ServiceAccount Metrics](serviceaccount-metrics.md)
73-
- [VerticalPodAutoscaler Metrics](verticalpodautoscaler-metrics.md)
7473

7574
## Join Metrics
7675

0 commit comments

Comments
 (0)