Skip to content

Commit 462e63f

Browse files
Merge pull request #115 from rhobs/automated-updates-master
OCPBUGS-33620: [bot] Bump openshift/kube-state-metrics to v2.13.0
2 parents 8b24e32 + 414a9fa commit 462e63f

File tree

861 files changed

+96076
-26208
lines changed

Some content is hidden

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

861 files changed

+96076
-26208
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/ci.yml

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

2626
jobs:
2727
ci-go-lint:
2828
name: ci-go-lint
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3333

3434
- name: Set up Go 1.x
35-
uses: actions/setup-go@v5
35+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
3636
with:
3737
go-version: ${{ env.GO_VERSION }}
3838
id: go
@@ -51,10 +51,10 @@ 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5555

5656
- name: Set up Go 1.x
57-
uses: actions/setup-go@v5
57+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
5858
with:
5959
go-version: ${{ env.GO_VERSION }}
6060
id: go
@@ -72,10 +72,10 @@ 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
7676

7777
- name: Set up Go 1.x
78-
uses: actions/setup-go@v5
78+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
7979
with:
8080
go-version: ${{ env.GO_VERSION }}
8181
id: go
@@ -93,10 +93,10 @@ 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
9797

9898
- name: Set up Go 1.x
99-
uses: actions/setup-go@v5
99+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
100100
with:
101101
go-version: ${{ env.GO_VERSION }}
102102
id: go
@@ -114,10 +114,10 @@ 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
118118

119119
- name: Set up Go 1.x
120-
uses: actions/setup-go@v5
120+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
121121
with:
122122
go-version: ${{ env.GO_VERSION }}
123123
id: go
@@ -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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
139139

140140
- name: Setup promtool
141141
run: |
@@ -150,10 +150,10 @@ 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
154154

155155
- name: Set up Go 1.x
156-
uses: actions/setup-go@v5
156+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
157157
with:
158158
go-version: ${{ env.GO_VERSION }}
159159
id: go
@@ -171,10 +171,10 @@ 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
175175

176176
- name: Set up Go 1.x
177-
uses: actions/setup-go@v5
177+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
178178
with:
179179
go-version: ${{ env.GO_VERSION }}
180180
id: go
@@ -192,10 +192,10 @@ 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
196196

197197
- name: Set up Go 1.x
198-
uses: actions/setup-go@v5
198+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
199199
with:
200200
go-version: ${{ env.GO_VERSION }}
201201
id: go

.github/workflows/govulncheck.yml

Lines changed: 3 additions & 3 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.20"
9+
GO_VERSION: "^1.22"
1010

1111
permissions:
1212
contents: read
@@ -15,10 +15,10 @@ jobs:
1515
ci-security-checks:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
1919
name: Checkout code
2020
- name: Set up Go 1.x
21-
uses: actions/setup-go@v5
21+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
2222
with:
2323
go-version: ${{ env.GO_VERSION }}
2424
- name: Install govulncheck binary

.github/workflows/openvex.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,35 @@ name: openvex
33
on:
44
workflow_dispatch:
55
release:
6-
types: [published]
6+
types:
7+
- released
8+
9+
permissions:
10+
contents: read
11+
712
jobs:
813
vexctl:
914
runs-on: ubuntu-latest
15+
16+
permissions:
17+
contents: write
18+
1019
steps:
1120
- name: Checkout code
12-
uses: actions/checkout@v4
21+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
22+
1323
- name: Set environment variables
1424
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
25+
1526
- uses: openvex/generate-vex@c59881b41451d7ccba5c3b74cd195382b8971fcd
1627
# Refer: https://github.com/openvex/vexctl#operational-model
1728
name: Run vexctl
1829
with:
1930
product: pkg:golang/k8s.io/kube-state-metrics/v2@${{ env.RELEASE_VERSION }}
31+
file: kube-state-metrics.openvex.json
32+
33+
- name: Upload OpenVEX document to GitHub Release
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
run: |
37+
gh release upload ${{ env.RELEASE_VERSION }} kube-state-metrics.openvex.json

