Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jintusebastian committed Sep 13, 2023
1 parent b26296f commit 4b08117
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion interoperator/controllers/schedulers/updateinstancecount.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func updateInstanceCount(kubeConfig *rest.Config, scheme *runtime.Scheme, mapper
}
for _, sfserviceinstance := range sfserviceinstances.Items {
for _, finalizer := range sfserviceinstance.Finalizers {
if finalizer == constants.SFServiceInstanceCounterFinalizerName {
if finalizer == constants.SFServiceInstanceCounterFinalizerName && sfserviceinstance.Spec.ClusterID != "" {
instanceCount[sfserviceinstance.Spec.ClusterID]++
break
}
Expand Down Expand Up @@ -103,6 +103,7 @@ func updateInstanceCount(kubeConfig *rest.Config, scheme *runtime.Scheme, mapper
err := client.Status().Update(ctx, &sfCluster)
if err != nil {
log.Error(err, "While trying to update service instance count of sfcluster:", sfCluster.Name, "with new count:", expectedServiceInstanceCount)
continue
}
log.Info("Success", "Updated service instance count of sfcluster:", sfCluster.Name, "with new count:", expectedServiceInstanceCount)
}
Expand Down

0 comments on commit 4b08117

Please sign in to comment.