Skip to content

Commit 6b2ce4c

Browse files
committed
Keep using v1beta1 for the volume API
1 parent 666f2b9 commit 6b2ce4c

File tree

19 files changed

+148
-2200
lines changed

19 files changed

+148
-2200
lines changed

Diff for: deploy/kubernetes/base/node_windows/node.yaml

+14-12
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ spec:
5353
mountPropagation: "None"
5454
- name: plugin-dir
5555
mountPath: C:\csi
56-
- name: csi-proxy-volume-v1
57-
mountPath: \\.\pipe\csi-proxy-volume-v1
58-
- name: csi-proxy-filesystem-v1
59-
mountPath: \\.\pipe\csi-proxy-filesystem-v1
60-
- name: csi-proxy-disk-v1
61-
mountPath: \\.\pipe\csi-proxy-disk-v1
56+
- name: csi-proxy-volume-v1beta3
57+
mountPath: \\.\pipe\csi-proxy-volume-v1beta3
58+
- name: csi-proxy-filesystem-v1beta2
59+
mountPath: \\.\pipe\csi-proxy-filesystem-v1beta2
60+
- name: csi-proxy-disk-v1beta3
61+
mountPath: \\.\pipe\csi-proxy-disk-v1beta3
6262
# these paths are still included for compatibility, they're used
6363
# only if the node has still the beta version of the CSI proxy
6464
- name: csi-proxy-volume-v1beta1
@@ -68,18 +68,20 @@ spec:
6868
- name: csi-proxy-disk-v1beta2
6969
mountPath: \\.\pipe\csi-proxy-disk-v1beta2
7070
volumes:
71-
- name: csi-proxy-disk-v1
71+
- name: csi-proxy-disk-v1beta3
7272
hostPath:
73-
path: \\.\pipe\csi-proxy-disk-v1
73+
path: \\.\pipe\csi-proxy-disk-v1beta3
7474
type: ""
75-
- name: csi-proxy-volume-v1
75+
- name: csi-proxy-volume-v1beta3
7676
hostPath:
77-
path: \\.\pipe\csi-proxy-volume-v1
77+
path: \\.\pipe\csi-proxy-volume-v1beta3
7878
type: ""
79-
- name: csi-proxy-filesystem-v1
79+
- name: csi-proxy-filesystem-v1beta2
8080
hostPath:
81-
path: \\.\pipe\csi-proxy-filesystem-v1
81+
path: \\.\pipe\csi-proxy-filesystem-v1beta2
8282
type: ""
83+
# these paths are still included for compatibility, they're used
84+
# only if the node has still the beta version of the CSI proxy
8385
- name: csi-proxy-disk-v1beta2
8486
hostPath:
8587
path: \\.\pipe\csi-proxy-disk-v1beta2

Diff for: deploy/kubernetes/base/node_windows/psp.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ spec:
1818
- pathPrefix: \var\lib\kubelet
1919
- pathPrefix: \var\lib\kubelet\plugins_registry
2020
- pathPrefix: \var\lib\kubelet\plugins\pd.csi.storage.gke.io
21-
- pathPrefix: \\.\pipe\csi-proxy-disk-v1
22-
- pathPrefix: \\.\pipe\csi-proxy-volume-v1
23-
- pathPrefix: \\.\pipe\csi-proxy-filesystem-v1
21+
- pathPrefix: \\.\pipe\csi-proxy-disk-v1beta3
22+
- pathPrefix: \\.\pipe\csi-proxy-volume-v1beta3
23+
- pathPrefix: \\.\pipe\csi-proxy-filesystem-v1beta2
2424
# these paths are allowed only for compatibility mode if the PD CSI driver
2525
# is using the CSI Proxy v1 client and the node is still using the
2626
# beta version of the CSI proxy
27-
- pathPrefix: \\.\pipe\csi-proxy-disk-v1beta1
27+
- pathPrefix: \\.\pipe\csi-proxy-disk-v1beta2
2828
- pathPrefix: \\.\pipe\csi-proxy-volume-v1beta1
2929
- pathPrefix: \\.\pipe\csi-proxy-filesystem-v1beta1
3030

