Skip to content

Commit 37dd61f

Browse files
committed
feat: add support for Kubernetes 1.31
Rekres, add new deprecations for 1.31. Signed-off-by: Andrey Smirnov <[email protected]>
1 parent ddd4c69 commit 37dd61f

File tree

11 files changed

+310
-298
lines changed

11 files changed

+310
-298
lines changed

.conform.yaml

+44-33
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,48 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2023-02-17T14:37:43Z by kres 2cbfdd9.
3+
# Generated on 2024-07-08T16:37:28Z by kres 8c8b007.
44

5-
---
65
policies:
7-
- type: commit
8-
spec:
9-
dco: true
10-
gpg:
11-
required: true
12-
identity:
13-
gitHubOrganization: siderolabs
14-
spellcheck:
15-
locale: US
16-
maximumOfOneCommit: true
17-
header:
18-
length: 89
19-
imperative: true
20-
case: lower
21-
invalidLastCharacters: .
22-
body:
23-
required: true
24-
conventional:
25-
types: ["chore","docs","perf","refactor","style","test","release"]
26-
scopes: [".*"]
27-
- type: license
28-
spec:
29-
skipPaths:
30-
- .git/
31-
- testdata/
32-
includeSuffixes:
33-
- .go
34-
excludeSuffixes:
35-
- .pb.go
36-
- .pb.gw.go
37-
header: "// This Source Code Form is subject to the terms of the Mozilla Public\u000A// License, v. 2.0. If a copy of the MPL was not distributed with this\u000A// file, You can obtain one at http://mozilla.org/MPL/2.0/.\u000A"
6+
- type: commit
7+
spec:
8+
dco: true
9+
gpg:
10+
required: true
11+
identity:
12+
gitHubOrganization: siderolabs
13+
spellcheck:
14+
locale: US
15+
maximumOfOneCommit: true
16+
header:
17+
length: 89
18+
imperative: true
19+
case: lower
20+
invalidLastCharacters: .
21+
body:
22+
required: true
23+
conventional:
24+
types:
25+
- chore
26+
- docs
27+
- perf
28+
- refactor
29+
- style
30+
- test
31+
- release
32+
scopes:
33+
- .*
34+
- type: license
35+
spec:
36+
root: .
37+
skipPaths:
38+
- .git/
39+
- testdata/
40+
includeSuffixes:
41+
- .go
42+
excludeSuffixes:
43+
- .pb.go
44+
- .pb.gw.go
45+
header: |
46+
// This Source Code Form is subject to the terms of the Mozilla Public
47+
// License, v. 2.0. If a copy of the MPL was not distributed with this
48+
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

.github/workflows/ci.yaml

+34-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2024-02-15T12:59:24Z by kres latest.
3+
# Generated on 2024-07-08T16:37:28Z by kres 8c8b007.
44

55
name: default
66
concurrency:
@@ -29,27 +29,44 @@ jobs:
2929
- self-hosted
3030
- generic
3131
if: (!startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'dependabot/'))
32-
services:
33-
buildkitd:
34-
image: moby/buildkit:v0.12.5
35-
options: --privileged
36-
ports:
37-
- 1234:1234
38-
volumes:
39-
- /var/lib/buildkit/${{ github.repository }}:/var/lib/buildkit
40-
- /usr/etc/buildkit/buildkitd.toml:/etc/buildkit/buildkitd.toml
4132
steps:
33+
- name: gather-system-info
34+
id: system-info
35+
uses: kenchan0130/[email protected]
36+
continue-on-error: true
37+
- name: print-system-info
38+
run: |
39+
MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024))
40+
41+
OUTPUTS=(
42+
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}"
43+
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}"
44+
"Hostname: ${{ steps.system-info.outputs.hostname }}"
45+
"NodeName: ${NODE_NAME}"
46+
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}"
47+
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}"
48+
"Name: ${{ steps.system-info.outputs.name }}"
49+
"Platform: ${{ steps.system-info.outputs.platform }}"
50+
"Release: ${{ steps.system-info.outputs.release }}"
51+
"Total memory: ${MEMORY_GB} GB"
52+
)
53+
54+
for OUTPUT in "${OUTPUTS[@]}";do
55+
echo "${OUTPUT}"
56+
done
57+
continue-on-error: true
4258
- name: checkout
4359
uses: actions/checkout@v4
4460
- name: Unshallow
4561
run: |
4662
git fetch --prune --unshallow
4763
- name: Set up Docker Buildx
64+
id: setup-buildx
4865
uses: docker/setup-buildx-action@v3
4966
with:
5067
driver: remote
51-
endpoint: tcp://localhost:1234
52-
timeout-minutes: 1
68+
endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234
69+
timeout-minutes: 10
5370
- name: base
5471
run: |
5572
make base
@@ -60,8 +77,11 @@ jobs:
6077
run: |
6178
make unit-tests-race
6279
- name: coverage
63-
run: |
64-
make coverage
80+
uses: codecov/codecov-action@v4
81+
with:
82+
files: _out/coverage-unit-tests.txt
83+
token: ${{ secrets.CODECOV_TOKEN }}
84+
timeout-minutes: 3
6585
- name: lint
6686
run: |
6787
make lint

.golangci.yml

+37-65
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2024-02-15T12:59:24Z by kres latest.
3+
# Generated on 2024-07-08T16:37:28Z by kres 8c8b007.
44

55
# options for analysis running
66
run:
77
timeout: 10m
88
issues-exit-code: 1
99
tests: true
10-
build-tags: []
11-
skip-dirs: []
12-
skip-dirs-use-default: true
13-
skip-files: []
10+
build-tags: [ ]
1411
modules-download-mode: readonly
1512

