Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
52585ba
Add hajiler to owners
hajiler May 30, 2025
72c74a3
Release 1.20 cut details for v1.20.0
cemakd Jun 13, 2025
b8b0251
Merge pull request #2113 from cemakd/readme
k8s-ci-robot Jun 16, 2025
a9a2d90
Added support for NVME Hyperdisks on Windows Nodes
ivanLeont Jun 17, 2025
6760775
Remove check on snapshot create support for multi-writer HyperDisk-HA…
sumanthsuresh1117 Jun 25, 2025
28f5cc8
Merge pull request #2116 from sumanthsuresh1117/hd-ha-mw-fix
k8s-ci-robot Jun 26, 2025
ff18b2a
Add c4d to gen4 attach limit list
hajiler Jun 30, 2025
9e6526a
Merge pull request #2120 from hajiler/attach-limit-fix-branch
k8s-ci-robot Jul 1, 2025
c6dc114
Merge branch 'kubernetes-sigs:master' into master
ivanLeont Jul 1, 2025
302d4d7
Removed the skip for the specific resize error
ivanLeont Jul 1, 2025
8aed19b
Merge pull request #2114 from ivanLeont/master
julianKatz Jul 1, 2025
d1ae089
fix: update Hyperdisk attach limits to match GCP documentation for Ge…
arsiesys Jul 9, 2025
cb6ce0f
Merge pull request #2127 from arsiesys/fix/hyperdisk-limits
k8s-ci-robot Jul 10, 2025
afcd757
Merge pull request #2104 from hajiler/owners-branch
k8s-ci-robot Jul 10, 2025
d6e553a
dafult data cache enabled to false
Sneha-at Jun 12, 2025
0c47cf9
Merge pull request #2112 from Sneha-at/fix_data_cache_bug
k8s-ci-robot Jul 23, 2025
6f42a4e
Add attach limits for C3 Baremetal and A4X + A4X-Max machine types
davis-haba Jul 29, 2025
fc87592
Add attach limits for C3 Baremetal and A4X + A4X-Max machine types
davis-haba Jul 29, 2025
0a5a8bd
Add attach limits for C3 Baremetal and A4X + A4X-Max machine types
davis-haba Jul 29, 2025
77181ad
Merge pull request #2138 from davis-haba/npi-attach-limits
k8s-ci-robot Jul 29, 2025
f7caaf4
fix ci
carlory Jul 31, 2025
1ee5505
Revert the image path change to what it was an increment patch version
cemakd Jul 31, 2025
6cc1805
Merge pull request #2140 from cemakd/fix-image
k8s-ci-robot Jul 31, 2025
82a4f6c
Merge pull request #2139 from carlory/fix-ci
k8s-ci-robot Aug 1, 2025
3b30777
Bump the golang-x group across 1 directory with 8 updates
dependabot[bot] Aug 4, 2025
319c8fe
Merge pull request #2131 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Aug 8, 2025
6b7e63f
Replace Get operations with polling and skip VAC tests during integra…
prachirp Aug 6, 2025
b40d677
Merge pull request #2144 from prachirp/wait
k8s-ci-robot Aug 11, 2025
ecb1237
Bump the k8s-dependencies group across 1 directory with 6 updates
dependabot[bot] Aug 11, 2025
4063949
Bump golang from 1.24.3 to 1.24.6
dependabot[bot] Aug 11, 2025
fdbf9a4
Merge pull request #2119 from kubernetes-sigs/dependabot/go_modules/k…
k8s-ci-robot Aug 11, 2025
6ab8758
Bump the golang-x group with 6 updates
dependabot[bot] Aug 11, 2025
275f224
Merge pull request #2147 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Aug 12, 2025
ef68087
Merge pull request #2148 from kubernetes-sigs/dependabot/docker/golan…
k8s-ci-robot Aug 12, 2025
26c608f
Fix partial cache tail latency by correcting the cache chunk size cal…
cemakd Sep 23, 2025
b585ad7
Add unit test to fetchChucnkSizeKiB
cemakd Sep 23, 2025
f753762
Merge pull request #2177 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Sep 24, 2025
571542b
pkg/common/utils.go: update regionalLocationFmt for Europe with 10+ r…
JordanP Jun 26, 2025
23c22b0
Add unit test
JordanP Jun 26, 2025
e8d43fb
Added filtering for incorrect slo boosting logs
chrisThePattyEater Jun 27, 2025
7ed2e9e
Update org policy violation check
dannawang0221 Jul 15, 2025
701707d
Cache devices and their symlinks in node driver, periodically noting …
julianKatz May 21, 2025
e3a190b
Some doc comment updates
julianKatz May 21, 2025
7d2a679
Add unit tests
julianKatz May 21, 2025
1536109
improve partition unit test
julianKatz May 21, 2025
31cf787
Log on removal as well
julianKatz May 21, 2025
081f515
Updated unit tests to be clearer, relying on asserting linkCache
julianKatz May 21, 2025
e55114a
Remove unused broken function
julianKatz May 21, 2025
9b5c15d
Move partition checking into the inner linkcache type. This makes it …
julianKatz May 23, 2025
e5ec0ce
Log when linkcache Run is triggered
julianKatz May 23, 2025
1183e64
New implementation that is hooked into nodestage/unstage. Just linux …
julianKatz Jun 6, 2025
c925927
Made a no-op windows implementation of the linkcache package
julianKatz May 28, 2025
b4b0c25
Made test device caches in node_test.go
julianKatz Jun 6, 2025
97c89a5
Fix sanity test
julianKatz Jun 6, 2025
7de39b8
Only warn on failure to create cache
julianKatz Jul 2, 2025
66b522a
Only warn on windows instantiation
julianKatz Jul 2, 2025
ecbda6b
Make non-implemented on windows an info
julianKatz Jul 2, 2025
38851a9
Improved some error messages to provide better test failure feedback
julianKatz Jul 2, 2025
45dd677
Always print helpful logs in failing area
julianKatz Jul 2, 2025
ffba111
Remove now unnecessary corp-helper when running from cloudtop
julianKatz Jul 3, 2025
5e6dcb5
Only run device cache if successfully created
julianKatz Jul 3, 2025
7612520
Replace verbosities
julianKatz Jul 3, 2025
ee9172a
Add nil checks around the usage of the device cache
cemakd Aug 5, 2025
b281364
Add support for NVMe disk types by using deviceutils
cemakd Aug 7, 2025
e6c9004
Merge pull request #2185 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Sep 30, 2025
25095b3
Merge pull request #2181 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Oct 1, 2025
a00c59a
Add NodeStageVolume disk size validation before mounting
hajiler Sep 25, 2025
c2fe2e7
Flag protect disk validation
hajiler Sep 26, 2025
c42bf4c
Merge pull request #2201 from hajiler/automated-cherry-pick-of-#2178-…
k8s-ci-robot Oct 15, 2025
c2010bf
Merge pull request #2180 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Oct 20, 2025
db5f1ba
UPSTREAM: <carry>: Add OpenShift files
jsafrane Nov 8, 2023
9c4723a
UPSTREAM: <carry>: Updating ose-gcp-pd-csi-driver-container image to …
Sep 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build_root_image:
name: release
namespace: openshift
tag: rhel-9-release-golang-1.24-openshift-4.21
40 changes: 0 additions & 40 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