.github/workflows/sbom.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Generate SBOM with Kubernetes BOM
2+
3+
on:
4+
release:
5+
types:
6+
- released
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
sbom:
13+
runs-on: ubuntu-latest
14+
15+
permissions:
16+
contents: write
17+
18+
env:
19+
OUTPUT: sbom.spdx
20+
TAG: ${{ github.event.release.tag_name }}
21+
22+
steps:
23+
- name: Fetch source code into GITHUB_WORKSPACE
24+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
25+
26+
- name: Install Kubernetes BOM
27+
uses: kubernetes-sigs/release-actions/setup-bom@2f8b9ec22aedc9ce15039b6c7716aa6c2907df1c # v0.2.0
28+
29+
- name: Generate SBOM
30+
run: |
31+
bom generate \
32+
--dirs=. \
33+
--image=registry.k8s.io/kube-state-metrics/kube-state-metrics:$TAG \
34+
--namespace=https://github.com/kubernetes/kube-state-metrics/releases/download/$TAG/$OUTPUT
35+
--output=$OUTPUT
36+
37+
- name: Upload SBOM to GitHub Release
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
run: |
41+
gh release upload $TAG $OUTPUT

.github/workflows/semantic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
name: Validate PR title for semantic commit message
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: amannn/action-semantic-pull-request@v5
21+
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
2222
env:
2323
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
run:
2-
deadline: 5m
2+
deadline: 10m
33

44
linters:
55
disable-all: true

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
## v2.13.0 / 2024-07-18
2+
3+
### Note
4+
5+
* This release builds with Golang `v1.22.5`.
6+
* This release builds with `k8s.io/client-go`: `v0.30.3`.
7+
* This release adds read and write timeouts for requests. The defaults might have an impact on scrapes that take a long time.
8+
9+
* [BUGFIX] Pod autosharding: transition from labelselector to fieldselector by @pkoutsovasilis in <https://github.com/kubernetes/kube-state-metrics/pull/2347>
10+
* [ENHANCEMENT] Add automatic detection of memory limits by @SuperQ in <https://github.com/kubernetes/kube-state-metrics/pull/2447>
11+
* [FEATURE] Add `readyz` endpoint by @rexagod in <https://github.com/kubernetes/kube-state-metrics/pull/2442>
12+
* [FEATURE] Add `livez` endpoint by @rexagod in <https://github.com/kubernetes/kube-state-metrics/pull/2418>
13+
* [FEATURE] Add kube_persistentvolume_volume_mode metric by @ricardoapl in <https://github.com/kubernetes/kube-state-metrics/pull/2370>
14+
* [FEATURE] Add read and write timeouts by @Pokom in <https://github.com/kubernetes/kube-state-metrics/pull/2412>
15+
116
## v2.12.0 / 2024-04-02
217

318
### Note

Dockerfile

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

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ FLAGS =
22
TESTENVVAR =
33
REGISTRY ?= gcr.io/k8s-staging-kube-state-metrics
44
TAG_PREFIX = v
5-
VERSION = $(shell cat VERSION)
5+
VERSION = $(shell gomplate -d config=./data.yaml --in '{{ (datasource "config").version }}')
66
TAG ?= $(TAG_PREFIX)$(VERSION)
7-
LATEST_RELEASE_BRANCH := release-$(shell grep -ohE "[0-9]+.[0-9]+" VERSION)
7+
LATEST_RELEASE_BRANCH := release-$(shell echo $(VERSION) | grep -ohE "[0-9]+.[0-9]+")
88
BRANCH = $(strip $(shell git rev-parse --abbrev-ref HEAD))
99
DOCKER_CLI ?= docker
1010
PROMTOOL_CLI ?= promtool
@@ -15,13 +15,13 @@ 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.46.0
19-
GO_VERSION = 1.21.8
18+
PROMETHEUS_VERSION = 2.53.1
19+
GO_VERSION = 1.22.5
2020
IMAGE = $(REGISTRY)/kube-state-metrics
2121
MULTI_ARCH_IMG = $(IMAGE)-$(ARCH)
2222
USER ?= $(shell id -u -n)
2323
HOST ?= $(shell hostname)
24-
MARKDOWNLINT_CLI2_VERSION = 0.9.2
24+
MARKDOWNLINT_CLI2_VERSION = 0.13.0
2525

2626

2727
export DOCKER_CLI_EXPERIMENTAL=enabled
@@ -48,19 +48,19 @@ lint: shellcheck licensecheck lint-markdown-format
4848

4949
lint-fix: fix-markdown-format
5050
golangci-lint run --fix -v
51-
51+
5252

5353
doccheck: generate validate-template
5454
@echo "- Checking if the generated documentation is up to date..."
5555
@git diff --exit-code
5656
@echo "- Checking if the documentation is in sync with the code..."
57-
@grep -hoE -d skip '\| kube_[^ |]+' docs/* --exclude=README.md | sed -E 's/\| //g' | sort -u > documented_metrics
57+
@grep -rhoE '\| kube_[^ |]+' docs/metrics/* --exclude=README.md | sed -E 's/\| //g' | sort -u > documented_metrics
5858
@find internal/store -type f -not -name '*_test.go' -exec sed -nE 's/.*"(kube_[^"]+)".*/\1/p' {} \; | sort -u > code_metrics
5959
@diff -u0 code_metrics documented_metrics || (echo "ERROR: Metrics with - are present in code but missing in documentation, metrics with + are documented but not found in code."; exit 1)
6060
@echo OK
6161
@rm -f code_metrics documented_metrics
6262
@echo "- Checking for orphan documentation files"
63-
@cd docs; for doc in *.md; do if [ "$$doc" != "README.md" ] && ! grep -q "$$doc" *.md; then echo "ERROR: No link to documentation file $${doc} detected"; exit 1; fi; done
63+
@cd docs; for doc in $$(find metrics/* -name '*.md' | sed 's/.*\///'); do if [ "$$doc" != "README.md" ] && ! grep -q "$$doc" *.md; then echo "ERROR: No link to documentation file $${doc} detected"; exit 1; fi; done
6464
@echo OK
6565

6666
build-local:
@@ -151,17 +151,17 @@ examples/prometheus-alerting-rules/alerts.yaml: jsonnet $(shell find jsonnet | g
151151

152152
examples: examples/standard examples/autosharding examples/daemonsetsharding mixin
153153

154-
examples/standard: jsonnet $(shell find jsonnet | grep ".libsonnet") scripts/standard.jsonnet scripts/vendor VERSION
154+
examples/standard: jsonnet $(shell find jsonnet | grep ".libsonnet") scripts/standard.jsonnet scripts/vendor
155155
mkdir -p examples/standard
156156
jsonnet -J scripts/vendor -m examples/standard --ext-str version="$(VERSION)" scripts/standard.jsonnet | xargs -I{} sh -c 'cat {} | gojsontoyaml > `echo {} | sed "s/\(.\)\([A-Z]\)/\1-\2/g" | tr "[:upper:]" "[:lower:]"`.yaml' -- {}
157157
find examples -type f ! -name '*.yaml' -delete
158158

159-
examples/autosharding: jsonnet $(shell find jsonnet | grep ".libsonnet") scripts/autosharding.jsonnet scripts/vendor VERSION
159+
examples/autosharding: jsonnet $(shell find jsonnet | grep ".libsonnet") scripts/autosharding.jsonnet scripts/vendor
160160
mkdir -p examples/autosharding
161161
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' -- {}
162162
find examples -type f ! -name '*.yaml' -delete
163163

164-
examples/daemonsetsharding: jsonnet $(shell find jsonnet | grep ".libsonnet") scripts/daemonsetsharding.jsonnet scripts/vendor VERSION
164+
examples/daemonsetsharding: jsonnet $(shell find jsonnet | grep ".libsonnet") scripts/daemonsetsharding.jsonnet scripts/vendor
165165
mkdir -p examples/daemonsetsharding
166166
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' -- {}
167167
find examples -type f ! -name '*.yaml' -delete

0 commit comments

Comments
 (0)