Skip to content

Commit 5053063

Browse files
committed
only update Azure data disks when attach/detach
1 parent 4db3a09 commit 5053063

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_standard.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ func (as *availabilitySet) AttachDisk(isManagedDisk bool, diskName, diskURI stri
8585

8686
newVM := compute.VirtualMachineUpdate{
8787
VirtualMachineProperties: &compute.VirtualMachineProperties{
88-
HardwareProfile: vm.HardwareProfile,
8988
StorageProfile: &compute.StorageProfile{
9089
DataDisks: &disks,
9190
},
@@ -155,7 +154,6 @@ func (as *availabilitySet) DetachDisk(diskName, diskURI string, nodeName types.N
155154

156155
newVM := compute.VirtualMachineUpdate{
157156
VirtualMachineProperties: &compute.VirtualMachineProperties{
158-
HardwareProfile: vm.HardwareProfile,
159157
StorageProfile: &compute.StorageProfile{
160158
DataDisks: &disks,
161159
},

staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_vmss.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,8 @@ func (ss *scaleSet) AttachDisk(isManagedDisk bool, diskName, diskURI string, nod
8585
})
8686
}
8787
newVM := compute.VirtualMachineScaleSetVM{
88-
Sku: vm.Sku,
89-
Location: vm.Location,
9088
VirtualMachineScaleSetVMProperties: &compute.VirtualMachineScaleSetVMProperties{
91-
HardwareProfile: vm.HardwareProfile,
9289
StorageProfile: &compute.StorageProfile{
93-
OsDisk: vm.StorageProfile.OsDisk,
9490
DataDisks: &disks,
9591
},
9692
},
@@ -159,12 +155,8 @@ func (ss *scaleSet) DetachDisk(diskName, diskURI string, nodeName types.NodeName
159155
}
160156

161157
newVM := compute.VirtualMachineScaleSetVM{
162-
Sku: vm.Sku,
163-
Location: vm.Location,
164158
VirtualMachineScaleSetVMProperties: &compute.VirtualMachineScaleSetVMProperties{
165-
HardwareProfile: vm.HardwareProfile,
166159
StorageProfile: &compute.StorageProfile{
167-
OsDisk: vm.StorageProfile.OsDisk,
168160
DataDisks: &disks,
169161
},
170162
},

0 commit comments

Comments
 (0)