Unverified Commit 66ef4c03 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #62250 from andyzhangx/remove-default-fsypte-azuredisk

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. fix the issue that default azure disk fsypte(ext4) does not work on Windows **What this PR does / why we need it**: [This line of code](https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/azure_dd/azure_provision.go#L124) will set default fstype as `ext4` which is not applicable for Windows disk. This PR remove the default fstype setting from master side. We should leave fstype in master as what it is, and let client side(kubelet) decide the default fstype: - Linux: ext4, see [default fstype setting code in linux](https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/azure_dd/azure_common_linux.go#L189) - Windows: NTFS, see [default fstype setting code in Windows](https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/azure_dd/azure_common_windows.go#L108) **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #62247 **Special notes for your reviewer**: **Release note**: ``` fix the issue that default azure disk fsypte(ext4) does not work on Windows ``` /sig azure /sig windows @feiskyer @karataliu
parents bb3887d7 fddf3efc
...@@ -35,7 +35,6 @@ import ( ...@@ -35,7 +35,6 @@ import (
) )
const ( const (
defaultFSType = "ext4"
defaultStorageAccountType = storage.StandardLRS defaultStorageAccountType = storage.StandardLRS
defaultAzureDiskKind = v1.AzureSharedBlobDisk defaultAzureDiskKind = v1.AzureSharedBlobDisk
defaultAzureDataDiskCachingMode = v1.AzureDataDiskCachingNone defaultAzureDataDiskCachingMode = v1.AzureDataDiskCachingNone
...@@ -108,14 +107,6 @@ func getVolumeSource(spec *volume.Spec) (*v1.AzureDiskVolumeSource, error) { ...@@ -108,14 +107,6 @@ func getVolumeSource(spec *volume.Spec) (*v1.AzureDiskVolumeSource, error) {
return nil, fmt.Errorf("azureDisk - Spec does not reference an Azure disk volume type") return nil, fmt.Errorf("azureDisk - Spec does not reference an Azure disk volume type")
} }
func normalizeFsType(fsType string) string {
if fsType == "" {
return defaultFSType
}
return fsType
}
func normalizeKind(kind string) (v1.AzureDataDiskKind, error) { func normalizeKind(kind string) (v1.AzureDataDiskKind, error) {
if kind == "" { if kind == "" {
return defaultAzureDiskKind, nil return defaultAzureDiskKind, nil
......
...@@ -121,7 +121,6 @@ func (p *azureDiskProvisioner) Provision() (*v1.PersistentVolume, error) { ...@@ -121,7 +121,6 @@ func (p *azureDiskProvisioner) Provision() (*v1.PersistentVolume, error) {
} }
// normalize values // normalize values
fsType = normalizeFsType(fsType)
skuName, err := normalizeStorageAccountType(storageAccountType) skuName, err := normalizeStorageAccountType(storageAccountType)
if err != nil { if err != nil {
return nil, err return nil, err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment