Skip to content

Commit

Permalink
set deployment replicas
Browse files Browse the repository at this point in the history
  • Loading branch information
shaoyu committed Jan 7, 2020
1 parent 62766f6 commit a834ab3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions operator/controllers/seldondeployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,10 @@ func createDeployments(r *SeldonDeploymentReconciler, components *components, in
desiredDeployment := found.DeepCopy()
found.Spec = deploy.Spec

if deploy.Spec.Replicas == nil {
found.Spec.Replicas = desiredDeployment.Spec.Replicas
}

err = r.Update(context.TODO(), found)
if err != nil {
return ready, err
Expand Down

0 comments on commit a834ab3

Please sign in to comment.