Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4b99c3e
Update controller deployment to latest version
Jainbrt Aug 25, 2025
c8ea0a2
Bump github.com/mailru/easyjson from 0.9.0 to 0.9.1
dependabot[bot] Oct 22, 2025
95bb5ea
Parse go version from release-tools
jsafrane Nov 25, 2025
5ea38fb
Merge commit '392c180d823c0f134109e1d67e325c14b9d8cdab' into trivy-pa…
jsafrane Nov 25, 2025
392c180
Squashed 'release-tools/' changes from 74502e544..8d1258cce
jsafrane Nov 25, 2025
1a53590
Bump golang.org/x/crypto
jsafrane Nov 25, 2025
2c37c1c
Merge pull request #1350 from jsafrane/trivy-parse-go2
k8s-ci-robot Nov 27, 2025
034bd67
Bump actions/checkout from 5 to 6
dependabot[bot] Nov 27, 2025
7a8e386
common-controller: fix stale `VolumeGroupSnapshotHandle` in `VolumeSn…
black-dragon74 Dec 10, 2025
8b3588a
common-controller: fix empty `VolumeSnapshotRef.UID` in `VolumeSnapsh…
black-dragon74 Dec 10, 2025
7dd22e0
Merge pull request #1354 from black-dragon74/fix-empty-resources
k8s-ci-robot Dec 11, 2025
4565815
Merge commit '7c8c7ff949a45b2550ec17a4c7a6f3d45acec901' into cleanup/…
mowangdk Dec 13, 2025
7c8c7ff
Squashed 'release-tools/' changes from 8d1258cce..b12e407cc
mowangdk Dec 13, 2025
5ce60f5
Merge pull request #1356 from mowangdk/cleanup/bump_up_release_tools
k8s-ci-robot Dec 15, 2025
31867ca
Merge pull request #1346 from kubernetes-csi/dependabot/github_action…
k8s-ci-robot Dec 15, 2025
69189f5
Merge pull request #1335 from kubernetes-csi/dependabot/go_modules/gi…
k8s-ci-robot Dec 15, 2025
e0717d9
Bump up csi-lib-utils to v1.23
mowangdk Dec 13, 2025
ff42a66
Use common flags within csi-lib-utils
mowangdk Dec 14, 2025
e97c1e4
fix: group snapshot not taken on conflict
Jan 6, 2026
9567ce4
Merge pull request #1359 from Phaow/fix-1357
k8s-ci-robot Jan 8, 2026
6bf89ce
Merge pull request #1322 from Jainbrt/830update
k8s-ci-robot Jan 8, 2026
10de1b4
Merge pull request #1355 from mowangdk/feature/use_common_flags
k8s-ci-robot Jan 8, 2026
757ce82
Update controller deployment to latest 8.4.0
Jainbrt Jan 9, 2026
e859f61
Merge commit '9a4c0979103f07a1b8b2edfc115af1d3d7b16295' into k8s-1.35…
dfajmon Jan 13, 2026
9a4c097
Squashed 'release-tools/' changes from b12e407cc..707a99eca
dfajmon Jan 13, 2026
0f66948
Bump k8s dependencies to v1.35.0
dfajmon Jan 13, 2026
e6029cb
Merge pull request #1363 from dfajmon/k8s-1.35.0-bump
k8s-ci-robot Jan 14, 2026
f41acfd
Merge pull request #1362 from Jainbrt/master
k8s-ci-robot Feb 3, 2026
e036d75
Squashed 'release-tools/' changes from 707a99eca..1e81e752e
jsafrane Feb 6, 2026
3141846
Merge commit 'e036d75715b511279d0e5b864bad269ff8378b19' into go-1.25.7
jsafrane Feb 6, 2026
b85dcf9
Merge pull request #1376 from jsafrane/go-1.25.7
k8s-ci-robot Feb 6, 2026
7fc2b56
Bump the k8s-dependencies group across 1 directory with 2 updates
dependabot[bot] Feb 9, 2026
4c06413
Bump the github-dependencies group across 1 directory with 16 updates
dependabot[bot] Feb 9, 2026
3da54e9
Merge pull request #1379 from kubernetes-csi/dependabot/go_modules/gi…
k8s-ci-robot Feb 11, 2026
eaecfbf
Merge pull request #1378 from kubernetes-csi/dependabot/go_modules/k8…
k8s-ci-robot Feb 11, 2026
9371474
Add changelog to v8.5.0
xing-yang Feb 12, 2026
5aab051
Merge pull request #1380 from xing-yang/changelog_8.5
k8s-ci-robot Feb 12, 2026
35314d1
Merge remote-tracking branch 'openshift/master' into rebase-v8.5.0
dfajmon Mar 9, 2026
1744a8c
UPSTREAM: <carry>: Add OpenShift files
jsafrane Nov 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
130 changes: 130 additions & 0 deletions CHANGELOG/CHANGELOG-8.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Release notes for v8.5.0

