Skip to content

Commit 5bdebda

Browse files
zmotsoSergK
authored andcommitted
chore: Update Operator SDK from v1.39.2 to v1.42.0 (#57)
1 parent 4609270 commit 5bdebda

98 files changed

Lines changed: 5892 additions & 1338 deletions

File tree

Some content is hidden

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

.devcontainer/devcontainer.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "Kubebuilder DevContainer",
3+
"image": "golang:1.24",
4+
"features": {
5+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
6+
"ghcr.io/devcontainers/features/git:1": {}
7+
},
8+
9+
"runArgs": ["--network=host"],
10+
11+
"customizations": {
12+
"vscode": {
13+
"settings": {
14+
"terminal.integrated.shell.linux": "/bin/bash"
15+
},
16+
"extensions": [
17+
"ms-kubernetes-tools.vscode-kubernetes-tools",
18+
"ms-azuretools.vscode-docker"
19+
]
20+
}
21+
},
22+
23+
"onCreateCommand": "bash .devcontainer/post-install.sh"
24+
}

.devcontainer/post-install.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
set -x
3+
4+
curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
5+
chmod +x ./kind
6+
mv ./kind /usr/local/bin/kind
7+
8+
curl -L -o kubebuilder https://go.kubebuilder.io/dl/latest/linux/amd64
9+
chmod +x kubebuilder
10+
mv kubebuilder /usr/local/bin/
11+
12+
KUBECTL_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt)
13+
curl -LO "https://dl.k8s.io/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl"
14+
chmod +x kubectl
15+
mv kubectl /usr/local/bin/kubectl
16+
17+
docker network create -d=bridge --subnet=172.19.0.0/24 kind
18+
19+
kind version
20+
kubebuilder version
21+
docker --version
22+
go version
23+
kubectl version --client

.github/workflows/codecov.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v6
1616

1717
- name: Set up Go
18-
uses: actions/setup-go@v5
18+
uses: actions/setup-go@v6
1919
with:
2020
go-version: ${{ env.GOLANG_VERSION }}
2121

@@ -26,6 +26,6 @@ jobs:
2626
run: make test
2727

2828
- name: Upload codecov
29-
uses: codecov/codecov-action@v4
29+
uses: codecov/codecov-action@v5
3030
with:
31-
file: coverage.out
31+
files: coverage.out

.github/workflows/codeql.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ jobs:
1919

2020
steps:
2121
- name: Checkout repository
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323

2424
- name: Set up Go
25-
uses: actions/setup-go@v5
25+
uses: actions/setup-go@v6
2626
with:
2727
go-version: ${{ env.GOLANG_VERSION }}
2828

2929
# Initializes the CodeQL tools for scanning.
3030
- name: Initialize CodeQL
31-
uses: github/codeql-action/init@v3
31+
uses: github/codeql-action/init@v4
3232
with:
3333
languages: ${{ matrix.language }}
3434

3535
- name: Autobuild
36-
uses: github/codeql-action/autobuild@v3
36+
uses: github/codeql-action/autobuild@v4
3737

3838
- name: Perform CodeQL Analysis
39-
uses: github/codeql-action/analyze@v3
39+
uses: github/codeql-action/analyze@v4

.github/workflows/pr.yaml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ env:
1515
jobs:
1616

1717
check-commit-message:
18-
runs-on: ubuntu-22.04
18+
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v6
2222
with:
2323
fetch-depth: 0
2424

@@ -44,12 +44,12 @@ jobs:
4444

4545
helm-docs:
4646
needs: [check-commit-message]
47-
runs-on: ubuntu-22.04
47+
runs-on: ubuntu-latest
4848
steps:
4949
- name: Checkout code
50-
uses: actions/checkout@v4
50+
uses: actions/checkout@v6
5151
- name: Set up Go
52-
uses: actions/setup-go@v5
52+
uses: actions/setup-go@v6
5353
with:
5454
go-version: ${{ env.GOLANG_VERSION }}
5555

@@ -58,7 +58,7 @@ jobs:
5858

5959
helm-lint:
6060
needs: [helm-docs]
61-
runs-on: ubuntu-22.04
61+
runs-on: ubuntu-latest
6262
env:
6363
CHART_DIR: "deploy-templates"
6464
CT_CONFIGS_DIR: "."
@@ -68,7 +68,7 @@ jobs:
6868
CHART_SCHEMA_FILE_PATH: "chart_schema.yaml"
6969
steps:
7070
- name: Checkout
71-
uses: actions/checkout@v4
71+
uses: actions/checkout@v6
7272
with:
7373
fetch-depth: 0
7474

@@ -94,13 +94,13 @@ jobs:
9494

9595
build-and-lint:
9696
needs: [helm-lint]
97-
runs-on: ubuntu-22.04
97+
runs-on: ubuntu-latest
9898
steps:
9999
- name: Checkout code
100-
uses: actions/checkout@v4
100+
uses: actions/checkout@v6
101101

102102
- name: Set up Go
103-
uses: actions/setup-go@v5
103+
uses: actions/setup-go@v6
104104
with:
105105
go-version: ${{ env.GOLANG_VERSION }}
106106

@@ -111,10 +111,10 @@ jobs:
111111
run: make lint
112112
tests:
113113
needs: [build-and-lint]
114-
runs-on: ubuntu-22.04
114+
runs-on: ubuntu-latest
115115
steps:
116116
- name: Checkout code
117-
uses: actions/checkout@v4
117+
uses: actions/checkout@v6
118118

119119
- name: Start SonarQube server
120120
run: docker run -d --name sonarqube -p 9000:9000 sonarqube:lts-community
@@ -138,10 +138,10 @@ jobs:
138138

139139
docker-lint:
140140
needs: [tests]
141-
runs-on: ubuntu-22.04
141+
runs-on: ubuntu-latest
142142
steps:
143143
- name: Checkout code
144-
uses: actions/checkout@v4
144+
uses: actions/checkout@v6
145145
- name: Run hadolint
146146
uses: hadolint/hadolint-action@v1.5.0
147147
with:
@@ -150,23 +150,22 @@ jobs:
150150
e2e-tests:
151151
name: End-to-end tests
152152
needs: [docker-lint]
153-
runs-on: ubuntu-22.04
153+
runs-on: ubuntu-latest
154154
strategy:
155155
fail-fast: false
156156
matrix:
157157
# The e2e tests are run on the lowest and highest supported k8s version.
158158
# All Kubernetes version in between expose the same APIs, hence the operator
159159
# should be compatible with them.
160160
kube-version:
161-
- "1.30"
162-
- "1.31"
161+
- "1.34"
163162

164163
steps:
165164
- name: Check out code into the Go module directory
166-
uses: actions/checkout@v4
165+
uses: actions/checkout@v6
167166

168167
- name: Set up Go
169-
uses: actions/setup-go@v5
168+
uses: actions/setup-go@v6
170169
with:
171170
go-version: ${{ env.GOLANG_VERSION }}
172171

@@ -179,7 +178,7 @@ jobs:
179178
run: make start-kind KUBE_VERSION=$KUBE_VERSION && make e2e
180179

181180
e2e-tests-check:
182-
runs-on: ubuntu-22.04
181+
runs-on: ubuntu-latest
183182
if: always()
184183
needs: [e2e-tests]
185184
steps:

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
SOURCE_TAG: ${{ github.ref }}
1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@v6
2020
with:
2121
fetch-depth: '0'
2222

2323
- name: Set up Go
24-
uses: actions/setup-go@v5
24+
uses: actions/setup-go@v6
2525
with:
2626
go-version: ${{ env.GOLANG_VERSION }}
2727

.golangci.yaml

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,55 @@
1+
version: "2"
12
run:
2-
timeout: 5m
33
allow-parallel-runners: true
4-
5-
issues:
6-
# don't skip warning about doc comments
7-
# don't exclude the default set of lint
8-
exclude-use-default: false
9-
# restore some of the defaults
10-
# (fill in the rest as needed)
11-
exclude-rules:
12-
- path: "api/*"
13-
linters:
14-
- lll
15-
- path: "internal/*"
16-
linters:
17-
- dupl
18-
- lll
194
linters:
20-
disable-all: true
5+
default: none
216
enable:
227
- copyloopvar
238
- dupl
249
- errcheck
2510
- ginkgolinter
2611
- goconst
2712
- gocyclo
28-
- gofmt
29-
- goimports
30-
- gosimple
3113
- govet
3214
- ineffassign
15+
- lll
3316
- misspell
3417
- nakedret
3518
- prealloc
3619
- revive
3720
- staticcheck
38-
- typecheck
3921
- unconvert
4022
- unparam
4123
- unused
4224
- wsl
43-
# - lll # we can enable this later, but it requires a lot of changes
44-
45-
linters-settings:
46-
revive:
25+
settings:
26+
revive:
27+
rules:
28+
- name: comment-spacings
29+
- name: import-shadowing
30+
wsl:
31+
allow-trailing-comment: true
32+
exclusions:
33+
generated: lax
4734
rules:
48-
- name: comment-spacings
35+
- linters:
36+
- lll
37+
path: api/*
38+
- linters:
39+
- dupl
40+
- lll
41+
path: internal/*
42+
paths:
43+
- third_party$
44+
- builtin$
45+
- examples$
46+
formatters:
47+
enable:
48+
- gofmt
49+
- goimports
50+
exclusions:
51+
generated: lax
52+
paths:
53+
- third_party$
54+
- builtin$
55+
- examples$

.mockery.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
with-expecter: True
2-
inpackage: False
3-
dir: "{{.InterfaceDir}}/mocks"
4-
mockname: "Mock{{.InterfaceName}}"
5-
outpkg: "mocks"
6-
filename: "{{.InterfaceName | lower}}_mock.go"
7-
issue-845-fix: True
8-
resolve-type-alias: false
9-
disable-version-string: true
1+
all: true
2+
dir: '{{.InterfaceDir}}/mocks'
3+
structname: Mock{{.InterfaceName}}
4+
pkgname: mocks
5+
template: testify
6+
filename: "{{ .InterfaceName | snakecase }}_generated.mock.go"
7+
template-data:
8+
unroll-variadic: true
109
packages:
1110
github.com/epam/edp-sonar-operator/pkg/client/sonar:
1211
interfaces:

0 commit comments

Comments
 (0)