Skip to content

Commit d5b0ecb

Browse files
Merge branch 'kubernetes-sigs:main' into extra
2 parents b85583b + 092cadf commit d5b0ecb

File tree

1,797 files changed

+396076
-342833
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,797 files changed

+396076
-342833
lines changed

.github/workflows/build.yml

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,15 @@ jobs:
2727
- run: make verify-go-lint
2828

2929
nix:
30-
runs-on: ubuntu-22.04
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
arch:
34+
- amd64
35+
- arm64
36+
- ppc64le
37+
runs-on: ubuntu-24.04
38+
name: nix / ${{ matrix.arch }}
3139
steps:
3240
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3341
- uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v28
@@ -38,15 +46,45 @@ jobs:
3846
name: security-profiles-operator
3947
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
4048
pushFilter: security-profiles-operator
41-
- run: make nix
49+
- run: make nix-${{ matrix.arch }}
4250
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
4351
with:
44-
name: build
45-
path: build.tar.gz
52+
name: build-${{ matrix.arch }}
53+
path: build/${{ matrix.arch }}
4654

4755
nix-spoc:
56+
strategy:
57+
fail-fast: false
58+
matrix:
59+
arch:
60+
- amd64
61+
- arm64
62+
- ppc64le
63+
runs-on: ubuntu-24.04
64+
name: nix / spoc / ${{ matrix.arch }}
65+
steps:
66+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
67+
- uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v28
68+
with:
69+
install_url: https://releases.nixos.org/nix/nix-${{ env.NIX_VERSION }}/install
70+
- uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
71+
with:
72+
name: security-profiles-operator
73+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
74+
pushFilter: security-profiles-operator
75+
- run: nix-build nix/default-${{ matrix.arch }}.nix
76+
77+
nix-spoc-push:
78+
strategy:
79+
fail-fast: false
80+
matrix:
81+
arch:
82+
- amd64
83+
- arm64
84+
- ppc64le
4885
if: github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags')
49-
runs-on: ubuntu-22.04
86+
name: nix / spoc / push / ${{ matrix.arch }}
87+
runs-on: ubuntu-24.04
5088
permissions:
5189
contents: write # required for updating the release
5290
id-token: write # required for sigstore signing
@@ -65,10 +103,10 @@ jobs:
65103
sudo curl -sSfL --retry 5 --retry-delay 3 -o /usr/bin/bom \
66104
https://github.com/kubernetes-sigs/bom/releases/download/${{ env.BOM_VERSION }}/bom-amd64-linux
67105
sudo chmod +x /usr/bin/bom
68-
- run: make nix-spoc
106+
- run: make nix-spoc-${{ matrix.arch }}
69107
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
70108
with:
71-
name: spoc
109+
name: spoc-${{ matrix.arch }}
72110
path: |
73111
build/*
74112
- uses: softprops/action-gh-release@7b4da11513bf3f43f9999e90eabced41ab8bb048 # v2.2.0
@@ -78,7 +116,7 @@ jobs:
78116
build/*
79117
80118
bpf:
81-
runs-on: ubuntu-22.04
119+
runs-on: ubuntu-24.04
82120
steps:
83121
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
84122
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
@@ -95,7 +133,7 @@ jobs:
95133
- run: make verify-bpf
96134

97135
build-image:
98-
runs-on: ubuntu-22.04
136+
runs-on: ubuntu-24.04
99137
steps:
100138
- name: Remove unnecessary files
101139
run: |
@@ -136,7 +174,7 @@ jobs:
136174
push: ${{ github.ref == 'refs/heads/main' }}
137175

138176
operator-image:
139-
runs-on: ubuntu-22.04
177+
runs-on: ubuntu-24.04
140178
steps:
141179
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
142180
- name: Set up Docker Buildx
@@ -170,7 +208,7 @@ jobs:
170208
load: true
171209

172210
ubi-image:
173-
runs-on: ubuntu-22.04
211+
runs-on: ubuntu-24.04
174212
steps:
175213
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
176214
- name: Set up Docker Buildx

.github/workflows/olm_tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- main
66
pull_request:
77
env:
8-
KIND_IMG_TAG: v1.32.0
8+
KIND_IMG_TAG: v1.32.2
99
concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref }}
1111
cancel-in-progress: true
@@ -15,7 +15,7 @@ permissions: {}
1515
jobs:
1616
main:
1717
name: tests
18-
runs-on: ubuntu-22.04
18+
runs-on: ubuntu-24.04
1919

2020
steps:
2121
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/test.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# write security-events is required by all codeql-action workflows
1818
security-events: write
1919

20-
runs-on: ubuntu-22.04
20+
runs-on: ubuntu-24.04
2121
steps:
2222
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2323
- uses: github/codeql-action/init@c4fb451437765abf5018c6fbf22cce1a7da1e5cc # v2.17.1
@@ -27,7 +27,7 @@ jobs:
2727
- uses: github/codeql-action/analyze@c4fb451437765abf5018c6fbf22cce1a7da1e5cc # v2.17.1
2828

2929
coverage:
30-
runs-on: ubuntu-22.04
30+
runs-on: ubuntu-24.04
3131
steps:
3232
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3333
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
@@ -43,7 +43,7 @@ jobs:
4343
verbose: true
4444

4545
image:
46-
runs-on: ubuntu-22.04
46+
runs-on: ubuntu-24.04
4747
steps:
4848
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4949
- run: hack/install-crun
@@ -58,8 +58,7 @@ jobs:
5858

5959
e2e-fedora:
6060
needs: image
61-
# TODO: move back to 22.04 when https://github.com/actions/runner-images/issues/10678 got resolved
62-
runs-on: ubuntu-20.04
61+
runs-on: ubuntu-24.04
6362
timeout-minutes: 90
6463
env:
6564
RUN: ./hack/ci/run-fedora.sh
@@ -94,8 +93,7 @@ jobs:
9493
9594
e2e-ubuntu:
9695
needs: image
97-
# TODO: move back to 22.04 when https://github.com/actions/runner-images/issues/10678 got resolved
98-
runs-on: ubuntu-20.04
96+
runs-on: ubuntu-24.04
9997
timeout-minutes: 90
10098
env:
10199
RUN: ./hack/ci/run-ubuntu.sh
@@ -130,8 +128,7 @@ jobs:
130128
131129
e2e-flatcar:
132130
needs: image
133-
# TODO: move back to 22.04 when https://github.com/actions/runner-images/issues/10678 got resolved
134-
runs-on: ubuntu-20.04
131+
runs-on: ubuntu-24.04
135132
timeout-minutes: 90
136133
env:
137134
RUN: ./hack/ci/run-flatcar.sh
@@ -172,8 +169,7 @@ jobs:
172169
173170
e2e-spoc:
174171
needs: image
175-
# TODO: move back to 22.04 when https://github.com/actions/runner-images/issues/10678 got resolved
176-
runs-on: ubuntu-20.04
172+
runs-on: ubuntu-24.04
177173
timeout-minutes: 90
178174
env:
179175
RUN: ./hack/ci/run-debian.sh
@@ -203,8 +199,7 @@ jobs:
203199

204200
e2e-seccomp-profile:
205201
needs: image
206-
# TODO: move back to 22.04 when https://github.com/actions/runner-images/issues/10678 got resolved
207-
runs-on: ubuntu-20.04
202+
runs-on: ubuntu-24.04
208203
timeout-minutes: 90
209204
env:
210205
RUN: ./hack/ci/run-debian.sh
@@ -234,8 +229,7 @@ jobs:
234229

235230
e2e-apparmor-profile:
236231
needs: image
237-
# TODO: move back to 22.04 when https://github.com/actions/runner-images/issues/10678 got resolved
238-
runs-on: ubuntu-20.04
232+
runs-on: ubuntu-24.04
239233
timeout-minutes: 90
240234
env:
241235
RUN: ./hack/ci/run-debian.sh
@@ -264,7 +258,7 @@ jobs:
264258
run: $RUN hack/ci/e2e-apparmor.sh
265259

266260
typos:
267-
runs-on: ubuntu-22.04
261+
runs-on: ubuntu-24.04
268262
steps:
269263
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
270264
- uses: crate-ci/typos@9d890159570d5018df91fedfa40b4730cd4a81b1 # v1.28.4

.golangci.yml

Lines changed: 63 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
---
2+
version: "2"
23
run:
34
concurrency: 6
4-
timeout: 10m
5-
issues:
6-
exclude-rules:
7-
- path: internal/pkg/daemon/bpfrecorder/generated.go
8-
linters:
9-
- gofumpt
10-
- lll
115
linters:
12-
disable-all: true
6+
default: none
137
enable:
148
- asasalint
159
- asciicheck
@@ -32,7 +26,6 @@ linters:
3226
- exptostd
3327
- fatcontext
3428
- forcetypeassert
35-
- gci
3629
- ginkgolinter
3730
- gocheckcompilerdirectives
3831
- gochecknoinits
@@ -43,14 +36,10 @@ linters:
4336
- gocyclo
4437
- godot
4538
- godox
46-
- gofmt
47-
- gofumpt
4839
- goheader
49-
- goimports
5040
- gomodguard
5141
- goprintffuncname
5242
- gosec
53-
- gosimple
5443
- gosmopolitan
5544
- govet
5645
- grouper
@@ -87,14 +76,12 @@ linters:
8776
- spancheck
8877
- sqlclosecheck
8978
- staticcheck
90-
- stylecheck
9179
- tagalign
9280
- tagliatelle
9381
- testableexamples
9482
- testifylint
9583
- thelper
9684
- tparallel
97-
- typecheck
9885
- unconvert
9986
- unparam
10087
- unused
@@ -109,6 +96,7 @@ linters:
10996
# - err113
11097
# - exhaustruct
11198
# - forbidigo
99+
# - funcorder
112100
# - funlen
113101
# - gochecknoglobals
114102
# - gomoddirectives
@@ -121,35 +109,64 @@ linters:
121109
# - testpackage
122110
# - varnamelen
123111
# - wrapcheck
124-
linters-settings:
125-
revive:
112+
settings:
113+
errcheck:
114+
check-type-assertions: true
115+
check-blank: true
116+
gocognit:
117+
min-complexity: 40
118+
goconst:
119+
min-occurrences: 6
120+
gocritic:
121+
enable-all: true
122+
godox:
123+
keywords:
124+
- BUG
125+
- FIXME
126+
- HACK
127+
gomoddirectives:
128+
replace-allow-list:
129+
- golang.org/x/sys
130+
gosec:
131+
excludes:
132+
- G115
133+
nestif:
134+
min-complexity: 15
135+
revive:
136+
rules:
137+
- name: unused-parameter
138+
disabled: true
139+
exclusions:
140+
generated: lax
141+
presets:
142+
- comments
143+
- common-false-positives
144+
- legacy
145+
- std-error-handling
126146
rules:
127-
- name: unused-parameter
128-
disabled: true
129-
goconst:
130-
min-occurrences: 6
131-
gomoddirectives:
132-
replace-allow-list:
133-
- golang.org/x/sys
134-
gocognit:
135-
min-complexity: 40
136-
gosec:
137-
excludes:
138-
- G115 # Potential integer overflow when converting between types
139-
nestif:
140-
min-complexity: 15
141-
gci:
142-
sections:
143-
- standard
144-
- default
145-
- localmodule
146-
errcheck:
147-
check-type-assertions: true
148-
check-blank: true
149-
godox:
150-
keywords:
151-
- BUG
152-
- FIXME
153-
- HACK
154-
gocritic:
155-
enable-all: true
147+
- linters:
148+
- lll
149+
path: internal/pkg/daemon/bpfrecorder/generated.go
150+
paths:
151+
- third_party$
152+
- builtin$
153+
- examples$
154+
formatters:
155+
enable:
156+
- gci
157+
- gofmt
158+
- gofumpt
159+
- goimports
160+
settings:
161+
gci:
162+
sections:
163+
- standard
164+
- default
165+
- localmodule
166+
exclusions:
167+
generated: lax
168+
paths:
169+
- third_party$
170+
- builtin$
171+
- examples$
172+
- internal/pkg/daemon/bpfrecorder/generated.go

0 commit comments

Comments
 (0)