Skip to content

Commit

Permalink
Remove hardcoded os disk type check in the worker controller. (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkistner authored Oct 1, 2024
1 parent bdea1b1 commit 05ed5cc
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions pkg/controller/worker/machines.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,14 +418,7 @@ func computeDisks(pool extensionsv1alpha1.WorkerPool, dataVolumesConfig []azurea
osDisk := map[string]interface{}{
"size": volumeSize,
}
// In the past the volume type information was not passed to the machineclass.
// In consequence the Machine controller manager has created machines always
// with the default volume type of the requested machine type. Existing clusters
// respectively their worker pools could have an invalid volume configuration
// which was not applied. To do not damage existing cluster we will set for
// now the volume type only if it's a valid Azure volume type.
// Otherwise, we will still use the default volume of the machine type.
if pool.Volume.Type != nil && (*pool.Volume.Type == "Standard_LRS" || *pool.Volume.Type == "StandardSSD_LRS" || *pool.Volume.Type == "Premium_LRS") {
if pool.Volume != nil && pool.Volume.Type != nil {
osDisk["type"] = *pool.Volume.Type
}

Expand Down

0 comments on commit 05ed5cc

Please sign in to comment.