mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #60623 from feiskyer/vmtype
Automatic merge from submit-queue (batch tested with PRs 60623, 60625, 60520). 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>. Set default vmtype to standard if not set **What this PR does / why we need it**: When using IMDS, kubelet reports Failed to extract vmssVMName even when vmtype is not set: ``` E0301 05:30:57.515306 3124 azure_vmss_cache.go:52] Failed to extract vmssVMName "77890k8s9010" E0301 05:30:57.515306 3124 kubelet_node_status.go:79] Unable to construct v1.Node object for kubelet: failed to get external ID from cloud provider: not a vmss instance ``` azure cloud provider shouldn't call vmss logic in this case. It should assume stardard vmtype if it is not set. **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 #60622 **Special notes for your reviewer**: **Release note**: ```release-note Set Azure vmType to standard if it is not set in azure cloud config. ```
This commit is contained in:
commit
9399359248
@ -160,6 +160,11 @@ func NewCloud(configReader io.Reader) (cloudprovider.Interface, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if config.VMType == "" {
|
||||
// default to standard vmType if not set.
|
||||
config.VMType = vmTypeStandard
|
||||
}
|
||||
|
||||
env, err := auth.ParseAzureEnvironment(config.Cloud)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -864,6 +864,7 @@ func getTestCloud() (az *Cloud) {
|
||||
RouteTableName: "rt",
|
||||
PrimaryAvailabilitySetName: "as",
|
||||
MaximumLoadBalancerRuleCount: 250,
|
||||
VMType: vmTypeStandard,
|
||||
},
|
||||
}
|
||||
az.DisksClient = newFakeDisksClient()
|
||||
|
Loading…
Reference in New Issue
Block a user