Skip to content

Commit

Permalink
Output unavailable resources
Browse files Browse the repository at this point in the history
  • Loading branch information
rosecrisp committed Apr 4, 2024
1 parent 784ac07 commit ce8f840
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions internal/tool/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,14 @@ func (k Kubectl) WaitForWorkloadResources(context context.Context, namespace str
return errors.New(errorMsg)
}
if len(unavailableWorkloadResources) > 0 {
errorMsg := "error unavailable workload resources, timeout has expired, please consider increasing the timeout using the chart-verifier --timeout flag"
// Initialize errorMsg
errorMsg := "error unavailable workload resources, timeout has expired, please consider increasing the timeout using the chart-verifier --timeout flag. Unavailable resources: "
for _, unavailableWorkloadResource := range unavailableWorkloadResources {
errorMsg += fmt.Sprintf("%s/%s, ", unavailableWorkloadResource.ResourceType, unavailableWorkloadResource.Name)
}
utils.LogError(errorMsg)
return errors.New(errorMsg)
return errors.New(errorMsg)
}

return nil
}

Expand Down

0 comments on commit ce8f840

Please sign in to comment.