Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tonyzhc/gcp-compute-persistent-disk-csi-driver
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: kubernetes-sigs/gcp-compute-persistent-disk-csi-driver
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 9 commits
  • 13 files changed
  • 5 contributors

Commits on May 9, 2025

  1. Upgrade images

    hajiler committed May 9, 2025
    Copy the full SHA
    a4e8e3e View commit details

Commits on May 12, 2025

  1. Bump golang from 1.24.2 to 1.24.3

    Bumps golang from 1.24.2 to 1.24.3.
    
    ---
    updated-dependencies:
    - dependency-name: golang
      dependency-version: 1.24.3
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    dependabot[bot] authored May 12, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    cb2ad70 View commit details

Commits on May 19, 2025

  1. Bump the k8s-dependencies group with 5 updates

    Bumps the k8s-dependencies group with 5 updates:
    
    | Package | From | To |
    | --- | --- | --- |
    | [k8s.io/api](https://github.com/kubernetes/api) | `0.33.0` | `0.33.1` |
    | [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) | `0.33.0` | `0.33.1` |
    | [k8s.io/cloud-provider](https://github.com/kubernetes/cloud-provider) | `0.33.0` | `0.33.1` |
    | [k8s.io/component-base](https://github.com/kubernetes/component-base) | `0.33.0` | `0.33.1` |
    | [k8s.io/mount-utils](https://github.com/kubernetes/mount-utils) | `0.33.0` | `0.33.1` |
    
    
    Updates `k8s.io/api` from 0.33.0 to 0.33.1
    - [Commits](kubernetes/api@v0.33.0...v0.33.1)
    
    Updates `k8s.io/apimachinery` from 0.33.0 to 0.33.1
    - [Commits](kubernetes/apimachinery@v0.33.0...v0.33.1)
    
    Updates `k8s.io/cloud-provider` from 0.33.0 to 0.33.1
    - [Commits](kubernetes/cloud-provider@v0.33.0...v0.33.1)
    
    Updates `k8s.io/component-base` from 0.33.0 to 0.33.1
    - [Commits](kubernetes/component-base@v0.33.0...v0.33.1)
    
    Updates `k8s.io/mount-utils` from 0.33.0 to 0.33.1
    - [Commits](kubernetes/mount-utils@v0.33.0...v0.33.1)
    
    ---
    updated-dependencies:
    - dependency-name: k8s.io/api
      dependency-version: 0.33.1
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: k8s-dependencies
    - dependency-name: k8s.io/apimachinery
      dependency-version: 0.33.1
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: k8s-dependencies
    - dependency-name: k8s.io/cloud-provider
      dependency-version: 0.33.1
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: k8s-dependencies
    - dependency-name: k8s.io/component-base
      dependency-version: 0.33.1
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: k8s-dependencies
    - dependency-name: k8s.io/mount-utils
      dependency-version: 0.33.1
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: k8s-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    dependabot[bot] authored May 19, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    1c3f319 View commit details
  2. Merge pull request kubernetes-sigs#2087 from kubernetes-sigs/dependab…

    …ot/docker/golang-1.24.3
    
    Bump golang from 1.24.2 to 1.24.3
    k8s-ci-robot authored May 19, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e0cc9d9 View commit details

Commits on May 20, 2025

  1. Copy the full SHA
    424f732 View commit details

Commits on May 21, 2025

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    69effd6 View commit details
  2. Copy the full SHA
    10bb90a View commit details
  3. Merge pull request kubernetes-sigs#2096 from sunnylovestiramisu/attac…

    …hLimit
    
    Fix Gen4 Custom VM Cases
    k8s-ci-robot authored May 21, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    938ba73 View commit details

Commits on May 22, 2025

  1. Merge pull request kubernetes-sigs#2095 from kubernetes-sigs/dependab…

    …ot/go_modules/k8s-dependencies-6e172cedc7
    
    Bump the k8s-dependencies group with 5 updates
    k8s-ci-robot authored May 22, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    6cc4c0f View commit details
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

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

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

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

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

Original file line number Diff line number Diff line change
@@ -7,15 +7,15 @@ metadata:
name: imagetag-csi-provisioner-prow-rc
imageTag:
name: registry.k8s.io/sig-storage/csi-provisioner
newTag: "v5.1.0"
newTag: "v5.2.0"
---
apiVersion: builtin
kind: ImageTagTransformer
metadata:
name: imagetag-csi-attacher-prow-rc
imageTag:
name: registry.k8s.io/sig-storage/csi-attacher
newTag: "v4.4.3"
newTag: "v4.8.1"
---
apiVersion: builtin
kind: ImageTagTransformer
@@ -31,15 +31,15 @@ metadata:
name: imagetag-csi-snapshotter-prow-head
imageTag:
name: registry.k8s.io/sig-storage/csi-snapshotter
newTag: "v7.0.2"
newTag: "v8.2.1"
---
apiVersion: builtin
kind: ImageTagTransformer
metadata:
name: imagetag-csi-node-registrar-prow-rc
imageTag:
name: registry.k8s.io/sig-storage/csi-node-driver-registrar
newTag: "v2.9.3"
newTag: "v2.13.0"
---
apiVersion: builtin
kind: ImageTagTransformer
@@ -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.2"
newTag: "v1.17.12"
---

14 changes: 5 additions & 9 deletions deploy/kubernetes/images/stable-master/image.yaml
Original file line number Diff line number Diff line change
@@ -4,18 +4,16 @@ metadata:
name: imagetag-csi-provisioner
imageTag:
name: registry.k8s.io/sig-storage/csi-provisioner
newTag: "v5.1.0"

newTag: "v5.2.0"
---
apiVersion: builtin
kind: ImageTagTransformer
metadata:
name: imagetag-csi-attacher
imageTag:
name: registry.k8s.io/sig-storage/csi-attacher
newTag: "v4.4.3"
newTag: "v4.8.1"
---

apiVersion: builtin
kind: ImageTagTransformer
metadata:
@@ -24,25 +22,22 @@ imageTag:
name: registry.k8s.io/sig-storage/csi-resizer
newTag: "v1.13.2"
---

apiVersion: builtin
kind: ImageTagTransformer
metadata:
name: imagetag-csi-snapshotter
imageTag:
name: registry.k8s.io/sig-storage/csi-snapshotter
newTag: "v7.0.2"
newTag: "v8.2.1"
---

apiVersion: builtin
kind: ImageTagTransformer
metadata:
name: imagetag-csi-node-registrar
imageTag:
name: registry.k8s.io/sig-storage/csi-node-driver-registrar
newTag: "v2.9.3"
newTag: "v2.13.0"
---

apiVersion: builtin
kind: ImageTagTransformer
metadata:
@@ -53,3 +48,4 @@ imageTag:
newName: registry.k8s.io/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver
newTag: "v1.17.2"
---

13 changes: 7 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module sigs.k8s.io/gcp-compute-persistent-disk-csi-driver

go 1.23.0
go 1.24.0

toolchain go1.24.1

require (
@@ -31,13 +32,13 @@ require (
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.0
k8s.io/apimachinery v0.33.0
k8s.io/api v0.33.1
k8s.io/apimachinery v0.33.1
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
k8s.io/cloud-provider v0.33.0
k8s.io/component-base v0.33.0
k8s.io/cloud-provider v0.33.1
k8s.io/component-base v0.33.1
k8s.io/klog/v2 v2.130.1
k8s.io/mount-utils v0.33.0
k8s.io/mount-utils v0.33.1
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
sigs.k8s.io/boskos v0.0.0-20220711194915-6cb8a6fb2dd1
)
20 changes: 10 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
@@ -2489,8 +2489,8 @@ k8s.io/api v0.17.4/go.mod h1:5qxx6vjmwUVG2nHQTKGlLts8Tbok8PzHl4vHtVFuZCA=
k8s.io/api v0.17.6/go.mod h1:1jKVwkj0UZ4huak/yRt3MFfU5wc32+B41SkNN5HhyFg=
k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s=
k8s.io/api v0.32.2/go.mod h1:hKlhk4x1sJyYnHENsrdCWw31FEmCijNGPJO5WzHiJ6Y=
k8s.io/api v0.33.0 h1:yTgZVn1XEe6opVpP1FylmNrIFWuDqe2H0V8CT5gxfIU=
k8s.io/api v0.33.0/go.mod h1:CTO61ECK/KU7haa3qq8sarQ0biLq2ju405IZAd9zsiM=
k8s.io/api v0.33.1 h1:tA6Cf3bHnLIrUK4IqEgb2v++/GYUtqiu9sRVk3iBXyw=
k8s.io/api v0.33.1/go.mod h1:87esjTn9DRSRTD4fWMXamiXxJhpOIREjWOSjsW1kEHw=
k8s.io/apiextensions-apiserver v0.0.0-20190918201827-3de75813f604/go.mod h1:7H8sjDlWQu89yWB3FhZfsLyRCRLuoXoCoY5qtwW1q6I=
k8s.io/apiextensions-apiserver v0.16.4/go.mod h1:HYQwjujEkXmQNhap2C9YDdIVOSskGZ3et0Mvjcyjbto=
k8s.io/apiextensions-apiserver v0.17.2/go.mod h1:4KdMpjkEjjDI2pPfBA15OscyNldHWdBCfsWMDWAmSTs=
@@ -2513,8 +2513,8 @@ k8s.io/apimachinery v0.17.6/go.mod h1:Lg8zZ5iC/O8UjCqW6DNhcQG2m4TdjF9kwG3891OWbb
k8s.io/apimachinery v0.18.5/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko=
k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY=
k8s.io/apimachinery v0.32.2/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
k8s.io/apimachinery v0.33.0 h1:1a6kHrJxb2hs4t8EE5wuR/WxKDwGN1FKH3JvDtA0CIQ=
k8s.io/apimachinery v0.33.0/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
k8s.io/apimachinery v0.33.1 h1:mzqXWV8tW9Rw4VeW9rEkqvnxj59k1ezDUl20tFK/oM4=
k8s.io/apimachinery v0.33.1/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
k8s.io/apiserver v0.0.0-20190918200908-1e17798da8c1/go.mod h1:4FuDU+iKPjdsdQSN3GsEKZLB/feQsj1y9dhhBDVV2Ns=
k8s.io/apiserver v0.16.4/go.mod h1:kbLJOak655g6W7C+muqu1F76u9wnEycfKMqbVaXIdAc=
k8s.io/apiserver v0.17.0/go.mod h1:ABM+9x/prjINN6iiffRVNCBR2Wk7uY4z+EtEGZD48cg=
@@ -2528,8 +2528,8 @@ k8s.io/client-go v0.32.2 h1:4dYCD4Nz+9RApM2b/3BtVvBHw54QjMFUl1OLcJG5yOA=
k8s.io/client-go v0.32.2/go.mod h1:fpZ4oJXclZ3r2nDOv+Ux3XcJutfrwjKTCHz2H3sww94=
k8s.io/cloud-provider v0.17.0/go.mod h1:Ze4c3w2C0bRsjkBUoHpFi+qWe3ob1wI2/7cUn+YQIDE=
k8s.io/cloud-provider v0.17.4/go.mod h1:XEjKDzfD+b9MTLXQFlDGkk6Ho8SGMpaU8Uugx/KNK9U=
k8s.io/cloud-provider v0.33.0 h1:nVU2Q9QK7O50yaNx+pE61oDPqflsSsKygN43f5js9+I=
k8s.io/cloud-provider v0.33.0/go.mod h1:2reyEBbsimZJKHF325vxLBD5fcJGNeJHeLjJ+jGM8Qg=
k8s.io/cloud-provider v0.33.1 h1:nOmby9fIKCBJr9fNKXpLK5IBbS1snX82+JIxfxGvhI8=
k8s.io/cloud-provider v0.33.1/go.mod h1:2lvWqPsvBOzbtGWjGfVDX/ttpvSeI9ZdB8d4TbYnt9s=
k8s.io/code-generator v0.0.0-20190612205613-18da4a14b22b/go.mod h1:G8bQwmHm2eafm5bgtX67XDZQ8CWKSGu9DekI+yN4Y5I=
k8s.io/code-generator v0.0.0-20190831074504-732c9ca86353/go.mod h1:V5BD6M4CyaN5m+VthcclXWsVcT1Hu+glwa1bi3MIsyE=
k8s.io/code-generator v0.16.4/go.mod h1:mJUgkl06XV4kstAnLHAIzJPVCOzVR+ZcfPIv4fUsFCY=
@@ -2546,8 +2546,8 @@ k8s.io/component-base v0.17.2/go.mod h1:zMPW3g5aH7cHJpKYQ/ZsGMcgbsA/VyhEugF3QT1a
k8s.io/component-base v0.17.4/go.mod h1:5BRqHMbbQPm2kKu35v3G+CpVq4K0RJKC7TRioF0I9lE=
k8s.io/component-base v0.17.6/go.mod h1:jgRLWl0B0rOzFNtxQ9E4BphPmDqoMafujdau6AdG2Xo=
k8s.io/component-base v0.21.1/go.mod h1:NgzFZ2qu4m1juby4TnrmpR8adRk6ka62YdH5DkIIyKA=
k8s.io/component-base v0.33.0 h1:Ot4PyJI+0JAD9covDhwLp9UNkUja209OzsJ4FzScBNk=
k8s.io/component-base v0.33.0/go.mod h1:aXYZLbw3kihdkOPMDhWbjGCO6sg+luw554KP51t8qCU=
k8s.io/component-base v0.33.1 h1:EoJ0xA+wr77T+G8p6T3l4efT2oNwbqBVKR71E0tBIaI=
k8s.io/component-base v0.33.1/go.mod h1:guT/w/6piyPfTgq7gfvgetyXMIh10zuXA6cRRm3rDuY=
k8s.io/csi-translation-lib v0.17.0/go.mod h1:HEF7MEz7pOLJCnxabi45IPkhSsE/KmxPQksuCrHKWls=
k8s.io/csi-translation-lib v0.17.4/go.mod h1:CsxmjwxEI0tTNMzffIAcgR9lX4wOh6AKHdxQrT7L0oo=
k8s.io/gengo v0.0.0-20190116091435-f8a0810f38af/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
@@ -2591,8 +2591,8 @@ k8s.io/kubernetes v1.14.7/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
k8s.io/legacy-cloud-providers v0.17.0/go.mod h1:DdzaepJ3RtRy+e5YhNtrCYwlgyK87j/5+Yfp0L9Syp8=
k8s.io/legacy-cloud-providers v0.17.4/go.mod h1:FikRNoD64ECjkxO36gkDgJeiQWwyZTuBkhu+yxOc1Js=
k8s.io/metrics v0.17.2/go.mod h1:3TkNHET4ROd+NfzNxkjoVfQ0Ob4iZnaHmSEA4vYpwLw=
k8s.io/mount-utils v0.33.0 h1:hH6EcCcax4lFNIERaGMj6d7oGMW1qW3eTCwHUuLtLog=
k8s.io/mount-utils v0.33.0/go.mod h1:1JR4rKymg8B8bCPo618hpSAdrpO6XLh0Acqok/xVwPE=
k8s.io/mount-utils v0.33.1 h1:hodPhfyoK+gG0SgnYwx1iPrlnpaESZiJ9GFzF5V/imE=
k8s.io/mount-utils v0.33.1/go.mod h1:1JR4rKymg8B8bCPo618hpSAdrpO6XLh0Acqok/xVwPE=
k8s.io/test-infra v0.0.0-20181019233642-2e10a0bbe9b3/go.mod h1:2NzXB13Ji0nqpyublHeiPC4FZwU0TknfvyaaNfl/BTA=
k8s.io/test-infra v0.0.0-20191212060232-70b0b49fe247/go.mod h1:d8SKryJBXAwfCFVL4wieRez47J2NOOAb9d029sWLseQ=
k8s.io/test-infra v0.0.0-20200407001919-bc7f71ef65b8/go.mod h1:/WpJWcaDvuykB322WXP4kJbX8IpalOzuPxA62GpwkJk=
11 changes: 7 additions & 4 deletions pkg/gce-pd-csi-driver/controller_test.go
Original file line number Diff line number Diff line change
@@ -41,7 +41,6 @@ import (
"k8s.io/client-go/util/flowcontrol"
"k8s.io/klog/v2"
clock "k8s.io/utils/clock/testing"
"k8s.io/utils/strings/slices"

csi "github.com/container-storage-interface/spec/lib/go/csi"
"sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/common"
@@ -5016,7 +5015,7 @@ func TestPickZonesFromTopology(t *testing.T) {
if err == nil && tc.expErr {
t.Errorf("got no error, but expected error")
}
if !slices.Equal(gotZones, tc.expZones) {
if !zonesEqual(gotZones, tc.expZones) {
t.Errorf("Expected zones: %v, but got: %v", tc.expZones, gotZones)
}
}
@@ -5026,8 +5025,12 @@ func zonesEqual(gotZones, expectedZones []string) bool {
if len(gotZones) != len(expectedZones) {
return false
}
for i := 0; i < len(gotZones); i++ {
if gotZones[i] != expectedZones[i] {
gotSet := make(map[string]bool)
for _, zone := range gotZones {
gotSet[zone] = true
}
for _, zone := range expectedZones {
if !gotSet[zone] {
return false
}
}
20 changes: 13 additions & 7 deletions pkg/gce-pd-csi-driver/node.go
Original file line number Diff line number Diff line change
@@ -656,7 +656,9 @@ func (ns *GCENodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRe

volumeLimits, err := ns.GetVolumeLimits(ctx)
if err != nil {
klog.Errorf("GetVolumeLimits failed: %v", err.Error())
klog.Errorf("GetVolumeLimits failed: %v. The error is ignored so that the driver can register", err.Error())
// No error should be returned from NodeGetInfo, otherwise the driver will not register
err = nil
}

resp := &csi.NodeGetInfoResponse{
@@ -843,13 +845,17 @@ func (ns *GCENodeServer) GetVolumeLimits(ctx context.Context) (int64, error) {
gen4MachineTypesPrefix := []string{"c4a-", "c4-", "n4-"}
for _, gen4Prefix := range gen4MachineTypesPrefix {
if strings.HasPrefix(machineType, gen4Prefix) {
cpuString := machineType[strings.LastIndex(machineType, "-")+1:]
cpus, err := strconv.ParseInt(cpuString, 10, 64)
if err != nil {
return volumeLimitSmall, fmt.Errorf("invalid cpuString %s for machine type: %v", cpuString, machineType)
machineTypeSlice := strings.Split(machineType, "-")
if len(machineTypeSlice) > 2 {
cpuString := machineTypeSlice[2]
cpus, err := strconv.ParseInt(cpuString, 10, 64)
if err != nil {
return volumeLimitBig, fmt.Errorf("invalid cpuString %s for machine type: %v", cpuString, machineType)
}
return common.MapNumber(cpus), nil
} else {
return volumeLimitBig, fmt.Errorf("unconventional machine type: %v", machineType)
}
return common.MapNumber(cpus), nil

}
if strings.HasPrefix(machineType, "x4-") {
return x4HyperdiskLimit, nil
Loading