Skip to content

Commit

Permalink
Revert refactoring changes to controller checks
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlycoconuts committed Jan 16, 2024
1 parent 8012cd3 commit a4d01d2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions api/cluster/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,10 @@ func (c *controller) Deploy(ctx context.Context, modelService *models.Service) (

// check the cluster to see if the inference service has already been deployed
s, err := c.kserveClient.InferenceServices(modelService.Namespace).Get(modelService.Name, metav1.GetOptions{})
if err != nil && !kerrors.IsNotFound(err) {
return nil, errors.Wrapf(err, "unable to check status of inference service: %s", s.Name)
}

// create a new inference service if it has not been created
if s == nil {
if err != nil {
if !kerrors.IsNotFound(err) {
return nil, errors.Wrapf(err, "unable to check status of inference service: %s", s.Name)
}
s, err = c.kserveClient.InferenceServices(modelService.Namespace).Create(spec)
if err != nil {
log.Errorf("unable to create inference service %s: %v", isvcName, err)
Expand Down

0 comments on commit a4d01d2

Please sign in to comment.