Skip to content

Commit d93f443

Browse files
Merge pull request #223 from leaseweb/feat/k8s-1-35-support
feat: K8s 1.35 support
2 parents 10ecad1 + 2a29e9d commit d93f443

19 files changed

Lines changed: 208 additions & 160 deletions

File tree

.github/workflows/chart-lints.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Helm
1616
uses: azure/setup-helm@v4.3.1
1717
with:
18-
version: v3.18.6
18+
version: v3.19.4
1919

2020
- uses: actions/setup-python@v6
2121
with:

.github/workflows/pr-check.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
- name: Check out code
1616
uses: actions/checkout@v5
1717
- name: golangci-lint
18-
uses: golangci/golangci-lint-action@v6
18+
uses: golangci/golangci-lint-action@v7
1919
with:
20-
version: v1.64.8
20+
version: v2.7.2
2121
args: --timeout=5m
2222

2323
build:

.golangci.yml

Lines changed: 56 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
1-
issues:
2-
exclude-use-default: true
3-
max-issues-per-linter: 50
4-
max-same-issues: 0 # disable
5-
exclude-rules:
6-
- path: _test.go
7-
linters:
8-
- funlen
9-
- gocognit
10-
- gocyclo
11-
- maintidx
12-
- nestif
13-
14-
linters-settings:
15-
gci:
16-
sections:
17-
- standard
18-
- default
19-
- prefix(github.com/leaseweb/cloudstack-csi-driver)
20-
goimports:
21-
local-prefixes: github.com/leaseweb/cloudstack-csi-driver
22-
23-
misspell:
24-
locale: US
25-
1+
version: "2"
262
linters:
27-
enable-all: true
3+
default: all
284
disable:
295
- cyclop
306
- depguard
@@ -42,4 +18,57 @@ linters:
4218
- testpackage
4319
- varnamelen
4420
- wrapcheck
45-
- wsl
21+
- wsl
22+
# TODO: The following linters should be enabled in the future
23+
- funcorder
24+
- wsl_v5
25+
- noctx
26+
- noinlineerr
27+
- modernize
28+
- revive
29+
settings:
30+
misspell:
31+
locale: US
32+
exclusions:
33+
generated: lax
34+
presets:
35+
- comments
36+
- common-false-positives
37+
- legacy
38+
- std-error-handling
39+
rules:
40+
- linters:
41+
- funlen
42+
- gocognit
43+
- gocyclo
44+
- maintidx
45+
- nestif
46+
path: _test.go
47+
paths:
48+
- third_party$
49+
- builtin$
50+
- examples$
51+
issues:
52+
max-issues-per-linter: 50
53+
max-same-issues: 0
54+
formatters:
55+
enable:
56+
- gci
57+
- gofmt
58+
- gofumpt
59+
- goimports
60+
settings:
61+
gci:
62+
sections:
63+
- standard
64+
- default
65+
- prefix(github.com/leaseweb/cloudstack-csi-driver)
66+
goimports:
67+
local-prefixes:
68+
- github.com/leaseweb/cloudstack-csi-driver
69+
exclusions:
70+
generated: lax
71+
paths:
72+
- third_party$
73+
- builtin$
74+
- examples$

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ BIN_DIR ?= bin
2828
GO_INSTALL := ./hack/go_install.sh
2929

3030
GOLANGCI_LINT_BIN := golangci-lint
31-
GOLANGCI_LINT_VER := v1.64.8
31+
GOLANGCI_LINT_VER := v2.7.2
3232
GOLANGCI_LINT := $(abspath $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER))
33-
GOLANGCI_LINT_PKG := github.com/golangci/golangci-lint/cmd/golangci-lint
33+
GOLANGCI_LINT_PKG := github.com/golangci/golangci-lint/v2/cmd/golangci-lint
3434

3535
MOCKGEN_BIN := mockgen
36-
MOCKGEN_VER := v0.5.2
36+
MOCKGEN_VER := v0.6.0
3737
MOCKGEN := $(abspath $(TOOLS_BIN_DIR)/$(MOCKGEN_BIN)-$(MOCKGEN_VER))
3838
MOCKGEN_PKG := go.uber.org/mock/mockgen
3939

@@ -102,7 +102,7 @@ test-sanity:
102102
setup-external-e2e: test/e2e/e2e.test test/e2e/ginkgo
103103

104104
test/e2e/e2e.test test/e2e/ginkgo:
105-
curl --location https://dl.k8s.io/v1.33.3/kubernetes-test-linux-amd64.tar.gz | \
105+
curl --location https://dl.k8s.io/v1.34.2/kubernetes-test-linux-amd64.tar.gz | \
106106
tar --strip-components=3 -C test/e2e -zxf - kubernetes/test/bin/e2e.test kubernetes/test/bin/ginkgo
107107

