Skip to content

Commit 74e8df1

Browse files
committed
chore: prepare for release
adressed review comments and cleaned up CHANGELOG etc. to prepare for stable release
1 parent cbcd901 commit 74e8df1

File tree

9 files changed

+1212
-72
lines changed

9 files changed

+1212
-72
lines changed

CHANGELOG.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
## unreleased
2-
3-
## v3.5.7-rc2 - 2025.12.23
42
* Minimum supported Kubernetes version is now 1.28.
5-
* add volume locks to avoid concurrent operations on the same volume
6-
* add detection if symlinks don't add up to the right volume
7-
* increase logging once more
8-
9-
## v3.5.7-rc1 - 2025.12.17
10-
* Adjust udevadm calls & reorder them, and put them behind a mutex to avoid a potential race condition
11-
* Improve logging by adding debug logs
3+
* upgrade all sidecars to latest version
4+
* please note the RBAC changes as a result of this upgrade
5+
* fix race conditions on stage/unstage/publish/unpublish volume
6+
* add volume locks to avoid concurrent operations on the same volume
7+
* add detection if symlinks don't add up to the right volume
8+
* Adjust udevadm calls & reorder them, and put them behind a mutex to avoid a potential race condition
129
* Add `--log-level=(trace|debug|info|warn|error)` flag to customize log level
1310

1411
## v3.5.6 - 2024.04.18

Makefile

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,6 @@ helm-template:
9595
@helm template csi-cloudscale -n kube-system --set nameOverride=csi-cloudscale ./charts/csi-cloudscale
9696

9797
## Development tooling
98-
GOBIN=$(shell go env GOPATH)/bin
99-
GOLANGCI_LINT_VER=v2.8.0
100-
101-
golangci-lint: $(GOBIN)/golangci-lint-$(GOLANGCI_LINT_VER) ## installs golangci-lint if not yet installed
102-
ln -sf $(GOBIN)/golangci-lint-$(GOLANGCI_LINT_VER) $(GOBIN)/golangci-lint
103-
golangci-lint --version
104-
$(GOBIN)/golangci-lint-$(GOLANGCI_LINT_VER):
105-
curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $(GOBIN) $(GOLANGCI_LINT_VER)
106-
mv $(GOBIN)/golangci-lint $(GOBIN)/golangci-lint-$(GOLANGCI_LINT_VER)
10798

10899
fmt: ## Run go fmt against code.
109100
go fmt ./...
@@ -112,5 +103,5 @@ vet: ## Run go vet against code.
112103
go vet ./...
113104

114105
.PHONY: lint
115-
lint: fmt vet golangci-lint ## Combined target to run linters
116-
golangci-lint run --timeout 2m0s ./...
106+
lint: fmt vet ## Combined target to run linters
107+
go tool -modfile tool.mod golangci-lint run --timeout 2m0s ./...

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,18 @@ We recommend using the latest cloudscale.ch CSI driver compatible with your Kube
8585
| 1.21 | v2.0.0 | v3.5.2 |
8686
| 1.22 | v3.1.0 | v3.5.2 |
8787
| 1.23 | v3.1.0 | v3.5.2 |
88-
| 1.24 | v3.1.0 | v3.5.7-rc2 |
89-
| 1.25 | v3.3.0 | v3.5.7-rc2 |
90-
| 1.26 | v3.3.0 | v3.5.7-rc2 |
91-
| 1.27 | v3.3.0 | v3.5.7-rc2 |
92-
| 1.28 | v3.3.0 | v3.5.7-rc2 |
93-
| 1.29 | v3.3.0 | v3.5.7-rc2 |
94-
| 1.30 | v3.3.0 | v3.5.7-rc2 |
95-
| 1.31 | v3.3.0 | v3.5.6 |
96-
| 1.32 | v3.3.0 | v3.5.6 |
97-
| 1.33 | v3.3.0 | v3.5.6 |
98-
| 1.34 [1] | v3.3.0 | v3.5.6 |
99-
| 1.35 | v3.4.1 | v3.5.6 |
88+
| 1.24 | v3.1.0 | v3.5.6 |
89+
| 1.25 | v3.3.0 | v3.5.6 |
90+
| 1.26 | v3.3.0 | v3.5.6 |
91+
| 1.27 | v3.3.0 | v3.5.6 |
92+
| 1.28 | v3.3.0 | v3.5.7-rc2 |
93+
| 1.29 | v3.3.0 | v3.5.7-rc2 |
94+
| 1.30 | v3.3.0 | v3.5.7-rc2 |
95+
| 1.31 | v3.3.0 | v3.5.7-rc2 |
96+
| 1.32 | v3.3.0 | v3.5.7-rc2 |
97+
| 1.33 | v3.3.0 | v3.5.7-rc2 |
98+
| 1.34 [1] | v3.3.0 | v3.5.7-rc2 |
99+
| 1.35 | v3.4.1 | v3.5.7-rc2 |
100100

101101
[1] Prometheus `kubelet_volume_stats_*` metrics not available in 1.34.0 and 1.34.1 due to a
102102
[bug in Kubelet](https://github.com/kubernetes/kubernetes/issues/133847). Fixed in `1.34.2`.

charts/csi-cloudscale/templates/daemonset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
role: csi-cloudscale
1616
spec:
1717
priorityClassName: system-node-critical
18-
serviceAccount: {{ include "csi-cloudscale.node-service-account-name" . }}
18+
serviceAccountName: {{ include "csi-cloudscale.node-service-account-name" . }}
1919
hostNetwork: true
2020
containers:
2121
- name: csi-node-driver-registrar

charts/csi-cloudscale/templates/rbac.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ rules:
1818
verbs: ["list", "watch", "create", "update", "patch"]
1919
- apiGroups: ["snapshot.storage.k8s.io"]
2020
resources: ["volumesnapshots"]
21-
verbs: ["get", "list"]
21+
verbs: [ "get", "list", "watch", "update" ]
2222
- apiGroups: ["snapshot.storage.k8s.io"]
2323
resources: ["volumesnapshotcontents"]
2424
verbs: ["get", "list"]
@@ -40,9 +40,6 @@ rules:
4040
- apiGroups: [""]
4141
resources: ["persistentvolumes"]
4242
verbs: ["get", "list", "watch", "update", "patch"]
43-
- apiGroups: [""]
44-
resources: ["nodes"]
45-
verbs: ["get", "list", "watch"]
4643
- apiGroups: ["storage.k8s.io"]
4744
resources: ["csinodes"]
4845
verbs: ["get", "list", "watch"]
@@ -64,12 +61,18 @@ rules:
6461
- apiGroups: [""]
6562
resources: ["persistentvolumeclaims"]
6663
verbs: ["get", "list", "watch"]
64+
- apiGroups: [""]
65+
resources: ["pods"]
66+
verbs: ["get", "list", "watch"]
6767
- apiGroups: [""]
6868
resources: ["persistentvolumeclaims/status"]
6969
verbs: ["update", "patch"]
7070
- apiGroups: [""]
7171
resources: ["events"]
7272
verbs: ["list", "watch", "create", "update", "patch"]
73+
- apiGroups: ["storage.k8s.io"]
74+
resources: ["volumeattributesclasses"]
75+
verbs: ["get", "list", "watch"]
7376
---
7477
kind: ClusterRole
7578
apiVersion: rbac.authorization.k8s.io/v1

driver/mounter.go

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -226,24 +226,25 @@ func (m *mounter) Mount(source, target, fsType string, luksContext LuksContext,
226226
source = luksSource
227227
}
228228

229-
// Resolve source symlink for debug logging
230-
resolvedSource, resolveErr := filepath.EvalSymlinks(source)
231-
if resolveErr != nil {
232-
m.log.WithFields(logrus.Fields{
233-
"source": source,
234-
"target": target,
235-
"fs_type": fsType,
236-
"options": options,
237-
"resolve_error": resolveErr,
238-
}).Debug("Mount: failed to resolve source symlink")
239-
} else {
240-
m.log.WithFields(logrus.Fields{
241-
"source": source,
242-
"resolved_source": resolvedSource,
243-
"target": target,
244-
"fs_type": fsType,
245-
"options": options,
246-
}).Debug("Mount: resolved source device")
229+
if m.log.Logger.IsLevelEnabled(logrus.DebugLevel) {
230+
resolvedSource, resolveErr := filepath.EvalSymlinks(source)
231+
if resolveErr != nil {
232+
m.log.WithFields(logrus.Fields{
233+
"source": source,
234+
"target": target,
235+
"fs_type": fsType,
236+
"options": options,
237+
"resolve_error": resolveErr,
238+
}).Debug("Mount: failed to resolve source symlink")
239+
} else {
240+
m.log.WithFields(logrus.Fields{
241+
"source": source,
242+
"resolved_source": resolvedSource,
243+
"target": target,
244+
"fs_type": fsType,
245+
"options": options,
246+
}).Debug("Mount: resolved source device")
247+
}
247248
}
248249

249250
m.log.WithFields(logrus.Fields{

driver/node.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ package driver
2020
import (
2121
"context"
2222
"os"
23-
"path/filepath"
2423
"strconv"
2524

2625
"github.com/container-storage-interface/spec/lib/go/csi"
@@ -80,22 +79,6 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe
8079
"device_path": source,
8180
}).Info("successfully found attached volume_id at device_path")
8281

83-
// Debug logging to help diagnose potential race conditions with concurrent volume mounts
84-
resolvedSource, resolveErr := filepath.EvalSymlinks(source)
85-
if resolveErr != nil {
86-
d.log.WithFields(logrus.Fields{
87-
"volume_id": req.VolumeId,
88-
"source": source,
89-
"resolve_error": resolveErr,
90-
}).Debug("failed to resolve source symlink")
91-
} else {
92-
d.log.WithFields(logrus.Fields{
93-
"volume_id": req.VolumeId,
94-
"source_symlink": source,
95-
"resolved_device": resolvedSource,
96-
}).Debug("resolved source device path")
97-
}
98-
9982
publishContext := req.GetPublishContext()
10083
if publishContext == nil {
10184
return nil, status.Error(codes.InvalidArgument, "PublishContext must be provided")

0 commit comments

Comments
 (0)