Skip to content

Commit 599561b

Browse files
authored
Merge pull request #1223 from lahabana/addPodStatus
add `pod.Status.{Reason,Message}` to `PodNotAvailable` error
2 parents e63181e + a735c77 commit 599561b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/k8s/errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ type PodNotAvailable struct {
6868

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

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

0 commit comments

Comments
 (0)