mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #37990 from kubernetes/Dec/mounttype
Automatic merge from submit-queue (batch tested with PRs 37997, 37939, 37990, 36700, 37258) Enable containerized mounter only for nfs and glusterfs types This change is to only enable containerized mounter for nfs and glusterfs types. For other types such as tmpfs, ext2/3/4 or empty type, we should still use mount from $PATH to minimize the effect of containerized mounter.
This commit is contained in:
commit
ef8a8be676
@ -74,9 +74,9 @@ func (mounter *Mounter) Mount(source string, target string, fstype string, optio
|
||||
}
|
||||
return doMount(mounterPath, source, target, fstype, bindRemountOpts)
|
||||
}
|
||||
// These filesystem types are expected to be supported by the mount utility on the host across all Linux distros.
|
||||
var defaultMounterFsTypes = sets.NewString("tmpfs", "ext4", "ext3", "ext2")
|
||||
if !defaultMounterFsTypes.Has(fstype) {
|
||||
// The list of filesystems that require containerized mounter on GCI image cluster
|
||||
fsTypesNeedMounter := sets.NewString("nfs", "glusterfs")
|
||||
if fsTypesNeedMounter.Has(fstype) {
|
||||
mounterPath = mounter.mounterPath
|
||||
}
|
||||
return doMount(mounterPath, source, target, fstype, options)
|
||||
|
Loading…
Reference in New Issue
Block a user