Commit 54ca3890 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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
parents 9de9405b 92a043e8
...@@ -51,6 +51,10 @@ type Interface interface { ...@@ -51,6 +51,10 @@ type Interface interface {
GetDeviceNameFromMount(mountPath, pluginDir string) (string, error) 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. // This represents a single line in /proc/mounts or /etc/fstab.
type MountPoint struct { type MountPoint struct {
Device string Device string
......
...@@ -54,8 +54,6 @@ const ( ...@@ -54,8 +54,6 @@ const (
// kubelet is running in the host's root mount namespace. // kubelet is running in the host's root mount namespace.
type Mounter struct{} type Mounter struct{}
var _ = Interface(&Mounter{})
// Mount mounts source to target as fstype with given options. 'source' and 'fstype' must // 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 // 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, // type, where kernel handles fs type for you. The mount 'options' is a list of options,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment