Merge pull request #30802 from MHBauer/ensure-mounter

Automatic merge from submit-queue

ensure pkg/util/mount compiles & crosses

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**:
osx doesn't build
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #30795

**Special notes for your reviewer**:

**Release note**:
```release-note-none
```

 - move compile time check from linux code to generic code
 - remove duplication of #30724 and #30666 to resolve #30795
pull/6/head
Kubernetes Submit Queue 2016-08-22 17:40:16 -07:00 committed by GitHub
commit 54ca389012
2 changed files with 4 additions and 2 deletions

View File

@ -51,6 +51,10 @@ type Interface interface {
GetDeviceNameFromMount(mountPath, pluginDir string) (string, error)
}
// Compile-time check to ensure all Mounter implementations satisfy
// the mount interface
var _ Interface = &Mounter{}
// This represents a single line in /proc/mounts or /etc/fstab.
type MountPoint struct {
Device string

View File

@ -54,8 +54,6 @@ const (
// kubelet is running in the host's root mount namespace.
type Mounter struct{}
var _ = Interface(&Mounter{})
// Mount mounts source to target as fstype with given options. 'source' and 'fstype' must
// be an emtpy string in case it's not required, e.g. for remount, or for auto filesystem
// type, where kernel handles fs type for you. The mount 'options' is a list of options,