Skip to content

Commit 4810efd

Browse files
authored
Merge branch 'kubernetes:main' into #2501-Count-volumes-attached-to-a-node
2 parents 7c129f1 + de7bd94 commit 4810efd

File tree

126 files changed

+3669
-2601
lines changed

Some content is hidden

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

126 files changed

+3669
-2601
lines changed

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ assignees: ''
99

1010
<!-- Please only use this template for submitting feature requests -->
1111

12-
**What would you like to be added**:
12+
**What would you like to be added:**
1313

14-
**Why is this needed**:
14+
**Why is this needed:**
1515

16-
**Describe the solution you'd like**
16+
**Describe the solution you'd like:**
1717

18-
**Additional context**
18+
**Additional context:**

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
4. If the PR is unfinished, see how to mark it: https://git.k8s.io/community/contributors/guide/pull-requests.md#marking-unfinished-pull-requests
66
-->
77

8-
**What this PR does / why we need it**:
8+
<!-- markdownlint-disable-next-line MD041 -->
9+
**What this PR does / why we need it:**
910

10-
**How does this change affect the cardinality of KSM**: *(increases, decreases or does not change cardinality)*
11+
**How does this change affect the cardinality of KSM:** *(increases, decreases or does not change cardinality)*
1112

12-
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
13+
**Which issue(s) this PR fixes:** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*
1314
Fixes #

.github/dependabot.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ updates:
88
- "k8s.io*"
99
schedule:
1010
interval: "weekly"
11-
- package-ecosystem: "gomod"
12-
directory: "tools"
13-
schedule:
14-
interval: "weekly"
1511
- package-ecosystem: "github-actions"
1612
directory: "/"
1713
schedule:

.github/workflows/ci.yml

Lines changed: 19 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,23 @@ env:
2020
E2E_SETUP_KIND: yes
2121
E2E_SETUP_KUBECTL: yes
2222
SUDO: sudo
23-
GO_VERSION: "^1.23"
24-
GOLANGCI_LINT_VERSION: "v1.61.0"
23+
GO_VERSION: "^1.24"
24+
GOLANGCI_LINT_VERSION: "v2.0.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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
32+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3333

3434
- name: Set up Go 1.x
35-
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
35+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
3636
with:
3737
go-version: ${{ env.GO_VERSION }}
3838
id: go
3939

40-
- name: Setup environment
41-
run: |
42-
make install-tools
43-
4440
- name: Lint
4541
run: |
4642
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${{ env.GOLANGCI_LINT_VERSION }}
@@ -51,18 +47,14 @@ jobs:
5147
runs-on: ubuntu-latest
5248
steps:
5349
- name: Check out code into the Go module directory
54-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
50+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5551

5652
- name: Set up Go 1.x
57-
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
53+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
5854
with:
5955
go-version: ${{ env.GO_VERSION }}
6056
id: go
6157

62-
- name: Setup environment
63-
run: |
64-
make install-tools
65-
6658
- name: Validate generated manifests
6759
run: |
6860
make validate-manifests
@@ -72,18 +64,14 @@ jobs:
7264
runs-on: ubuntu-latest
7365
steps:
7466
- name: Check out code into the Go module directory
75-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
67+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
7668

7769
- name: Set up Go 1.x
78-
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
70+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
7971
with:
8072
go-version: ${{ env.GO_VERSION }}
8173
id: go
8274

83-
- name: Setup environment
84-
run: |
85-
make install-tools
86-
8775
- name: Validate go modules
8876
run: |
8977
make validate-modules
@@ -93,18 +81,14 @@ jobs:
9381
runs-on: ubuntu-latest
9482
steps:
9583
- name: Check out code into the Go module directory
96-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
84+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
9785

9886
- name: Set up Go 1.x
99-
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
87+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
10088
with:
10189
go-version: ${{ env.GO_VERSION }}
10290
id: go
10391

104-
- name: Setup environment
105-
run: |
106-
make install-tools
107-
10892
- name: Check that all metrics are documented and templates have no delta
10993
run: |
11094
make doccheck
@@ -114,18 +98,14 @@ jobs:
11498
runs-on: ubuntu-latest
11599
steps:
116100
- name: Check out code into the Go module directory
117-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
101+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
118102

119103
- name: Set up Go 1.x
120-
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
104+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
121105
with:
122106
go-version: ${{ env.GO_VERSION }}
123107
id: go
124108

125-
- name: Setup environment
126-
run: |
127-
make install-tools
128-
129109
- name: Unit tests
130110
run: |
131111
make test-unit
@@ -135,7 +115,7 @@ jobs:
135115
runs-on: ubuntu-latest
136116
steps:
137117
- name: Check out code into the Go module directory
138-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
118+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
139119

140120
- name: Setup promtool
141121
run: |
@@ -150,18 +130,14 @@ jobs:
150130
runs-on: ubuntu-latest
151131
steps:
152132
- name: Check out code into the Go module directory
153-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
133+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
154134