1613
# output configuration options
1714
output:
18-
format: colored-line-number
15+
formats:
16+
- format: colored-line-number
17+
path: stdout
1918
print-issued-lines: true
2019
print-linter-name: true
2120
uniq-by-line: true
@@ -32,54 +31,35 @@ linters-settings:
3231
check-blank: true
3332
exhaustive:
3433
default-signifies-exhaustive: false
35-
funlen:
36-
lines: 60
37-
statements: 40
3834
gci:
39-
local-prefixes: github.com/siderolabs/go-kubernetes/
35+
sections:
36+
- standard # Standard section: captures all standard packages.
37+
- default # Default section: contains all imports that could not be matched to another section type.
38+
- localmodule # Imports from the same module.
4039
gocognit:
4140
min-complexity: 30
42-
ireturn:
43-
allow:
44-
- anon
45-
- error
46-
- empty
47-
- stdlib
48-
- github.com\/talos-systems\/kres\/internal\/dag.Node
4941
nestif:
5042
min-complexity: 5
5143
goconst:
5244
min-len: 3
5345
min-occurrences: 3
5446
gocritic:
55-
disabled-checks: []
47+
disabled-checks: [ ]
5648
gocyclo:
5749
min-complexity: 20
5850
godot:
59-
check-all: false
60-
godox:
61-
keywords: # default keywords are TODO, BUG, and FIXME, these can be overwritten by this setting
62-
- NOTE
63-
- OPTIMIZE # marks code that should be optimized before merging
64-
- HACK # marks hack-arounds that should be removed before merging
51+
scope: declarations
6552
gofmt:
6653
simplify: true
67-
goimports:
68-
local-prefixes: github.com/siderolabs/go-kubernetes/
69-
golint:
70-
min-confidence: 0.8
71-
gomnd:
72-
settings: {}
73-
gomodguard: {}
54+
gomodguard: { }
7455
govet:
75-
check-shadowing: true
7656
enable-all: true
7757
lll:
7858
line-length: 200
7959
tab-width: 4
8060
misspell:
8161
locale: US
82-
ignore-words: []
62+
ignore-words: [ ]
8363
nakedret:
8464
max-func-lines: 30
8565
prealloc:
@@ -88,16 +68,15 @@ linters-settings:
8868
for-loops: false # Report preallocation suggestions on for loops, false by default
8969
nolintlint:
9070
allow-unused: false
91-
allow-leading-space: false
92-
allow-no-explanation: []
71+
allow-no-explanation: [ ]
9372
require-explanation: false
9473
require-specific: true
95-
rowserrcheck: {}
96-
testpackage: {}
74+
rowserrcheck: { }
75+
testpackage: { }
9776
unparam:
9877
check-exported: false
9978
unused:
100-
check-exported: false
79+
local-variables-are-used: false
10180
whitespace:
10281
multi-if: false # Enforces newlines (or comments) after every multi-line if statement
10382
multi-func: false # Enforces newlines (or comments) after every multi-line function signature
@@ -113,60 +92,53 @@ linters-settings:
11392
gofumpt:
11493
extra-rules: false
11594
cyclop:
116-
# the maximal code complexity to report
117-
max-complexity: 20
118-
# depguard:
119-
# Main:
120-
# deny:
121-
# - github.com/OpenPeeDeeP/depguard # this is just an example
95+
# the maximal code complexity to report
96+
max-complexity: 20
97+
depguard:
98+
rules:
99+
prevent_unmaintained_packages:
100+
list-mode: lax # allow unless explicitly denied
101+
files:
102+
- $all
103+
deny:
104+
- pkg: io/ioutil
105+
desc: "replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil"
122106

123107
linters:
124108
enable-all: true
125109
disable-all: false
126110
fast: false
127111
disable:
128112
- exhaustruct
129-
- exhaustivestruct
113+
- err113
130114
- forbidigo
131115
- funlen
132-
- gas
133116
- gochecknoglobals
134117
- gochecknoinits
135118
- godox
136-
- goerr113
137119
- gomnd
138120
- gomoddirectives
121+
- gosec
122+
- inamedparam
139123
- ireturn
124+
- mnd
140125
- nestif
141126
- nonamedreturns
142-
- nosnakecase
143127
- paralleltest
128+
- tagalign
144129
- tagliatelle
145130
- thelper
146-
- typecheck
147131
- varnamelen
148132
- wrapcheck
149-
- depguard # Disabled because starting with golangci-lint 1.53.0 it doesn't allow denylist alone anymore
150-
- tagalign
151-
- inamedparam
152133
- testifylint # complains about our assert recorder and has a number of false positives for assert.Greater(t, thing, 1)
153134
- protogetter # complains about us using Value field on typed spec, instead of GetValue which has a different signature
154135
- perfsprint # complains about us using fmt.Sprintf in non-performance critical code, updating just kres took too long
155-
# abandoned linters for which golangci shows the warning that the repo is archived by the owner
156-
- interfacer
157-
- maligned
158-
- golint
159-
- scopelint
160-
- varcheck
161-
- deadcode
162-
- structcheck
163-
- ifshort
164-
# disabled as it seems to be broken - goes into imported libraries and reports issues there
165-
- musttag
136+
- goimports # same as gci
137+
- musttag # seems to be broken - goes into imported libraries and reports issues there
166138

167139
issues:
168-
exclude: []
169-
exclude-rules: []
140+
exclude: [ ]
141+
exclude-rules: [ ]
170142
exclude-use-default: false
171143
exclude-case-sensitive: false
172144
max-issues-per-linter: 10

0 commit comments

Comments
 (0)