Diff for: pkg/mount-manager/safe-mounter-v1beta_windows.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ import (
3131
fsapi "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta1"
3232
fsclient "github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1beta1"
3333

34-
volumeapi "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta2"
35-
volumeclient "github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta2"
34+
volumeapi "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta1"
35+
volumeclient "github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta1"
3636

3737
"k8s.io/klog"
3838
mount "k8s.io/mount-utils"

Diff for: pkg/mount-manager/statter_windows.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"context"
2020
"fmt"
2121

22-
volumeapiv1beta2 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta2"
22+
volumeapiv1beta1 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta1"
2323
// TODO(mauriciopoppe): use v1 when it's released, the import is aliased to volumeapiv1 for a smaller diff later
2424
volumeapiv1 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta3"
2525
"k8s.io/mount-utils"
@@ -49,7 +49,7 @@ func (r *realStatter) StatFS(path string) (available, capacity, used, inodesFree
4949
return r.StatFSV1Beta(path)
5050
}
5151

52-
return 1, 1, 1, 1, 1, 1, fmt.Errorf("Invalid interface type=%v", r.mounter.Interface)
52+
return 0, 0, 0, 0, 0, 0, fmt.Errorf("Invalid interface type=%v", r.mounter.Interface)
5353
}
5454

5555
func (r *realStatter) StatFSV1(path string) (available, capacity, used, inodesFree, inodes, inodesUsed int64, err error) {
@@ -83,7 +83,7 @@ func (r *realStatter) StatFSV1Beta(path string) (available, capacity, used, inod
8383

8484
proxy := r.mounter.Interface.(*CSIProxyMounterV1Beta)
8585

86-
idRequest := &volumeapiv1beta2.VolumeIDFromMountRequest{
86+
idRequest := &volumeapiv1beta1.VolumeIDFromMountRequest{
8787
Mount: path,
8888
}
8989
idResponse, err := proxy.VolumeClient.GetVolumeIDFromMount(context.Background(), idRequest)
@@ -92,7 +92,7 @@ func (r *realStatter) StatFSV1Beta(path string) (available, capacity, used, inod
9292
}
9393
volumeID := idResponse.GetVolumeId()
9494

95-
request := &volumeapiv1beta2.VolumeStatsRequest{
95+
request := &volumeapiv1beta1.VolumeStatsRequest{
9696
VolumeId: volumeID,
9797
}
9898
response, err := proxy.VolumeClient.VolumeStats(context.Background(), request)

Diff for: pkg/resizefs/resizefs_windows.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"context"
2323
"fmt"
2424

25-
volumeapiv1beta2 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta2"
25+
volumeapiv1beta1 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta1"
2626
// TODO(mauriciopoppe): use v1 when it's released, the import is aliased to volumeapiv1 for a smaller diff later
2727
volumeapiv1 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta3"
2828

@@ -84,7 +84,7 @@ func (resizefs *resizeFs) resizeV1Beta(devicePath string, deviceMountPath string
8484

8585
proxy := resizefs.mounter.Interface.(*mounter.CSIProxyMounterV1Beta)
8686

87-
idRequest := &volumeapiv1beta2.VolumeIDFromMountRequest{
87+
idRequest := &volumeapiv1beta1.VolumeIDFromMountRequest{
8888
Mount: deviceMountPath,
8989
}
9090
idResponse, err := proxy.VolumeClient.GetVolumeIDFromMount(context.Background(), idRequest)
@@ -93,7 +93,7 @@ func (resizefs *resizeFs) resizeV1Beta(devicePath string, deviceMountPath string
9393
}
9494
volumeId := idResponse.GetVolumeId()
9595

96-
request := &volumeapiv1beta2.ResizeVolumeRequest{
96+
request := &volumeapiv1beta1.ResizeVolumeRequest{
9797
VolumeId: volumeId,
9898
}
9999
_, err = proxy.VolumeClient.ResizeVolume(context.Background(), request)

0 commit comments

Comments
 (0)