From 760d0fe1b16fa6233addf1aeb5cb363ebc594e82 Mon Sep 17 00:00:00 2001 From: Manohar Reddy Date: Tue, 1 Jun 2021 14:38:47 +0000 Subject: [PATCH] make windows e2e tests work --- charts/latest/csi-driver-smb-v0.7.0.tgz | Bin 3261 -> 3261 bytes deploy/csi-smb-controller.yaml | 3 +++ pkg/smb/smb_common_windows.go | 5 ----- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/charts/latest/csi-driver-smb-v0.7.0.tgz b/charts/latest/csi-driver-smb-v0.7.0.tgz index 22af03ce1963ea72d064d927b3bbc54bf208ad47..78cf1da8a6e31c433e1e8326cfe1302042fb1736 100644 GIT binary patch delta 3166 zcmV-k459PA8NC^hJbznnQkXMGC7SfG1)D)|z}+X~3TZj!b^yGan|^gPr>KvQFz z|4^bzQr@_!zxyAgWb0x{z9rdgYc8;Mq#1HZ&W%5fOeD2EL8l;W=?|Ny6D*W7!#;cS zbgk8DwR+vI`E0dX#m`o|*Llmcjt=(!5{>$J46cQc z^oRNbAps$mRDW?XbCFMk<5MEIG0o(uzt2TxU~UN+U)bMYUO# z=-#UK)#_i3e+KR#PQ6C1>ST>*U)tdvTCNr1zXCrrp1gT^b$i}-)Pvf8jCJ|{QKwso z|HsFj-XZ?KM7y1UN$7QApCt8EqA@5%gE8_TWPAo5QXI{ABoJYd_T!Fa-Eu@GK<! zMl=A_KhSxjCTk!&y@MmBkQ1X!#%`V8;uEK)yqba#)C2UlPS*m0dPn9f_50CiL?2MY zPCJ9ZGv8y;7#;$X29KBklgI-pe+-^IoE5nGaXMbf7^mBsWnqQcMRY3pmH>+xEneFX zOB^R*)2rghNz-grjx?E!onBdR{%x{*?T#D&+dz%GhUsf{@pZ0;BoF~A-U59@z%&3+ zvHY5$AJeBBN=Hj&FzNJlN`&Tft9Z>dOacdEsO3Y*P7X49f+(Xse|l=Cp13 zpsT_xvSL+ji4%H# z1n=jjr&~T6aOolge=P48oNIRBQe-A0eZD`z8Mw$dM7b^@@Rm%Wp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>3B2l(3+duJFSYxp`@A&dw&OXOAJc z8_pm%H$#mhHRgi;WvoA~hcB6+o*X{YAGe45`y(qG~w(BC}mD#7q=F(6@>`fHCG zg&r;+EC0Gd*~ke6VOYvF=eg#bU;=^KV&#(Ae1{rg)o`n)MI_bv-IGperw$3{!lOY} z+sno2~c0717{-KvZJUrLHnf zG^&5}VI3!_-Ar=mSoUk{IVrT*ikijBde|==xAtw{_HEzxZMXLS00030|0T!UdH`Yo E0P&?HkpKVy 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..822952e2d08 100644 --- a/pkg/smb/smb_common_windows.go +++ b/pkg/smb/smb_common_windows.go @@ -27,16 +27,11 @@ import ( "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) }