Skip to content

Commit

Permalink
Reduce concurrency for OS SUC workers (#107)
Browse files Browse the repository at this point in the history
* Reduce concurrency for OS SUC workers

* Fix unit tests
  • Loading branch information
ipetrov117 authored Oct 29, 2024
1 parent 14134a3 commit 15fcb10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/upgrade/os.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func OSWorkerPlan(nameSuffix, releaseVersion, secretName string, releaseOS *life

labels["os-upgrade"] = "worker"
workerPlan := baseOSPlan(workerPlanName, releaseVersion, secretName, drain, labels)
workerPlan.Spec.Concurrency = 2
workerPlan.Spec.Concurrency = 1
workerPlan.Spec.NodeSelector = &metav1.LabelSelector{
MatchExpressions: []metav1.LabelSelectorRequirement{
{
Expand Down
2 changes: 1 addition & 1 deletion internal/upgrade/os_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func TestOSWorkerPlan(t *testing.T) {
assert.Equal(t, []string{"sh", "/run/system-upgrade/secrets/some-secret/os-upgrade.sh"}, upgradeContainer.Args)

assert.Equal(t, "3.1.0", upgradePlan.Spec.Version)
assert.EqualValues(t, 2, upgradePlan.Spec.Concurrency)
assert.EqualValues(t, 1, upgradePlan.Spec.Concurrency)
assert.EqualValues(t, 43200, upgradePlan.Spec.JobActiveDeadlineSecs)
assert.True(t, upgradePlan.Spec.Cordon)

Expand Down

0 comments on commit 15fcb10

Please sign in to comment.