-
Notifications
You must be signed in to change notification settings - Fork 152
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
Dump Pod Status in logs instead of complete PodSpec #1506
Conversation
Thanks for submitting this pull request 🎉. The team will review it soon and get back to you. If you haven't already, please take a moment to review our project contributing guideline and Code of Conduct document. |
pkg/kube/pod.go
Outdated
@@ -299,7 +299,7 @@ func WaitForPodCompletion(ctx context.Context, cli kubernetes.Interface, namespa | |||
} | |||
switch p.Status.Phase { | |||
case v1.PodFailed: | |||
return false, errors.Errorf("Pod %s failed. Pod details (%s)", name, log.SafeDumpPodObject(p)) | |||
return false, errors.Errorf("Pod %s failed. Pod Status details (%s)", name, log.SafeDumpPodStatusObject(p)) |
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.
We can just use p.Status.String()
directly. Changes to helper and the tests will not be necessary
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.
Agreed - then we can also remove log.SafeDumpPodObject()
.
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.
Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>
Change Overview
As of now we used to dump all Pod Spec in logs in case of error or pod failure. This PR is to dump only the Pod Status and not all Spec.
Pull request type
Please check the type of change your PR introduces:
Issues
Test Plan
Controller logs that shows only PodStatus for a Failed Mysql blueprint actionSet https://gist.github.com/akankshakumari393/3402379b3e6440f5ecd934af5204b649