Skip to content

Commit

Permalink
chore: switch to use k8s.io/mount-utils
Browse files Browse the repository at this point in the history
fix gofmt
  • Loading branch information
andyzhangx committed Apr 23, 2021
1 parent 378c578 commit 4cfe5e1
Show file tree
Hide file tree
Showing 21 changed files with 15 additions and 1,932 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ require (
k8s.io/component-base v0.20.0
k8s.io/klog/v2 v2.4.0
k8s.io/kubernetes v1.21.0-alpha.0.0.20201210005053-f58c4d8cd725
k8s.io/mount-utils v0.0.0
k8s.io/utils v0.0.0-20201110183641-67b214c5f920
sigs.k8s.io/cloud-provider-azure v0.0.0
sigs.k8s.io/yaml v1.2.0
Expand Down
2 changes: 1 addition & 1 deletion pkg/azurefile/azure_common_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package azurefile
import (
"os"

"k8s.io/utils/mount"
mount "k8s.io/mount-utils"
)

func SMBMount(m *mount.SafeFormatAndMount, source, target, fsType string, options, sensitiveMountOptions []string) error {
Expand Down
2 changes: 1 addition & 1 deletion pkg/azurefile/azure_common_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package azurefile
import (
"os"

"k8s.io/utils/mount"
mount "k8s.io/mount-utils"
)

func SMBMount(m *mount.SafeFormatAndMount, source, target, fsType string, options, sensitiveMountOptions []string) error {
Expand Down
2 changes: 1 addition & 1 deletion pkg/azurefile/azure_common_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"

"k8s.io/klog/v2"
"k8s.io/utils/mount"
mount "k8s.io/mount-utils"
"sigs.k8s.io/azurefile-csi-driver/pkg/mounter"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/azurefile/azurefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/klog/v2"
"k8s.io/kubernetes/pkg/volume/util"
"k8s.io/utils/mount"
mount "k8s.io/mount-utils"

csicommon "sigs.k8s.io/azurefile-csi-driver/pkg/csi-common"
"sigs.k8s.io/azurefile-csi-driver/pkg/mounter"
Expand Down
2 changes: 1 addition & 1 deletion pkg/azurefile/fake_mounter.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"runtime"
"strings"

"k8s.io/utils/mount"
mount "k8s.io/mount-utils"
"sigs.k8s.io/azurefile-csi-driver/pkg/mounter"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/azurefile/fake_mounter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"reflect"
"testing"

"k8s.io/utils/mount"
mount "k8s.io/mount-utils"
)

func TestMount(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/azurefile/nodeserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import (
"github.com/stretchr/testify/assert"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
mount "k8s.io/mount-utils"
"k8s.io/utils/exec"
testingexec "k8s.io/utils/exec/testing"
"k8s.io/utils/mount"

azure "sigs.k8s.io/cloud-provider-azure/pkg/provider"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/mounter/safe_mounter_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ limitations under the License.
package mounter

import (
mount "k8s.io/mount-utils"
utilexec "k8s.io/utils/exec"
"k8s.io/utils/mount"
)

func NewSafeMounter() (*mount.SafeFormatAndMount, error) {
Expand Down
6 changes: 5 additions & 1 deletion pkg/mounter/safe_mounter_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import (
smbclient "github.com/kubernetes-csi/csi-proxy/client/groups/smb/v1beta1"

"k8s.io/klog/v2"
mount "k8s.io/mount-utils"
utilexec "k8s.io/utils/exec"
"k8s.io/utils/mount"
)

var _ mount.Interface = &CSIProxyMounter{}
Expand Down Expand Up @@ -237,6 +237,10 @@ func (mounter *CSIProxyMounter) MountSensitive(source string, target string, fst
return fmt.Errorf("MountSensitive not implemented for CSIProxyMounter")
}

func (mounter *CSIProxyMounter) MountSensitiveWithoutSystemd(source string, target string, fstype string, options []string, sensitiveOptions []string) error {
return fmt.Errorf("MountSensitiveWithoutSystemd not implemented for CSIProxyMounter")
}

// NewCSIProxyMounter - creates a new CSI Proxy mounter struct which encompassed all the
// clients to the CSI proxy - filesystem, disk and volume clients.
func NewCSIProxyMounter() (*CSIProxyMounter, error) {
Expand Down
15 changes: 0 additions & 15 deletions vendor/k8s.io/utils/mount/OWNERS

This file was deleted.

18 changes: 0 additions & 18 deletions vendor/k8s.io/utils/mount/doc.go

This file was deleted.

216 changes: 0 additions & 216 deletions vendor/k8s.io/utils/mount/fake_mounter.go

This file was deleted.

Loading

0 comments on commit 4cfe5e1

Please sign in to comment.