diff --git a/charts/latest/csi-driver-smb-v0.7.0.tgz b/charts/latest/csi-driver-smb-v0.7.0.tgz index 22af03ce196..78cf1da8a6e 100644 Binary files a/charts/latest/csi-driver-smb-v0.7.0.tgz and b/charts/latest/csi-driver-smb-v0.7.0.tgz differ diff --git a/deploy/csi-smb-controller.yaml b/deploy/csi-smb-controller.yaml index 1b44fbe504a..a76cf900b53 100644 --- a/deploy/csi-smb-controller.yaml +++ b/deploy/csi-smb-controller.yaml @@ -14,6 +14,7 @@ spec: labels: app: csi-smb-controller spec: + dnsPolicy: ClusterFirstWithHostNet serviceAccountName: csi-smb-controller-sa nodeSelector: kubernetes.io/os: linux @@ -89,6 +90,8 @@ spec: env: - name: CSI_ENDPOINT value: unix:///csi/csi.sock + securityContext: + privileged: true volumeMounts: - mountPath: /csi name: socket-dir diff --git a/pkg/smb/smb_common_windows.go b/pkg/smb/smb_common_windows.go index 40264a29558..d2e035bfd4b 100644 --- a/pkg/smb/smb_common_windows.go +++ b/pkg/smb/smb_common_windows.go @@ -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) }