mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
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
This commit is contained in:
commit
66ef4c03ad
@ -35,7 +35,6 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
defaultFSType = "ext4"
|
||||
defaultStorageAccountType = storage.StandardLRS
|
||||
defaultAzureDiskKind = v1.AzureSharedBlobDisk
|
||||
defaultAzureDataDiskCachingMode = v1.AzureDataDiskCachingNone
|
||||
@ -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")
|
||||
}
|
||||
|
||||
func normalizeFsType(fsType string) string {
|
||||
if fsType == "" {
|
||||
return defaultFSType
|
||||
}
|
||||
|
||||
return fsType
|
||||
}
|
||||
|
||||
func normalizeKind(kind string) (v1.AzureDataDiskKind, error) {
|
||||
if kind == "" {
|
||||
return defaultAzureDiskKind, nil
|
||||
|
@ -121,7 +121,6 @@ func (p *azureDiskProvisioner) Provision() (*v1.PersistentVolume, error) {
|
||||
}
|
||||
|
||||
// normalize values
|
||||
fsType = normalizeFsType(fsType)
|
||||
skuName, err := normalizeStorageAccountType(storageAccountType)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user