108108
.PHONY: test-e2e

cmd/cloudstack-csi-driver/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.22
1+
FROM alpine:3.23
22

33
LABEL \
44
org.opencontainers.image.description="CloudStack CSI driver" \

cmd/cloudstack-csi-sc-syncer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.22
1+
FROM alpine:3.23
22

33
LABEL \
44
org.opencontainers.image.description="CloudStack disk offering to Kubernetes storage class syncer" \

deploy/k8s/controller-deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ spec:
100100
allowPrivilegeEscalation: false
101101

102102
- name: external-provisioner
103-
image: registry.k8s.io/sig-storage/csi-provisioner:v5.3.0
103+
image: registry.k8s.io/sig-storage/csi-provisioner:v6.1.1
104104
imagePullPolicy: IfNotPresent
105105
args:
106106
- "--v=4"
@@ -128,7 +128,7 @@ spec:
128128
allowPrivilegeEscalation: false
129129

130130
- name: external-attacher
131-
image: registry.k8s.io/sig-storage/csi-attacher:v4.9.0
131+
image: registry.k8s.io/sig-storage/csi-attacher:v4.10.0
132132
imagePullPolicy: IfNotPresent
133133
args:
134134
- "--v=4"
@@ -153,7 +153,7 @@ spec:
153153
allowPrivilegeEscalation: false
154154

155155
- name: external-resizer
156-
image: registry.k8s.io/sig-storage/csi-resizer:v1.14.0
156+
image: registry.k8s.io/sig-storage/csi-resizer:v2.0.0
157157
args:
158158
- "--v=5"
159159
- "--csi-address=$(ADDRESS)"
@@ -178,7 +178,7 @@ spec:
178178
allowPrivilegeEscalation: false
179179

180180
- name: liveness-probe
181-
image: registry.k8s.io/sig-storage/livenessprobe:v2.16.0
181+
image: registry.k8s.io/sig-storage/livenessprobe:v2.17.0
182182
args:
183183
- "--v=4"
184184
- "--csi-address=$(ADDRESS)"

deploy/k8s/node-daemonset.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ spec:
9393
privileged: true
9494

9595
- name: node-driver-registrar
96-
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.14.0
96+
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.15.0
9797
imagePullPolicy: IfNotPresent
9898
args:
9999
- "--csi-address=$(ADDRESS)"
@@ -134,7 +134,7 @@ spec:
134134
allowPrivilegeEscalation: false
135135

136136
- name: liveness-probe
137-
image: registry.k8s.io/sig-storage/livenessprobe:v2.16.0
137+
image: registry.k8s.io/sig-storage/livenessprobe:v2.17.0
138138
imagePullPolicy: IfNotPresent
139139
args:
140140
- "--v=4"

deploy/k8s/rbac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ rules:
2828
resources: ["leases"]
2929
verbs: ["get", "watch", "list", "delete", "update", "create"]
3030
- apiGroups: ["storage.k8s.io"]
31-
resources: ["storageclasses", "csinodes"]
31+
resources: ["storageclasses", "csinodes", "volumeattributesclasses"]
3232
verbs: ["get", "list", "watch"]
3333
- apiGroups: ["storage.k8s.io"]
3434
resources: ["volumeattachments"]

go.mod

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,82 +3,84 @@ module github.com/leaseweb/cloudstack-csi-driver
33
go 1.24.0
44

55
require (
6-
github.com/apache/cloudstack-go/v2 v2.17.1
7-
github.com/container-storage-interface/spec v1.10.0
6+
github.com/apache/cloudstack-go/v2 v2.19.0
7+
github.com/container-storage-interface/spec v1.12.0
88
github.com/golang/mock v1.6.0
99
github.com/hashicorp/go-uuid v1.0.3
10-
github.com/kubernetes-csi/csi-test/v5 v5.3.1
10+
github.com/kubernetes-csi/csi-test/v5 v5.4.0
1111
github.com/spf13/pflag v1.0.7
12-
github.com/stretchr/testify v1.10.0
13-
go.uber.org/mock v0.5.2
14-
golang.org/x/sys v0.34.0
15-
golang.org/x/text v0.27.0
16-
google.golang.org/grpc v1.68.1
12+
github.com/stretchr/testify v1.11.1
13+
go.uber.org/mock v0.6.0
14+
golang.org/x/sys v0.35.0
15+
golang.org/x/text v0.28.0
16+
google.golang.org/grpc v1.72.1
1717
gopkg.in/gcfg.v1 v1.2.3
18-
k8s.io/api v0.33.3
19-
k8s.io/apimachinery v0.33.3
20-
k8s.io/client-go v0.33.3
21-
k8s.io/component-base v0.33.3
18+
k8s.io/api v0.34.3
19+
k8s.io/apimachinery v0.34.3
20+
k8s.io/client-go v0.34.3
21+
k8s.io/component-base v0.34.3
2222
k8s.io/klog/v2 v2.130.1
23-
k8s.io/mount-utils v0.33.3
24-
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
23+
k8s.io/mount-utils v0.34.3
24+
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
2525
)
2626