53 changes: 0 additions & 53 deletions .github/dependabot.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# References:
# https://docs.snyk.io/scan-applications/snyk-code/using-snyk-code-from-the-cli/excluding-directories-and-files-from-the-snyk-code-cli-test
# https://docs.snyk.io/snyk-cli/commands/ignore
exclude:
global:
- vendor/**
- release-tools/**
- test/**
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM --platform=$BUILDPLATFORM golang:1.24.3 AS builder
FROM --platform=$BUILDPLATFORM golang:1.24.6 AS builder

ARG STAGINGVERSION
ARG TARGETPLATFORM
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.Windows
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

ARG BASE_IMAGE
FROM --platform=$BUILDPLATFORM golang:1.24.3 AS builder
FROM --platform=$BUILDPLATFORM golang:1.24.6 AS builder

ARG TARGETPLATFORM
ARG STAGINGVERSION
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.debug
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.24.3 as builder
FROM golang:1.24.6 as builder
WORKDIR /go/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver
ADD . .

Expand Down
18 changes: 18 additions & 0 deletions Dockerfile.openshift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.24-openshift-4.21 AS builder
WORKDIR /go/src/github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver
COPY . .
# Skip Windows driver build
RUN make gce-pd-driver

FROM registry.ci.openshift.org/ocp/4.21:base-rhel9

# Get all deps
# nvme-cli and /usr/bin/xxd are deps of google_nvme_id
RUN yum update -y && \
yum install --setopt=tsflags=nodocs -y e2fsprogs xfsprogs util-linux nvme-cli /usr/lib/udev/scsi_id /usr/bin/xxd && \
yum clean all && rm -rf /var/cache/yum/* && \
mkdir -p /lib/udev_containerized && cp /usr/lib/udev/scsi_id /lib/udev_containerized/scsi_id # The driver assumes this path

COPY --from=builder /go/src/github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/bin/gce-pd-csi-driver /usr/bin/
COPY --from=builder /go/src/github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/deploy/kubernetes/udev/google_nvme_id /lib/udev_containerized/google_nvme_id
ENTRYPOINT ["/usr/bin/gce-pd-csi-driver"]
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ endif
all: gce-pd-driver gce-pd-driver-windows
gce-pd-driver: require-GCE_PD_CSI_STAGING_VERSION
mkdir -p bin
CGO_ENABLED=0 go build -mod=vendor -gcflags=$(GCFLAGS) -ldflags "-extldflags=static -X main.version=$(STAGINGVERSION)" -o bin/${DRIVERBINARY} ./cmd/gce-pd-csi-driver/
# OpenShift carry: remove -extldflags=static to compile with FIPS OpenSSL
CGO_ENABLED=0 go build -mod=vendor -gcflags=$(GCFLAGS) -ldflags "-X main.version=$(STAGINGVERSION)" -o bin/${DRIVERBINARY} ./cmd/gce-pd-csi-driver/

gce-pd-driver-windows: require-GCE_PD_CSI_STAGING_VERSION
ifeq (${GOARCH}, amd64)
Expand Down
25 changes: 2 additions & 23 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
reviewers:
- amacaskill
- leiyiz
- mattcary
- msau42
- saikat-royc
- sunnylovestiramisu
- pwschuurman
- tyuchn
- tonyzhc
- juliankatz
approvers:
- amacaskill
- leiyiz
- mattcary
- msau42
- saikat-royc
- sunnylovestiramisu
- pwschuurman
- tyuchn
emeritus_reviewers:
- davidz627
- jingxu97
- saad-ali
- openshift-storage-maintainers
component: "Storage / Kubernetes External Components"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lifecycle of Google Compute Engine Persistent Disks.
## Project Status

Status: GA
Latest stable image: `registry.k8s.io/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver:v1.17.2`
Latest stable image: `registry.k8s.io/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver:v1.20.0`

### Test Status

Expand Down
36 changes: 20 additions & 16 deletions cmd/gce-pd-csi-driver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
gce "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/gce-cloud-provider/compute"
metadataservice "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/gce-cloud-provider/metadata"
driver "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/gce-pd-csi-driver"
"sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/linkcache"
"sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/metrics"
mountmanager "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/mount-manager"
)
Expand All @@ -57,10 +58,10 @@ var (
attachDiskBackoffJitter = flag.Float64("attach-disk-backoff-jitter", 0.0, "Jitter for attachDisk backoff")
attachDiskBackoffSteps = flag.Int("attach-disk-backoff-steps", 24, "Steps for attachDisk backoff")
attachDiskBackoffCap = flag.Duration("attach-disk-backoff-cap", 0, "Cap for attachDisk backoff")
waitForOpBackoffDuration = flag.Duration("wait-op-backoff-duration", 3*time.Second, "Duration for wait for operation backoff")
waitForOpBackoffDuration = flag.Duration("wait-op-backoff-duration", 2*time.Minute, "Duration for wait for operation backoff")
waitForOpBackoffFactor = flag.Float64("wait-op-backoff-factor", 0.0, "Factor for wait for operation backoff")
waitForOpBackoffJitter = flag.Float64("wait-op-backoff-jitter", 0.0, "Jitter for wait for operation backoff")
waitForOpBackoffSteps = flag.Int("wait-op-backoff-steps", 100, "Steps for wait for operation backoff")
waitForOpBackoffSteps = flag.Int("wait-op-backoff-steps", 3, "Steps for wait for operation backoff")
waitForOpBackoffCap = flag.Duration("wait-op-backoff-cap", 0, "Cap for wait for operation backoff")

enableDeviceInUseCheck = flag.Bool("enable-device-in-use-check-on-node-unstage", true, "If set to true, block NodeUnstageVolume requests until the specified device is not in use")
Expand Down Expand Up @@ -97,6 +98,10 @@ var (

diskTopology = flag.Bool("disk-topology", false, "If set to true, the driver will add a disk-type.gke.io/[disk-type] topology label when the StorageClass has the use-allowed-disk-topology parameter set to true. That topology label is included in the Topologies returned in CreateVolumeResponse. This flag is disabled by default.")

diskCacheSyncPeriod = flag.Duration("disk-cache-sync-period", 10*time.Minute, "Period for the disk cache to check the /dev/disk/by-id/ directory and evaluate the symlinks")

enableDiskSizeValidation = flag.Bool("enable-disk-size-validation", false, "If set to true, the driver will validate that the requested disk size is matches the physical disk size. This flag is disabled by default.")

version string
)

Expand Down Expand Up @@ -248,7 +253,8 @@ func handle() {
maxBackoffDuration := time.Duration(*errorBackoffMaxDurationMs) * time.Millisecond
// TODO(2042): Move more of the constructor args into this struct
args := &driver.GCEControllerServerArgs{
EnableDiskTopology: *diskTopology,
EnableDiskTopology: *diskTopology,
EnableDiskSizeValidation: *enableDiskSizeValidation,
}

controllerServer = driver.NewControllerServer(gceDriver, cloudProvider, initialBackoffDuration, maxBackoffDuration, fallbackRequisiteZones, *enableStoragePoolsFlag, *enableDataCacheFlag, multiZoneVolumeHandleConfig, listVolumesConfig, provisionableDisksConfig, *enableHdHAFlag, args)
Expand All @@ -270,11 +276,18 @@ func handle() {
if err != nil {
klog.Fatalf("Failed to set up metadata service: %v", err.Error())
}
isDataCacheEnabledNodePool, err := isDataCacheEnabledNodePool(ctx, *nodeName)
isDataCacheEnabledNodePool, err := driver.IsDataCacheEnabledNodePool(ctx, *nodeName, *enableDataCacheFlag)
if err != nil {
klog.Fatalf("Failed to get node info from API server: %v", err.Error())
}

deviceCache, err := linkcache.NewDeviceCacheForNode(ctx, *diskCacheSyncPeriod, *nodeName, driverName, deviceUtils)
if err != nil {
klog.Warningf("Failed to create device cache: %v", err.Error())
} else {
go deviceCache.Run(ctx)
}

// TODO(2042): Move more of the constructor args into this struct
nsArgs := &driver.NodeServerArgs{
EnableDeviceInUseCheck: *enableDeviceInUseCheck,
Expand All @@ -283,6 +296,7 @@ func handle() {
DataCacheEnabledNodePool: isDataCacheEnabledNodePool,
SysfsPath: "/sys",
MetricsManager: metricsManager,
DeviceCache: deviceCache,
}
nodeServer = driver.NewNodeServer(gceDriver, mounter, deviceUtils, meta, statter, nsArgs)

Expand All @@ -297,9 +311,10 @@ func handle() {
if err := setupDataCache(ctx, *nodeName, nodeServer.MetadataService.GetName()); err != nil {
klog.Errorf("Data Cache setup failed: %v", err)
}
go driver.StartWatcher(*nodeName)
go driver.StartWatcher(ctx, *nodeName)
}
}

}

err = gceDriver.SetupGCEDriver(driverName, version, extraVolumeLabels, extraTags, identityServer, controllerServer, nodeServer)
Expand Down Expand Up @@ -381,17 +396,6 @@ func urlFlag(target **url.URL, name string, usage string) {
})
}

func isDataCacheEnabledNodePool(ctx context.Context, nodeName string) (bool, error) {
if !*enableDataCacheFlag {
return false, nil
}
if len(nodeName) > 0 && nodeName != common.TestNode { // disregard logic below when E2E testing.
dataCacheLSSDCount, err := driver.GetDataCacheCountFromNodeLabel(ctx, nodeName)
return dataCacheLSSDCount != 0, err
}
return true, nil
}

func fetchLssdsForRaiding(lssdCount int) ([]string, error) {
allLssds, err := driver.FetchAllLssds()
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions deploy/kubernetes/base/controller/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ spec:
- "--supports-dynamic-iops-provisioning=hyperdisk-balanced,hyperdisk-extreme"
- "--supports-dynamic-throughput-provisioning=hyperdisk-balanced,hyperdisk-throughput,hyperdisk-ml"
- --enable-data-cache
- --run-node-service=false
- --enable-multitenancy
command:
- /gce-pd-csi-driver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ metadata:
imageTag:
name: registry.k8s.io/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver
newName: gcr.io/k8s-staging-cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver
newTag: "v1.17.12"
newTag: "v1.20.0"
---

7 changes: 3 additions & 4 deletions deploy/kubernetes/images/stable-master/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ metadata:
name: imagetag-gcepd-driver
imageTag:
name: gke.gcr.io/gcp-compute-persistent-disk-csi-driver
# Don't change stable image without changing pdImagePlaceholder in
# test/k8s-integration/main.go
newName: us-central1-docker.pkg.dev/enginakdemir-gke-dev/csi-dev/gcp-compute-persistent-disk-csi-driver
newTag: "latest"
# pdImagePlaceholder in test/k8s-integration/main.go is updated automatically with the newTag
newName: registry.k8s.io/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver
newTag: "v1.17.4"
---

29 changes: 15 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@ require (
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.35.0
go.opentelemetry.io/otel/sdk v1.35.0
golang.org/x/oauth2 v0.30.0
golang.org/x/sys v0.33.0
golang.org/x/time v0.11.0
golang.org/x/sys v0.35.0
golang.org/x/time v0.12.0
google.golang.org/api v0.187.0
google.golang.org/genproto v0.0.0-20240624140628-dc46fd24d27d
google.golang.org/grpc v1.71.0
google.golang.org/protobuf v1.36.6
gopkg.in/gcfg.v1 v1.2.3
k8s.io/api v0.33.1
k8s.io/apimachinery v0.33.1
k8s.io/api v0.33.3
k8s.io/apimachinery v0.33.3
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
k8s.io/cloud-provider v0.33.1
k8s.io/component-base v0.33.1
k8s.io/cloud-provider v0.33.3
k8s.io/component-base v0.33.3
k8s.io/klog/v2 v2.130.1
k8s.io/mount-utils v0.33.1
k8s.io/mount-utils v0.33.3
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
sigs.k8s.io/boskos v0.0.0-20220711194915-6cb8a6fb2dd1
sigs.k8s.io/yaml v1.4.0
sigs.k8s.io/yaml v1.6.0
)

require (
Expand Down Expand Up @@ -97,13 +97,14 @@ require (
go.opentelemetry.io/otel/metric v1.35.0 // indirect
go.opentelemetry.io/otel/trace v1.35.0 // indirect
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
golang.org/x/crypto v0.38.0 // indirect
golang.org/x/net v0.40.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/term v0.32.0 // indirect
golang.org/x/text v0.25.0 // indirect
golang.org/x/tools v0.33.0 // indirect
golang.org/x/crypto v0.41.0 // indirect
golang.org/x/net v0.42.0 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/term v0.34.0 // indirect
golang.org/x/text v0.28.0 // indirect
golang.org/x/tools v0.35.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
Expand Down
Loading