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

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. ```
parents 6608a47c ce8615da
......@@ -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()
......
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