[Documentation](https://kubernetes-csi.github.io)

# Changelog since v8.4.0

## Changes by Kind

### Bug or Regression

- Updated go version to fix CVE-2025-68121. ([#1376](https://github.com/kubernetes-csi/external-snapshotter/pull/1376), [@jsafrane](https://github.com/jsafrane))

### Other (Cleanup or Flake)

- Bump k8s dependencies to v1.35.0 ([#1363](https://github.com/kubernetes-csi/external-snapshotter/pull/1363), [@dfajmon](https://github.com/dfajmon))

## Dependencies

### Added
- github.com/Masterminds/semver/v3: [v3.4.0](https://github.com/Masterminds/semver/tree/v3.4.0)
- github.com/cenkalti/backoff/v5: [v5.0.3](https://github.com/cenkalti/backoff/tree/v5.0.3)
- github.com/go-openapi/swag/cmdutils: [v0.25.4](https://github.com/go-openapi/swag/tree/cmdutils/v0.25.4)
- github.com/go-openapi/swag/conv: [v0.25.4](https://github.com/go-openapi/swag/tree/conv/v0.25.4)
- github.com/go-openapi/swag/fileutils: [v0.25.4](https://github.com/go-openapi/swag/tree/fileutils/v0.25.4)
- github.com/go-openapi/swag/jsonname: [v0.25.4](https://github.com/go-openapi/swag/tree/jsonname/v0.25.4)
- github.com/go-openapi/swag/jsonutils/fixtures_test: [v0.25.4](https://github.com/go-openapi/swag/tree/jsonutils/fixtures_test/v0.25.4)
- github.com/go-openapi/swag/jsonutils: [v0.25.4](https://github.com/go-openapi/swag/tree/jsonutils/v0.25.4)
- github.com/go-openapi/swag/loading: [v0.25.4](https://github.com/go-openapi/swag/tree/loading/v0.25.4)
- github.com/go-openapi/swag/mangling: [v0.25.4](https://github.com/go-openapi/swag/tree/mangling/v0.25.4)
- github.com/go-openapi/swag/netutils: [v0.25.4](https://github.com/go-openapi/swag/tree/netutils/v0.25.4)
- github.com/go-openapi/swag/stringutils: [v0.25.4](https://github.com/go-openapi/swag/tree/stringutils/v0.25.4)
- github.com/go-openapi/swag/typeutils: [v0.25.4](https://github.com/go-openapi/swag/tree/typeutils/v0.25.4)
- github.com/go-openapi/swag/yamlutils: [v0.25.4](https://github.com/go-openapi/swag/tree/yamlutils/v0.25.4)
- github.com/go-openapi/testify/enable/yaml/v2: [v2.0.2](https://github.com/go-openapi/testify/tree/enable/yaml/v2/v2.0.2)
- github.com/go-openapi/testify/v2: [v2.0.2](https://github.com/go-openapi/testify/tree/v2.0.2)
- golang.org/x/tools/go/expect: v0.1.1-deprecated
- golang.org/x/tools/go/packages/packagestest: v0.1.1-deprecated
- gonum.org/v1/gonum: v0.16.0

### Changed
- cel.dev/expr: v0.24.0 → v0.25.1
- cloud.google.com/go/compute/metadata: v0.6.0 → v0.9.0
- github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp: [v1.26.0 → v1.30.0](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/compare/detectors/gcp/v1.26.0...detectors/gcp/v1.30.0)
- github.com/alecthomas/units: [b94a6e3 → 0f3dac3](https://github.com/alecthomas/units/compare/b94a6e3...0f3dac3)
- github.com/antlr4-go/antlr/v4: [v4.13.0 → v4.13.1](https://github.com/antlr4-go/antlr/compare/v4.13.0...v4.13.1)
- github.com/cncf/xds/go: [2f00578 → 0feb691](https://github.com/cncf/xds/compare/2f00578...0feb691)
- github.com/coreos/go-systemd/v22: [v22.5.0 → v22.7.0](https://github.com/coreos/go-systemd/compare/v22.5.0...v22.7.0)
- github.com/emicklei/go-restful/v3: [v3.12.2 → v3.13.0](https://github.com/emicklei/go-restful/compare/v3.12.2...v3.13.0)
- github.com/envoyproxy/go-control-plane/envoy: [v1.32.4 → v1.35.0](https://github.com/envoyproxy/go-control-plane/compare/envoy/v1.32.4...envoy/v1.35.0)
- github.com/envoyproxy/go-control-plane: [v0.13.4 → 75eaa19](https://github.com/envoyproxy/go-control-plane/compare/v0.13.4...75eaa19)
- github.com/evanphx/json-patch: [v5.9.0+incompatible → v5.9.11+incompatible](https://github.com/evanphx/json-patch/compare/v5.9.0...v5.9.11)
- github.com/go-jose/go-jose/v4: [v4.0.4 → v4.1.3](https://github.com/go-jose/go-jose/compare/v4.0.4...v4.1.3)
- github.com/go-logr/logr: [v1.4.2 → v1.4.3](https://github.com/go-logr/logr/compare/v1.4.2...v1.4.3)
- github.com/go-openapi/jsonpointer: [v0.21.0 → v0.22.4](https://github.com/go-openapi/jsonpointer/compare/v0.21.0...v0.22.4)
- github.com/go-openapi/jsonreference: [v0.21.0 → v0.21.4](https://github.com/go-openapi/jsonreference/compare/v0.21.0...v0.21.4)
- github.com/go-openapi/swag: [v0.23.0 → v0.25.4](https://github.com/go-openapi/swag/compare/v0.23.0...v0.25.4)
- github.com/godbus/dbus/v5: [v5.0.4 → v5.1.0](https://github.com/godbus/dbus/compare/v5.0.4...v5.1.0)
- github.com/golang-jwt/jwt/v5: [v5.2.2 → v5.3.0](https://github.com/golang-jwt/jwt/compare/v5.2.2...v5.3.0)
- github.com/golang/glog: [v1.2.4 → v1.2.5](https://github.com/golang/glog/compare/v1.2.4...v1.2.5)
- github.com/google/cel-go: [v0.26.0 → v0.27.0](https://github.com/google/cel-go/compare/v0.26.0...v0.27.0)
- github.com/google/gnostic-models: [v0.7.0 → v0.7.1](https://github.com/google/gnostic-models/compare/v0.7.0...v0.7.1)
- github.com/google/pprof: [40e02aa → 27863c8](https://github.com/google/pprof/compare/40e02aa...27863c8)
- github.com/grpc-ecosystem/grpc-gateway/v2: [v2.26.3 → v2.27.7](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.26.3...v2.27.7)
- github.com/kubernetes-csi/csi-lib-utils: [v0.22.0 → v0.23.1](https://github.com/kubernetes-csi/csi-lib-utils/compare/v0.22.0...v0.23.1)
- github.com/onsi/ginkgo/v2: [v2.22.0 → v2.27.2](https://github.com/onsi/ginkgo/compare/v2.22.0...v2.27.2)
- github.com/onsi/gomega: [v1.36.1 → v1.38.2](https://github.com/onsi/gomega/compare/v1.36.1...v1.38.2)
- github.com/prometheus/client_golang: [v1.22.0 → v1.23.2](https://github.com/prometheus/client_golang/compare/v1.22.0...v1.23.2)
- github.com/prometheus/client_model: [v0.6.1 → v0.6.2](https://github.com/prometheus/client_model/compare/v0.6.1...v0.6.2)
- github.com/prometheus/common: [v0.62.0 → v0.67.5](https://github.com/prometheus/common/compare/v0.62.0...v0.67.5)
- github.com/prometheus/procfs: [v0.15.1 → v0.19.2](https://github.com/prometheus/procfs/compare/v0.15.1...v0.19.2)
- github.com/rogpeppe/go-internal: [v1.13.1 → v1.14.1](https://github.com/rogpeppe/go-internal/compare/v1.13.1...v1.14.1)
- github.com/spf13/cobra: [v1.9.1 → v1.10.2](https://github.com/spf13/cobra/compare/v1.9.1...v1.10.2)
- github.com/spf13/pflag: [v1.0.6 → v1.0.10](https://github.com/spf13/pflag/compare/v1.0.6...v1.0.10)
- github.com/spiffe/go-spiffe/v2: [v2.5.0 → v2.6.0](https://github.com/spiffe/go-spiffe/compare/v2.5.0...v2.6.0)
- github.com/stretchr/testify: [v1.10.0 → v1.11.1](https://github.com/stretchr/testify/compare/v1.10.0...v1.11.1)
- go.etcd.io/bbolt: v1.4.2 → v1.4.3
- go.etcd.io/etcd/api/v3: v3.6.4 → v3.6.7
- go.etcd.io/etcd/client/pkg/v3: v3.6.4 → v3.6.7
- go.etcd.io/etcd/client/v3: v3.6.4 → v3.6.7
- go.etcd.io/etcd/pkg/v3: v3.6.4 → v3.6.5
- go.etcd.io/etcd/server/v3: v3.6.4 → v3.6.5
- go.opentelemetry.io/auto/sdk: v1.1.0 → v1.2.1
- go.opentelemetry.io/contrib/detectors/gcp: v1.34.0 → v1.38.0
- go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc: v0.60.0 → v0.65.0
- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp: v0.58.0 → v0.65.0
- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc: v1.34.0 → v1.40.0
- go.opentelemetry.io/otel/exporters/otlp/otlptrace: v1.34.0 → v1.40.0
- go.opentelemetry.io/otel/metric: v1.35.0 → v1.40.0
- go.opentelemetry.io/otel/sdk/metric: v1.34.0 → v1.40.0
- go.opentelemetry.io/otel/sdk: v1.34.0 → v1.40.0
- go.opentelemetry.io/otel/trace: v1.35.0 → v1.40.0
- go.opentelemetry.io/otel: v1.35.0 → v1.40.0
- go.opentelemetry.io/proto/otlp: v1.5.0 → v1.9.0
- go.uber.org/zap: v1.27.0 → v1.27.1
- go.yaml.in/yaml/v2: v2.4.2 → v2.4.3
- golang.org/x/crypto: v0.37.0 → v0.47.0
- golang.org/x/exp: 8a7402a → 716be56
- golang.org/x/mod: v0.21.0 → v0.32.0
- golang.org/x/net: v0.39.0 → v0.49.0
- golang.org/x/oauth2: v0.27.0 → v0.35.0
- golang.org/x/sync: v0.13.0 → v0.19.0
- golang.org/x/sys: v0.32.0 → v0.41.0
- golang.org/x/term: v0.31.0 → v0.39.0
- golang.org/x/text: v0.24.0 → v0.33.0
- golang.org/x/time: v0.9.0 → v0.14.0
- golang.org/x/tools: v0.28.0 → v0.41.0
- google.golang.org/genproto/googleapis/api: a0af3ef → 8636f87
- google.golang.org/genproto/googleapis/rpc: a0af3ef → 8636f87
- google.golang.org/grpc: v1.72.1 → v1.78.0
- google.golang.org/protobuf: v1.36.5 → v1.36.11
- gopkg.in/evanphx/json-patch.v4: v4.12.0 → v4.13.0
- k8s.io/api: v0.34.0 → v0.35.0
- k8s.io/apiextensions-apiserver: v0.34.0 → v0.35.0
- k8s.io/apimachinery: v0.34.0 → v0.35.0
- k8s.io/apiserver: v0.34.0 → v0.35.0
- k8s.io/client-go: v0.34.0 → v0.35.0
- k8s.io/code-generator: v0.34.0 → v0.35.0
- k8s.io/component-base: v0.34.0 → v0.35.0
- k8s.io/component-helpers: v0.34.0 → v0.35.0
- k8s.io/gengo/v2: 85fd79d → ec3ebc5
- k8s.io/kms: v0.34.0 → v0.35.0
- k8s.io/kube-openapi: f3f2b99 → 4e65d59
- k8s.io/utils: 4c0f3b2 → 914a6e7
- sigs.k8s.io/apiserver-network-proxy/konnectivity-client: v0.31.2 → v0.34.0
- sigs.k8s.io/json: cfa47c3 → 2d32026
- sigs.k8s.io/structured-merge-diff/v4: v4.6.0 → v4.4.1
- sigs.k8s.io/structured-merge-diff/v6: v6.3.0 → v6.3.1

### Removed
- github.com/zeebo/errs: [v1.4.0](https://github.com/zeebo/errs/tree/v1.4.0)
79 changes: 21 additions & 58 deletions cmd/csi-snapshotter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import (
klog "k8s.io/klog/v2"

"github.com/container-storage-interface/spec/lib/go/csi"
libconfig "github.com/kubernetes-csi/csi-lib-utils/config"
"github.com/kubernetes-csi/csi-lib-utils/connection"
"github.com/kubernetes-csi/csi-lib-utils/leaderelection"
"github.com/kubernetes-csi/csi-lib-utils/metrics"
Expand Down Expand Up @@ -74,28 +75,13 @@ const (

// Command line flags
var (
kubeconfig = flag.String("kubeconfig", "", "Absolute path to the kubeconfig file. Required only when running out of cluster.")
csiAddress = flag.String("csi-address", "/run/csi/socket", "Address of the CSI driver socket.")
resyncPeriod = flag.Duration("resync-period", 15*time.Minute, "Resync interval of the controller. Default is 15 minutes")
snapshotNamePrefix = flag.String("snapshot-name-prefix", "snapshot", "Prefix to apply to the name of a created snapshot")
snapshotNameUUIDLength = flag.Int("snapshot-name-uuid-length", -1, "Length in characters for the generated uuid of a created snapshot. Defaults behavior is to NOT truncate.")
showVersion = flag.Bool("version", false, "Show version.")
threads = flag.Int("worker-threads", 10, "Number of worker threads.")
csiTimeout = flag.Duration("timeout", defaultCSITimeout, "The timeout for any RPCs to the CSI driver. Default is 1 minute.")
extraCreateMetadata = flag.Bool("extra-create-metadata", false, "If set, add snapshot metadata to plugin snapshot requests as parameters.")

leaderElection = flag.Bool("leader-election", false, "Enables leader election.")
leaderElectionNamespace = flag.String("leader-election-namespace", "", "The namespace where the leader election resource exists. Defaults to the pod namespace if not set.")
leaderElectionLeaseDuration = flag.Duration("leader-election-lease-duration", 15*time.Second, "Duration, in seconds, that non-leader candidates will wait to force acquire leadership. Defaults to 15 seconds.")
leaderElectionRenewDeadline = flag.Duration("leader-election-renew-deadline", 10*time.Second, "Duration, in seconds, that the acting leader will retry refreshing leadership before giving up. Defaults to 10 seconds.")
leaderElectionRetryPeriod = flag.Duration("leader-election-retry-period", 5*time.Second, "Duration, in seconds, the LeaderElector clients should wait between tries of actions. Defaults to 5 seconds.")

kubeAPIQPS = flag.Float64("kube-api-qps", 5, "QPS to use while communicating with the kubernetes apiserver. Defaults to 5.0.")
kubeAPIBurst = flag.Int("kube-api-burst", 10, "Burst to use while communicating with the kubernetes apiserver. Defaults to 10.")

metricsAddress = flag.String("metrics-address", "", "(deprecated) The TCP network address where the prometheus metrics endpoint will listen (example: `:8080`). The default is empty string, which means metrics endpoint is disabled. Only one of `--metrics-address` and `--http-endpoint` can be set.")
httpEndpoint = flag.String("http-endpoint", "", "The TCP network address where the HTTP server for diagnostics, including metrics and leader election health check, will listen (example: `:8080`). The default is empty string, which means the server is disabled. Only one of `--metrics-address` and `--http-endpoint` can be set.")
metricsPath = flag.String("metrics-path", "/metrics", "The HTTP path where prometheus metrics will be exposed. Default is `/metrics`.")
retryIntervalStart = flag.Duration("retry-interval-start", time.Second, "Initial retry interval of failed volume snapshot creation or deletion. It doubles with each failure, up to retry-interval-max. Default is 1 second.")
retryIntervalMax = flag.Duration("retry-interval-max", 5*time.Minute, "Maximum retry interval of failed volume snapshot creation or deletion. Default is 5 minutes.")
enableNodeDeployment = flag.Bool("node-deployment", false, "Enables deploying the sidecar controller together with a CSI driver on nodes to manage snapshots for node-local volumes.")
Expand All @@ -119,6 +105,7 @@ func main() {
logsapi.AddGoFlags(c, flag.CommandLine)
logs.InitLogs()
standardflags.AddAutomaxprocs(klog.Infof)
standardflags.RegisterCommonFlags(flag.CommandLine)
flag.Parse()
if err := logsapi.ValidateAndApply(c, fg); err != nil {
klog.ErrorS(err, "LoggingConfiguration is invalid")
Expand All @@ -129,28 +116,25 @@ func main() {
klog.Fatal("Error while parsing feature gates: ", err)
}

if *showVersion {
if standardflags.Configuration.ShowVersion {
fmt.Println(os.Args[0], version)
os.Exit(0)
}
klog.InfoS("Version", "version", version)

// If distributed snapshotting is enabled and leaderElection is also set to true, return
if *enableNodeDeployment && *leaderElection {
if *enableNodeDeployment && standardflags.Configuration.LeaderElection {
klog.Error("Leader election cannot happen when node-deployment is set to true")
os.Exit(1)
}

// Create the client config. Use kubeconfig if given, otherwise assume in-cluster.
config, err := buildConfig(*kubeconfig)
config, err := libconfig.BuildConfig(standardflags.Configuration.KubeConfig, standardflags.Configuration)
if err != nil {
klog.Error(err.Error())
os.Exit(1)
}

config.QPS = (float32)(*kubeAPIQPS)
config.Burst = *kubeAPIBurst

coreConfig := rest.CopyConfig(config)
coreConfig.ContentType = runtime.ContentTypeProtobuf
kubeClient, err := kubernetes.NewForConfig(coreConfig)
Expand Down Expand Up @@ -184,21 +168,21 @@ func main() {
// Add Snapshot types to the default Kubernetes so events can be logged for them
snapshotscheme.AddToScheme(scheme.Scheme)

if *metricsAddress != "" && *httpEndpoint != "" {
if standardflags.Configuration.MetricsAddress != "" && standardflags.Configuration.HttpEndpoint != "" {
klog.Error("only one of `--metrics-address` and `--http-endpoint` can be set.")
os.Exit(1)
}
addr := *metricsAddress
addr := standardflags.Configuration.MetricsAddress
if addr == "" {
addr = *httpEndpoint
addr = standardflags.Configuration.HttpEndpoint
}

// Connect to CSI.
metricsManager := metrics.NewCSIMetricsManager("" /* driverName */)
ctx := context.Background()
csiConn, err := connection.Connect(
ctx,
*csiAddress,
standardflags.Configuration.CSIAddress,
metricsManager,
connection.OnConnectionLoss(connection.ExitOnConnectionLoss()))
if err != nil {
Expand Down Expand Up @@ -226,13 +210,13 @@ func main() {
// Prepare http endpoint for metrics + leader election healthz
mux := http.NewServeMux()
if addr != "" {
metricsManager.RegisterToServer(mux, *metricsPath)
metricsManager.RegisterToServer(mux, standardflags.Configuration.MetricsPath)
metricsManager.SetDriverName(driverName)
go func() {
klog.Infof("ServeMux listening at %q", addr)
err := http.ListenAndServe(addr, mux)
if err != nil {
klog.Fatalf("Failed to start HTTP server at specified address (%q) and metrics path (%q): %s", addr, *metricsPath, err)
klog.Fatalf("Failed to start HTTP server at specified address (%q) and metrics path (%q): %s", addr, standardflags.Configuration.MetricsPath, err)
}
}()
}
Expand Down Expand Up @@ -261,7 +245,7 @@ func main() {
os.Exit(1)
}

klog.V(2).Infof("Start NewCSISnapshotSideCarController with snapshotter [%s] kubeconfig [%s] csiTimeout [%+v] csiAddress [%s] resyncPeriod [%+v] snapshotNamePrefix [%s] snapshotNameUUIDLength [%d]", driverName, *kubeconfig, *csiTimeout, *csiAddress, *resyncPeriod, *snapshotNamePrefix, snapshotNameUUIDLength)
klog.V(2).Infof("Start NewCSISnapshotSideCarController with snapshotter [%s] kubeconfig [%s] csiTimeout [%+v] csiAddress [%s] resyncPeriod [%+v] snapshotNamePrefix [%s] snapshotNameUUIDLength [%d]", driverName, standardflags.Configuration.KubeConfig, *csiTimeout, standardflags.Configuration.CSIAddress, *resyncPeriod, *snapshotNamePrefix, snapshotNameUUIDLength)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

In Go's fmt package, what output is produced when %dis used with a non-integer argument such as*int?

💡 Result:

Using %d with a non-integer such as *int produces a format error marker in the output:

  • General form: %!d(type=value)
  • Example for a pointer: fmt.Printf("%d", p)%!d(*int=0xc0000120a8) (address will vary) [1]

Source
[1] Go fmt package docs (“Format errors”: Wrong type or unknown verb: %!verb(type=value); example Printf("%d","hi")%!d(string=hi)). (pkg.go.dev)

Citations:


Dereference snapshotNameUUIDLength in this log call.

Line 248 passes the flag pointer to %d, which produces a format error marker like %!d(*int=...) instead of the actual integer value. Dereference it with *snapshotNameUUIDLength.

Proposed fix
-klog.V(2).Infof("Start NewCSISnapshotSideCarController with snapshotter [%s] kubeconfig [%s] csiTimeout [%+v] csiAddress [%s] resyncPeriod [%+v] snapshotNamePrefix [%s] snapshotNameUUIDLength [%d]", driverName, standardflags.Configuration.KubeConfig, *csiTimeout, standardflags.Configuration.CSIAddress, *resyncPeriod, *snapshotNamePrefix, snapshotNameUUIDLength)
+klog.V(2).Infof("Start NewCSISnapshotSideCarController with snapshotter [%s] kubeconfig [%s] csiTimeout [%+v] csiAddress [%s] resyncPeriod [%+v] snapshotNamePrefix [%s] snapshotNameUUIDLength [%d]", driverName, standardflags.Configuration.KubeConfig, *csiTimeout, standardflags.Configuration.CSIAddress, *resyncPeriod, *snapshotNamePrefix, *snapshotNameUUIDLength)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
klog.V(2).Infof("Start NewCSISnapshotSideCarController with snapshotter [%s] kubeconfig [%s] csiTimeout [%+v] csiAddress [%s] resyncPeriod [%+v] snapshotNamePrefix [%s] snapshotNameUUIDLength [%d]", driverName, standardflags.Configuration.KubeConfig, *csiTimeout, standardflags.Configuration.CSIAddress, *resyncPeriod, *snapshotNamePrefix, snapshotNameUUIDLength)
klog.V(2).Infof("Start NewCSISnapshotSideCarController with snapshotter [%s] kubeconfig [%s] csiTimeout [%+v] csiAddress [%s] resyncPeriod [%+v] snapshotNamePrefix [%s] snapshotNameUUIDLength [%d]", driverName, standardflags.Configuration.KubeConfig, *csiTimeout, standardflags.Configuration.CSIAddress, *resyncPeriod, *snapshotNamePrefix, *snapshotNameUUIDLength)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cmd/csi-snapshotter/main.go` at line 248, The log call using klog.V(2).Infof
passes the pointer snapshotNameUUIDLength to a %d formatter causing a format
error; update the klog.V(2).Infof invocation (the
NewCSISnapshotSideCarController startup log) to pass the dereferenced value
*snapshotNameUUIDLength instead of snapshotNameUUIDLength so the integer is
logged correctly.


snapShotter := snapshotter.NewSnapshotter(csiConn)
var groupSnapshotter group_snapshotter.GroupSnapshotter
Expand Down Expand Up @@ -354,37 +338,16 @@ func main() {
}
}

if !*leaderElection {
run(context.TODO())
} else {
lockName := fmt.Sprintf("%s-%s", prefix, strings.Replace(driverName, "/", "-", -1))
// Create a new clientset for leader election to prevent throttling
// due to snapshot sidecar
leClientset, err := kubernetes.NewForConfig(config)
if err != nil {
klog.Fatalf("failed to create leaderelection client: %v", err)
}
le := leaderelection.NewLeaderElection(leClientset, lockName, run)
if *httpEndpoint != "" {
le.PrepareHealthCheck(mux, leaderelection.DefaultHealthCheckTimeout)
}

if *leaderElectionNamespace != "" {
le.WithNamespace(*leaderElectionNamespace)
}

le.WithLeaseDuration(*leaderElectionLeaseDuration)
le.WithRenewDeadline(*leaderElectionRenewDeadline)
le.WithRetryPeriod(*leaderElectionRetryPeriod)
if utilfeature.DefaultFeatureGate.Enabled(features.ReleaseLeaderElectionOnExit) {
le.WithReleaseOnCancel(true)
le.WithContext(ctx)
}
leaderelection.RunWithLeaderElection(
ctx,
config,
standardflags.Configuration,
run,
fmt.Sprintf("%s-%s", prefix, strings.Replace(driverName, "/", "-", -1)),
mux,
utilfeature.DefaultFeatureGate.Enabled(features.ReleaseLeaderElectionOnExit),
)

if err := le.Run(); err != nil {
klog.Fatalf("failed to initialize leader election: %v", err)
}
}
}

func buildConfig(kubeconfig string) (*rest.Config, error) {
Expand Down
4 changes: 2 additions & 2 deletions deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ spec:
serviceAccountName: csi-snapshotter
containers:
- name: csi-provisioner
image: registry.k8s.io/sig-storage/csi-provisioner:v5.2.0
image: registry.k8s.io/sig-storage/csi-provisioner:v6.1.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify csi-provisioner v6.1.0 image tag exists
curl -s "https://registry.k8s.io/v2/sig-storage/csi-provisioner/tags/list" 2>/dev/null | grep -o '"v6\.1\.0"' || echo "Tag lookup requires authenticated access - manual verification recommended"

Repository: openshift/csi-external-snapshotter

Length of output: 152


🏁 Script executed:

cat -n deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml | sed -n '70,85p'

Repository: openshift/csi-external-snapshotter

Length of output: 689


🌐 Web query:

csi-provisioner v6.1.0 kubernetes release notes breaking changes

💡 Result:

csi-provisioner (external-provisioner) v6.1.0 — breaking changes / urgent notes

Breaking / urgent upgrade note

  • Minimum Kubernetes version: 1.34 (because of the storage/v1 VolumeAttributesClass API). Clusters below 1.34 are only supported via API emulation, and you must restart the provisioner once the emulated version is updated to 1.35. [1]

Other notable “watch out”

  • Topology support is marked “to be removed in the next release” (not a v6.1.0 break by itself, but relevant if you rely on topology-related behavior and plan to upgrade beyond 6.1.x). [1]

Changelog (what changed in 6.1.0)

  • No additional breaking changes called out; the release contains a bug fix (“Fixed infinite retry loop during provisioning if node was deleted in the meantime.”). [2]

Sources: [1], [2]


🌐 Web query:

kubernetes-csi csi-provisioner version 6.1.0 image available

💡 Result:

Yes—csi-provisioner v6.1.0 is published in the official Kubernetes registry as:

docker pull registry.k8s.io/sig-storage/csi-provisioner:v6.1.0

This pull reference is listed in the upstream kubernetes-csi/external-provisioner v6.1.0 release notes under “Container”. [1]

Sources:
[1] (github.com)

Citations:


Verify Kubernetes version compatibility for csi-provisioner v6.1.0 upgrade.

The image is available but requires Kubernetes 1.34+. The v6.1.0 release introduces a breaking change: it requires the storage/v1 VolumeAttributesClass API which is only available in Kubernetes 1.34 and later. Clusters running earlier versions are only supported via API emulation with a caveat: the provisioner must be restarted once the emulated version is updated to 1.35. Additionally, topology support is marked for removal in the next release—verify this aligns with your deployment requirements.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml` at line 75, The
manifest currently pins image:
registry.k8s.io/sig-storage/csi-provisioner:v6.1.0 which requires Kubernetes
1.34+ because v6.1.0 depends on the storage/v1 VolumeAttributesClass API and
also changes topology behavior; verify the cluster Kubernetes version and either
(a) retain v6.1.0 only for clusters >=1.34 or (b) pin to a compatible older tag
(e.g., a v6.0.x image) for clusters <1.34, and add a short manifest comment or
README note near the csi-provisioner image reference explaining the
VolumeAttributesClass (storage/v1) requirement and topology removal warning so
operators know to upgrade Kubernetes before using v6.1.0.

args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
Expand All @@ -84,7 +84,7 @@ spec:
- name: socket-dir
mountPath: /csi
- name: csi-snapshotter
image: registry.k8s.io/sig-storage/csi-snapshotter:v8.2.1
image: registry.k8s.io/sig-storage/csi-snapshotter:v8.4.0
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
serviceAccountName: snapshot-controller
containers:
- name: snapshot-controller
image: registry.k8s.io/sig-storage/snapshot-controller:v8.2.1
image: registry.k8s.io/sig-storage/snapshot-controller:v8.4.0
args:
- "--v=5"
- "--leader-election=true"
Expand Down
Loading