Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove hardcoded os disk type check in the worker controller. #353

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 0 additions & 10 deletions pkg/controller/worker/machines.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,16 +319,6 @@ func computeDisks(pool extensionsv1alpha1.WorkerPool) (map[string]interface{}, e
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") {
osDisk["type"] = *pool.Volume.Type
}

disks := map[string]interface{}{
"osDisk": osDisk,
Expand Down
1 change: 0 additions & 1 deletion pkg/controller/worker/machines_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ var _ = Describe("Machines", func() {
}
machineClassPool2["osDisk"] = map[string]interface{}{
"size": volumeSize,
"type": volumeType,
}

machineClasses = map[string]interface{}{"machineClasses": []map[string]interface{}{
Expand Down