-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Pod Status when pod is pending by going through pending container #2932
Conversation
02bfcaa
to
466b842
Compare
Codecov Report
|
} | ||
|
||
func GetPodDetails(client kubernetes.Interface, ns string, podName string) PodStatus { | ||
pi := client.CoreV1().Pods(ns) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pi := client.CoreV1().Pods(ns) | |
pods := client.CoreV1().Pods(ns) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
I think we should add the same logic though for EphemeralContainerStatuses
and InitContainerStatuses
by appending them to the ContainerStatuses
.
@balopat please take a look again! |
default: | ||
reason, detail := getWaitingContainerStatus(pod.Status.ContainerStatuses) | ||
return newPendingStatus(reason, detail) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove newline
} | ||
|
||
func (e *PodErr) Error() string { | ||
return fmt.Sprintf("pod in error due to reason: %s, message: %s", e.reason, e.message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this error message is a bit confusing to me. what is the reason
vs the message
? like shouldn't the message implicitly have the reason that the pod is failing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reason is the error code and message is Message explaining Reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an example would be "Reasan: ErrImgPull", Message: "image:tag could not be fetched"
Just Reason
is not enough.
Relates to #176
Add Pod Status when pod is pending by going through pending container.
Description
User facing changes
n/a
Next PRs.
Use this #2928
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
Reviewer Notes
Release Notes