Skip to content

Commit

Permalink
make windows e2e tests work
Browse files Browse the repository at this point in the history
  • Loading branch information
boddumanohar committed Jun 1, 2021
1 parent 70eaf79 commit 4016069
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Binary file modified charts/latest/csi-driver-smb-v0.7.0.tgz
Binary file not shown.
3 changes: 3 additions & 0 deletions deploy/csi-smb-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ spec:
labels:
app: csi-smb-controller
spec:
dnsPolicy: ClusterFirstWithHostNet
serviceAccountName: csi-smb-controller-sa
nodeSelector:
kubernetes.io/os: linux
Expand Down Expand Up @@ -89,6 +90,8 @@ spec:
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
securityContext:
privileged: true
volumeMounts:
- mountPath: /csi
name: socket-dir
Expand Down
6 changes: 0 additions & 6 deletions pkg/smb/smb_common_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,13 @@ import (
"k8s.io/klog/v2"
mount "k8s.io/mount-utils"
"os"
"strings"
)

func normalizeWindowsPath(path string) string {
return strings.Replace(path, "/", "\\", -1)
}

func Mount(m *mount.SafeFormatAndMount, source, target, fsType string, mountOptions, sensitiveMountOptions []string) error {
proxy, ok := m.Interface.(*mounter.CSIProxyMounter)
if !ok {
return fmt.Errorf("could not cast to csi proxy class")
}
source = normalizeWindowsPath(source)
return proxy.SMBMount(source, target, fsType, mountOptions, sensitiveMountOptions)
}

Expand Down

0 comments on commit 4016069

Please sign in to comment.