Skip to content

Commit

Permalink
Merge pull request #273 from cliveseldon/crd_status_2
Browse files Browse the repository at this point in the history
Update when status is set
  • Loading branch information
ukclivecox authored Oct 30, 2018
2 parents 96d33a1 + 138626c commit 27691f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public void createOrReplaceSeldonDeployment(SeldonDeployment mlDep) {
//removeServices(client,namespace, mlDep2, resources.services); //Proto Client not presently working for deletion
ApiClient client2 = clientProvider.getClient();
removeServices(client2,namespace, mlDep2, resources.services);
if (!mlDep.getSpec().equals(mlDepStatusUpdated.getSpec()))
if (existing == null || !mlDep.getSpec().equals(mlDepStatusUpdated.getSpec()))
{
logger.debug("Pushing updated SeldonDeployment "+mlDepStatusUpdated.getMetadata().getName()+" back to kubectl");
crdHandler.updateSeldonDeploymentStatus(mlDepStatusUpdated);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ public void updateStatus(String mlDepName, String depName, Integer replicas, Int
{
mlBuilder.getStatusBuilder().setState(Constants.STATE_AVAILABLE);
}
else
{
mlBuilder.getStatusBuilder().setState(Constants.STATE_CREATING);
}
crdHandler.updateSeldonDeploymentStatus(mlBuilder.build());
}
else
Expand Down

0 comments on commit 27691f5

Please sign in to comment.