Skip to content

Commit

Permalink
Better message when instance does not have plan starter (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
alenkacz authored and kensipe committed Jul 25, 2019
1 parent fa217f9 commit fe22b4d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/util/health/ready.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ func IsHealthy(c client.Client, obj runtime.Object) error {
case *kudov1alpha1.Instance:
// Instances are healthy when their Active Plan has succeeded
plan := &kudov1alpha1.PlanExecution{}
if obj.Status.ActivePlan.Name == "" {
return fmt.Errorf("checking health of instance %s: not healthy because does not have any active plan assigned yet", obj.Name)
}
err := c.Get(context.TODO(), client.ObjectKey{
Name: obj.Status.ActivePlan.Name,
Namespace: obj.Status.ActivePlan.Namespace,
Expand Down

0 comments on commit fe22b4d

Please sign in to comment.