Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
fix #74: upgrade node if only one control plane as a workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
pacoxu committed Jun 16, 2022
1 parent 9721e44 commit d8adb1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion operations/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ func planNextUpgrade(operation *operatorv1.Operation, version string, c client.C
log.Info("failed to list nodes.", "error", err)
return items
}
if len(cpNodes.Items) > 1 {
// Workaround: if isServerCanSkip, the only server's kubelet may need to upgrade.
// TODO to make more accurate task, we may cut tasks into small ones, for instance, upgrade kubelet only.
if len(cpNodes.Items) > 1 || isServerCanSkip {

t2.Spec.Template.Spec.Commands = append(t2.Spec.Template.Spec.Commands,
operatorv1.CommandDescriptor{
Expand Down

0 comments on commit d8adb1b

Please sign in to comment.