Skip to content

Commit

Permalink
Use a non-concurrent approach to Kubernetes worker upgrades
Browse files Browse the repository at this point in the history
Signed-off-by: Atanas Dinov <[email protected]>
  • Loading branch information
atanasdinov committed Sep 24, 2024
1 parent 20230f0 commit d1cc367
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/upgrade/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func KubernetesWorkerPlan(nameSuffix, version string, drain bool, annotations ma
workerPlan.Labels = map[string]string{
"k8s-upgrade": "worker",
}
workerPlan.Spec.Concurrency = 2
workerPlan.Spec.Concurrency = 1
workerPlan.Spec.NodeSelector = &metav1.LabelSelector{
MatchExpressions: []metav1.LabelSelectorRequirement{
{
Expand Down
4 changes: 2 additions & 2 deletions internal/upgrade/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func TestKubernetesWorkerPlan_RKE2(t *testing.T) {
assert.Empty(t, upgradeContainer.Args)

assert.Equal(t, version, upgradePlan.Spec.Version)
assert.EqualValues(t, 2, upgradePlan.Spec.Concurrency)
assert.EqualValues(t, 1, upgradePlan.Spec.Concurrency)
assert.True(t, upgradePlan.Spec.Cordon)

assert.Equal(t, "system-upgrade-controller", upgradePlan.Spec.ServiceAccountName)
Expand Down Expand Up @@ -219,7 +219,7 @@ func TestKubernetesWorkerPlan_K3s(t *testing.T) {
assert.Empty(t, upgradeContainer.Args)

assert.Equal(t, version, upgradePlan.Spec.Version)
assert.EqualValues(t, 2, upgradePlan.Spec.Concurrency)
assert.EqualValues(t, 1, upgradePlan.Spec.Concurrency)
assert.True(t, upgradePlan.Spec.Cordon)

assert.Equal(t, "system-upgrade-controller", upgradePlan.Spec.ServiceAccountName)
Expand Down

0 comments on commit d1cc367

Please sign in to comment.