Skip to content

Commit

Permalink
Azure: avoid setting cached Sku when updating VMSS and VMSS instances
Browse files Browse the repository at this point in the history
  • Loading branch information
feiskyer committed May 19, 2021
1 parent e338438 commit 91ce2b1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss.go
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,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,
Expand Down Expand Up @@ -1175,7 +1174,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{
Expand Down Expand Up @@ -1356,7 +1354,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,
Expand Down Expand Up @@ -1478,7 +1475,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{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1732,7 +1732,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{
Expand Down Expand Up @@ -2129,7 +2128,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{
Expand Down

0 comments on commit 91ce2b1

Please sign in to comment.