mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
fix device name change issue for azure disk
This commit is contained in:
parent
6a7656b693
commit
c3e8f6862f
@ -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)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user