fix device name change issue for azure disk
This commit is contained in:
@@ -35,9 +35,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
defaultFSType = "ext4"
|
defaultFSType = "ext4"
|
||||||
defaultStorageAccountType = storage.StandardLRS
|
defaultStorageAccountType = storage.StandardLRS
|
||||||
defaultAzureDiskKind = v1.AzureSharedBlobDisk
|
defaultAzureDiskKind = v1.AzureSharedBlobDisk
|
||||||
|
defaultAzureDataDiskCachingMode = v1.AzureDataDiskCachingNone
|
||||||
)
|
)
|
||||||
|
|
||||||
type dataDisk struct {
|
type dataDisk struct {
|
||||||
@@ -141,7 +142,7 @@ func normalizeStorageAccountType(storageAccountType string) (storage.SkuName, er
|
|||||||
|
|
||||||
func normalizeCachingMode(cachingMode v1.AzureDataDiskCachingMode) (v1.AzureDataDiskCachingMode, error) {
|
func normalizeCachingMode(cachingMode v1.AzureDataDiskCachingMode) (v1.AzureDataDiskCachingMode, error) {
|
||||||
if cachingMode == "" {
|
if cachingMode == "" {
|
||||||
return v1.AzureDataDiskCachingReadWrite, nil
|
return defaultAzureDataDiskCachingMode, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if !supportedCachingModes.Has(string(cachingMode)) {
|
if !supportedCachingModes.Has(string(cachingMode)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user