Azure: avoid setting cached Sku when updating VMSS and VMSS instances
This commit is contained in:
		| @@ -1034,7 +1034,6 @@ func (ss *scaleSet) EnsureHostInPool(service *v1.Service, nodeName types.NodeNam | ||||
| 		}) | ||||
| 	primaryIPConfiguration.LoadBalancerBackendAddressPools = &newBackendPools | ||||
| 	newVM := &compute.VirtualMachineScaleSetVM{ | ||||
| 		Sku:      vm.Sku, | ||||
| 		Location: vm.Location, | ||||
| 		VirtualMachineScaleSetVMProperties: &compute.VirtualMachineScaleSetVMProperties{ | ||||
| 			HardwareProfile: vm.HardwareProfile, | ||||
| @@ -1176,7 +1175,6 @@ func (ss *scaleSet) ensureVMSSInPool(service *v1.Service, nodes []*v1.Node, back | ||||
| 			}) | ||||
| 		primaryIPConfig.LoadBalancerBackendAddressPools = &loadBalancerBackendAddressPools | ||||
| 		newVMSS := compute.VirtualMachineScaleSet{ | ||||
| 			Sku:      vmss.Sku, | ||||
| 			Location: vmss.Location, | ||||
| 			VirtualMachineScaleSetProperties: &compute.VirtualMachineScaleSetProperties{ | ||||
| 				VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfile{ | ||||
| @@ -1357,7 +1355,6 @@ func (ss *scaleSet) ensureBackendPoolDeletedFromNode(nodeName, backendPoolID str | ||||
| 	// Compose a new vmssVM with added backendPoolID. | ||||
| 	primaryIPConfiguration.LoadBalancerBackendAddressPools = &newBackendPools | ||||
| 	newVM := &compute.VirtualMachineScaleSetVM{ | ||||
| 		Sku:      vm.Sku, | ||||
| 		Location: vm.Location, | ||||
| 		VirtualMachineScaleSetVMProperties: &compute.VirtualMachineScaleSetVMProperties{ | ||||
| 			HardwareProfile: vm.HardwareProfile, | ||||
| @@ -1479,7 +1476,6 @@ func (ss *scaleSet) ensureBackendPoolDeletedFromVMSS(service *v1.Service, backen | ||||
| 		// Compose a new vmss with added backendPoolID. | ||||
| 		primaryIPConfig.LoadBalancerBackendAddressPools = &newBackendPools | ||||
| 		newVMSS := compute.VirtualMachineScaleSet{ | ||||
| 			Sku:      vmss.Sku, | ||||
| 			Location: vmss.Location, | ||||
| 			VirtualMachineScaleSetProperties: &compute.VirtualMachineScaleSetProperties{ | ||||
| 				VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfile{ | ||||
|   | ||||
| @@ -1769,7 +1769,6 @@ func TestEnsureHostInPool(t *testing.T) { | ||||
| 			expectedVMSSName:          testVMSSName, | ||||
| 			expectedInstanceID:        "0", | ||||
| 			expectedVMSSVM: &compute.VirtualMachineScaleSetVM{ | ||||
| 				Sku:      &compute.Sku{Name: to.StringPtr("sku")}, | ||||
| 				Location: to.StringPtr("westus"), | ||||
| 				VirtualMachineScaleSetVMProperties: &compute.VirtualMachineScaleSetVMProperties{ | ||||
| 					NetworkProfileConfiguration: &compute.VirtualMachineScaleSetVMNetworkProfileConfiguration{ | ||||
| @@ -2166,7 +2165,6 @@ func TestEnsureBackendPoolDeletedFromNode(t *testing.T) { | ||||
| 			expectedVMSSName:          testVMSSName, | ||||
| 			expectedInstanceID:        "0", | ||||
| 			expectedVMSSVM: &compute.VirtualMachineScaleSetVM{ | ||||
| 				Sku:      &compute.Sku{Name: to.StringPtr("sku")}, | ||||
| 				Location: to.StringPtr("westus"), | ||||
| 				VirtualMachineScaleSetVMProperties: &compute.VirtualMachineScaleSetVMProperties{ | ||||
| 					NetworkProfileConfiguration: &compute.VirtualMachineScaleSetVMNetworkProfileConfiguration{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Pengfei Ni
					Pengfei Ni