Skip to content

Commit

Permalink
Merge pull request #1223 from lahabana/addPodStatus
Browse files Browse the repository at this point in the history
add `pod.Status.{Reason,Message}` to `PodNotAvailable` error
  • Loading branch information
denis256 authored Jan 13, 2023
2 parents e63181e + a735c77 commit 599561b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/k8s/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ type PodNotAvailable struct {

// Error is a simple function to return a formatted error message as a string
func (err PodNotAvailable) Error() string {
return fmt.Sprintf("Pod %s is not available", err.pod.Name)
return fmt.Sprintf("Pod %s is not available, reason: %s, message: %s", err.pod.Name, err.pod.Status.Reason, err.pod.Status.Message)
}

// NewPodNotAvailableError returnes a PodNotAvailable struct when Kubernetes deems a pod is not available
Expand Down

0 comments on commit 599561b

Please sign in to comment.