2727
require (
2828
github.com/beorn7/perks v1.0.1 // indirect
2929
github.com/blang/semver/v4 v4.0.0 // indirect
3030
github.com/cespare/xxhash/v2 v2.3.0 // indirect
3131
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
32-
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
33-
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
32+
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
33+
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
3434
github.com/go-logr/logr v1.4.2 // indirect
3535
github.com/go-logr/zapr v1.3.0 // indirect
3636
github.com/go-openapi/jsonpointer v0.21.0 // indirect
3737
github.com/go-openapi/jsonreference v0.20.2 // indirect
3838
github.com/go-openapi/swag v0.23.0 // indirect
3939
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
4040
github.com/gogo/protobuf v1.3.2 // indirect
41-
github.com/google/gnostic-models v0.6.9 // indirect
41+
github.com/google/gnostic-models v0.7.0 // indirect
4242
github.com/google/go-cmp v0.7.0 // indirect
43-
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
43+
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
4444
github.com/google/uuid v1.6.0 // indirect
4545
github.com/inconshreveable/mousetrap v1.1.0 // indirect
4646
github.com/josharian/intern v1.0.0 // indirect
4747
github.com/json-iterator/go v1.1.12 // indirect
4848
github.com/mailru/easyjson v0.7.7 // indirect
4949
github.com/moby/sys/mountinfo v0.7.2 // indirect
5050
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
51-
github.com/modern-go/reflect2 v1.0.2 // indirect
51+
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
5252
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
53-
github.com/onsi/ginkgo/v2 v2.21.0 // indirect
54-
github.com/onsi/gomega v1.35.1 // indirect
53+
github.com/onsi/ginkgo/v2 v2.22.0 // indirect
54+
github.com/onsi/gomega v1.36.1 // indirect
5555
github.com/pkg/errors v0.9.1 // indirect
5656
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
5757
github.com/prometheus/client_golang v1.22.0 // indirect
5858
github.com/prometheus/client_model v0.6.1 // indirect
5959
github.com/prometheus/common v0.62.0 // indirect
6060
github.com/prometheus/procfs v0.15.1 // indirect
61-
github.com/spf13/cobra v1.8.1 // indirect
61+
github.com/spf13/cobra v1.9.1 // indirect
6262
github.com/x448/float16 v0.8.4 // indirect
63-
go.opentelemetry.io/otel v1.33.0 // indirect
64-
go.opentelemetry.io/otel/trace v1.33.0 // indirect
63+
go.opentelemetry.io/otel v1.35.0 // indirect
64+
go.opentelemetry.io/otel/trace v1.35.0 // indirect
6565
go.uber.org/multierr v1.11.0 // indirect
6666
go.uber.org/zap v1.27.0 // indirect
67-
golang.org/x/net v0.41.0 // indirect
67+
go.yaml.in/yaml/v2 v2.4.2 // indirect
68+
go.yaml.in/yaml/v3 v3.0.4 // indirect
69+
golang.org/x/net v0.43.0 // indirect
6870
golang.org/x/oauth2 v0.27.0 // indirect
69-
golang.org/x/term v0.32.0 // indirect
71+
golang.org/x/term v0.34.0 // indirect
7072
golang.org/x/time v0.9.0 // indirect
71-
golang.org/x/tools v0.34.0 // indirect
72-
google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect
73+
golang.org/x/tools v0.36.0 // indirect
74+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect
7375
google.golang.org/protobuf v1.36.5 // indirect
7476
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
7577
gopkg.in/inf.v0 v0.9.1 // indirect
7678
gopkg.in/warnings.v0 v0.1.2 // indirect
7779
gopkg.in/yaml.v2 v2.4.0 // indirect
7880
gopkg.in/yaml.v3 v3.0.1 // indirect
79-
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
80-
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
81+
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
82+
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
8183
sigs.k8s.io/randfill v1.0.0 // indirect
82-
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
83-
sigs.k8s.io/yaml v1.4.0 // indirect
84+
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
85+
sigs.k8s.io/yaml v1.6.0 // indirect
8486
)

0 commit comments

Comments
 (0)