155135
- name: Set up Go 1.x
156-
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
136+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
157137
with:
158138
go-version: ${{ env.GO_VERSION }}
159139
id: go
160140

161-
- name: Setup environment
162-
run: |
163-
make install-tools
164-
165141
- name: Benchmark tests
166142
run: |
167143
BENCHSTAT_OUTPUT_FILE=result.txt make test-benchmark-compare
@@ -181,18 +157,14 @@ jobs:
181157
runs-on: ubuntu-latest
182158
steps:
183159
- name: Check out code into the Go module directory
184-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
160+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
185161

186162
- name: Set up Go 1.x
187-
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
163+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
188164
with:
189165
go-version: ${{ env.GO_VERSION }}
190166
id: go
191167

192-
- name: Setup environment
193-
run: |
194-
make install-tools
195-
196168
- name: Build
197169
run: |
198170
make build
@@ -202,18 +174,14 @@ jobs:
202174
runs-on: ubuntu-latest
203175
steps:
204176
- name: Check out code into the Go module directory
205-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
177+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
206178

207179
- name: Set up Go 1.x
208-
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
180+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
209181
with:
210182
go-version: ${{ env.GO_VERSION }}
211183
id: go
212184

213-
- name: Setup environment
214-
run: |
215-
make install-tools
216-
217185
- name: End-to-end tests
218186
run: |
219187
make e2e

.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.23"
9+
GO_VERSION: "^1.24"
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1919
name: Checkout code
2020
- name: Set up Go 1.x
21-
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
21+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
2222
with:
2323
go-version: ${{ env.GO_VERSION }}
2424
- name: Install govulncheck binary

.github/workflows/openvex.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Checkout code
21-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2222

2323
- name: Set environment variables
2424
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

.github/workflows/sbom.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121

2222
steps:
2323
- name: Fetch source code into GITHUB_WORKSPACE
24-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2525

2626
- name: Install Kubernetes BOM
27-
uses: kubernetes-sigs/release-actions/setup-bom@a69972745f85aab4ba5d6c681e2a0e7f73eaff2b # v0.3.0
27+
uses: kubernetes-sigs/release-actions/setup-bom@a30d93cf2aa029e1e4c8a6c79f766aebf429fddb # v0.3.1
2828

2929
- name: Generate SBOM
3030
run: |

.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@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
21+
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
2222
env:
2323
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.golangci.yml

Lines changed: 45 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
run:
2-
timeout: 10m
3-
1+
version: "2"
42
linters:
5-
disable-all: true
3+
default: none
64
enable:
75
- gocritic
86
- gocyclo
9-
- gofmt
10-
- goimports
117
- gosec
12-
- gosimple
138
- govet
149
- ineffassign
1510
- misspell
@@ -18,22 +13,48 @@ linters:
1813
- staticcheck
1914
- unconvert
2015
- unused
16+
exclusions:
17+
generated: lax
18+
rules:
19+
- linters:
20+
- promlinter
21+
path: _test\.go
22+
- linters:
23+
- gosec
24+
text: 'G104:'
25+
- linters:
26+
- revive
27+
text: 'package-comments:|var-naming:'
28+
# This needs to stay as long as we support exposing v1.endpoints metrics
29+
- linters:
30+
- staticcheck
31+
text: 'SA1019: v1.Endpoint'
32+
path: 'internal/store/endpoint.*.go|internal/store/builder.go'
33+
# TODO: Use functions with context https://github.com/kubernetes/kube-state-metrics/issues/2721
34+
- linters:
35+
- staticcheck
36+
text: 'SA1019: .*List|Watch'
37+
path: 'pkg/sharding/listwatch.go|pkg/watch/watch.go'
2138

22-
linters-settings:
23-
goimports:
24-
local-prefixes: k8s.io/kube-state-metrics,k8s.io/kube-state-metrics/v2
25-
39+
paths:
40+
- third_party$
41+
- builtin$
42+
- examples$
2643
issues:
27-
exclude-use-default: false
28-
exclude-rules:
29-
# We don't check metrics naming in the tests.
30-
- path: _test\.go
31-
linters:
32-
- promlinter
33-
# TODO(mrueg) Improve error handling
34-
- text: "G104:"
35-
linters:
36-
- gosec
37-
- text: "package-comments:"
38-
linters:
39-
- revive
44+
max-issues-per-linter: 0
45+
max-same-issues: 0
46+
formatters:
47+
enable:
48+
- gofmt
49+
- goimports
50+
settings:
51+
goimports:
52+
local-prefixes:
53+
- k8s.io/kube-state-metrics
54+
- k8s.io/kube-state-metrics/v2
55+
exclusions:
56+
generated: lax
57+
paths:
58+
- third_party$
59+
- builtin$
60+
- examples$

.markdownlint-cli2.jsonc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
"style": "asterisk"
99
},
1010
"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
11+
"MD033": {
12+
"allowed_elements": [
13+
"details",
14+
"summary",
15+
"br"
16+
]
17+
}
1618
}
1719
}

0 commit comments

Comments
 (0)