From a834ab3cc4e43cf30436b9d599abc9f1f37a5c2c Mon Sep 17 00:00:00 2001 From: shaoyu Date: Tue, 7 Jan 2020 14:55:42 +0800 Subject: [PATCH] set deployment replicas --- operator/controllers/seldondeployment_controller.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/operator/controllers/seldondeployment_controller.go b/operator/controllers/seldondeployment_controller.go index b00e55415e..a318ee97aa 100644 --- a/operator/controllers/seldondeployment_controller.go +++ b/operator/controllers/seldondeployment_controller.go @@ -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