Merge pull request #370 from andyzhangx/disable-inline-vol
feat: disable inline volume by default in kubectl install
This commit is contained in:
commit
3c695d6e1b
@ -7,5 +7,4 @@ spec:
|
|||||||
attachRequired: false
|
attachRequired: false
|
||||||
volumeLifecycleModes:
|
volumeLifecycleModes:
|
||||||
- Persistent
|
- Persistent
|
||||||
- Ephemeral
|
|
||||||
fsGroupPolicy: File
|
fsGroupPolicy: File
|
||||||
|
|||||||
@ -364,8 +364,8 @@ func getInternalMountPath(workingMountDir string, vol *nfsVolume) string {
|
|||||||
|
|
||||||
// Get internal path where the volume is created
|
// Get internal path where the volume is created
|
||||||
// The reason why the internal path is "workingDir/subDir/subDir" is because:
|
// The reason why the internal path is "workingDir/subDir/subDir" is because:
|
||||||
// * the semantic is actually "workingDir/volId/subDir" and volId == subDir.
|
// - the semantic is actually "workingDir/volId/subDir" and volId == subDir.
|
||||||
// * we need a mount directory per volId because you can have multiple
|
// - we need a mount directory per volId because you can have multiple
|
||||||
// CreateVolume calls in parallel and they may use the same underlying share.
|
// CreateVolume calls in parallel and they may use the same underlying share.
|
||||||
// Instead of refcounting how many CreateVolume calls are using the same
|
// Instead of refcounting how many CreateVolume calls are using the same
|
||||||
// share, it's simpler to just do a mount per request.
|
// share, it's simpler to just do a mount per request.
|
||||||
@ -385,10 +385,11 @@ func getVolumeIDFromNfsVol(vol *nfsVolume) string {
|
|||||||
|
|
||||||
// Given a CSI volume id, return a nfsVolume
|
// Given a CSI volume id, return a nfsVolume
|
||||||
// sample volume Id:
|
// sample volume Id:
|
||||||
// new volumeID:
|
//
|
||||||
// nfs-server.default.svc.cluster.local#share#pvc-4bcbf944-b6f7-4bd0-b50f-3c3dd00efc64
|
// new volumeID:
|
||||||
// nfs-server.default.svc.cluster.local#share#subdir#pvc-4bcbf944-b6f7-4bd0-b50f-3c3dd00efc64
|
// nfs-server.default.svc.cluster.local#share#pvc-4bcbf944-b6f7-4bd0-b50f-3c3dd00efc64
|
||||||
// old 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
|
||||||
|
// old volumeID: nfs-server.default.svc.cluster.local/share/pvc-4bcbf944-b6f7-4bd0-b50f-3c3dd00efc64
|
||||||
func getNfsVolFromID(id string) (*nfsVolume, error) {
|
func getNfsVolFromID(id string) (*nfsVolume, error) {
|
||||||
var server, baseDir, subDir, uuid string
|
var server, baseDir, subDir, uuid string
|
||||||
segments := strings.Split(id, separator)
|
segments := strings.Split(id, separator)
|
||||||
|
|||||||
@ -49,7 +49,7 @@ func (f *fakeMounter) MountSensitive(source string, target string, fstype string
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
//IsLikelyNotMountPoint overrides mount.FakeMounter.IsLikelyNotMountPoint.
|
// IsLikelyNotMountPoint overrides mount.FakeMounter.IsLikelyNotMountPoint.
|
||||||
func (f *fakeMounter) IsLikelyNotMountPoint(file string) (bool, error) {
|
func (f *fakeMounter) IsLikelyNotMountPoint(file string) (bool, error) {
|
||||||
if strings.Contains(file, "error_is_likely") {
|
if strings.Contains(file, "error_is_likely") {
|
||||||
return false, fmt.Errorf("fake IsLikelyNotMountPoint: fake error")
|
return false, fmt.Errorf("fake IsLikelyNotMountPoint: fake error")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user