Skip to content

Commit

Permalink
getServerLabelsForMachine: do not check for nil
Browse files Browse the repository at this point in the history
  • Loading branch information
defo89 committed Nov 6, 2024
1 parent af4d162 commit f511fda
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/controller/worker/machines.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,8 @@ func (w *workerDelegate) getServerLabelsForMachine(machineType string, workerCon
break
}
}
if workerConfig.ExtraServerLabels != nil {
for key, value := range workerConfig.ExtraServerLabels {
combinedLabels[key] = value
}
for key, value := range workerConfig.ExtraServerLabels {
combinedLabels[key] = value
}
if len(combinedLabels) == 0 {
return nil, fmt.Errorf("no server labels found for machine type %s or worker config", machineType)
Expand Down

0 comments on commit f511fda

Please sign in to comment.