Merge pull request #370 from andyzhangx/disable-inline-vol

feat: disable inline volume by default in kubectl install
This commit is contained in:
Kubernetes Prow Robot 2022-08-17 10:46:57 -07:00 committed by GitHub
commit 3c695d6e1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -7,5 +7,4 @@ spec:
attachRequired: false
volumeLifecycleModes:
- Persistent
- Ephemeral
fsGroupPolicy: File

View File

@ -364,8 +364,8 @@ func getInternalMountPath(workingMountDir string, vol *nfsVolume) string {
// Get internal path where the volume is created
// The reason why the internal path is "workingDir/subDir/subDir" is because:
// * the semantic is actually "workingDir/volId/subDir" and volId == subDir.
// * we need a mount directory per volId because you can have multiple
// - the semantic is actually "workingDir/volId/subDir" and volId == subDir.
// - we need a mount directory per volId because you can have multiple
// CreateVolume calls in parallel and they may use the same underlying share.
// Instead of refcounting how many CreateVolume calls are using the same
// share, it's simpler to just do a mount per request.
@ -385,6 +385,7 @@ func getVolumeIDFromNfsVol(vol *nfsVolume) string {
// Given a CSI volume id, return a nfsVolume
// sample volume Id:
//
// new volumeID:
// nfs-server.default.svc.cluster.local#share#pvc-4bcbf944-b6f7-4bd0-b50f-3c3dd00efc64
// nfs-server.default.svc.cluster.local#share#subdir#pvc-4bcbf944-b6f7-4bd0-b50f-3c3dd00efc64

View File

@ -49,7 +49,7 @@ func (f *fakeMounter) MountSensitive(source string, target string, fstype string
return nil
}
//IsLikelyNotMountPoint overrides mount.FakeMounter.IsLikelyNotMountPoint.
// IsLikelyNotMountPoint overrides mount.FakeMounter.IsLikelyNotMountPoint.
func (f *fakeMounter) IsLikelyNotMountPoint(file string) (bool, error) {
if strings.Contains(file, "error_is_likely") {
return false, fmt.Errorf("fake IsLikelyNotMountPoint: fake error")