Skip to content

Commit

Permalink
Update cluster deploy strategy
Browse files Browse the repository at this point in the history
Signed-off-by: shaoyue.chen <[email protected]>
  • Loading branch information
haorenfsa committed Jan 22, 2024
1 parent 7af6715 commit 242f4d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controllers/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ func (c MilvusComponent) GetDeploymentStrategy(configs map[string]interface{}) a
Type: appsv1.RollingUpdateDeploymentStrategyType,
RollingUpdate: &appsv1.RollingUpdateDeployment{
MaxUnavailable: &intstr.IntOrString{Type: intstr.Int, IntVal: 0},
MaxSurge: &intstr.IntOrString{Type: intstr.String, StrVal: "25%"},
MaxSurge: &intstr.IntOrString{Type: intstr.Int, IntVal: 1},
},
}
}
Expand Down
1 change: 1 addition & 0 deletions pkg/controllers/components_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ func TestMilvusComponent_GetDeploymentStrategy(t *testing.T) {
strategy := com.GetDeploymentStrategy(configs)
assert.Equal(t, appsv1.RollingUpdateDeploymentStrategyType, strategy.Type)
assert.Equal(t, intstr.FromInt(0), *strategy.RollingUpdate.MaxUnavailable)
assert.Equal(t, intstr.FromInt(1), *strategy.RollingUpdate.MaxSurge)

com = DataCoord
assert.Equal(t, appsv1.RecreateDeploymentStrategyType, com.GetDeploymentStrategy(configs).Type)
Expand Down

0 comments on commit 242f4d4

Please sign in to comment.