-
Notifications
You must be signed in to change notification settings - Fork 606
Log init containers and remove previous flag #393
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
Conversation
pkg/operator/workloads/logs.go
Outdated
processToKill.Kill() | ||
func GetContainerLogs(pod kcore.Pod) strset.Set { | ||
containerStatuses := pod.Status.InitContainerStatuses | ||
containerStatuses = append(containerStatuses, pod.Status.ContainerStatuses...) |
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: This can be containerStatuses = append(pod.Status.InitContainerStatuses, pod.Status.ContainerStatuses...)
pkg/operator/workloads/logs.go
Outdated
if status.State.Terminated != nil && (status.State.Terminated.ExitCode != 0 || status.State.Terminated.StartedAt.After(time.Now().Add(-newPodCheckInterval))) { | ||
set.Add(GetLogKey(pod, status).String()) | ||
} | ||
if status.State.Running != nil { |
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: might as well make this an else if
? not a big deal, whatever you think is best/clearest
pkg/operator/workloads/logs.go
Outdated
if err != nil { | ||
for _, processToKill := range processList { | ||
processToKill.Kill() | ||
func GetContainerLogs(pod kcore.Pod) strset.Set { |
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: can you think of a better name for this function?
pkg/operator/workloads/logs.go
Outdated
func GetContainerLogs(pod kcore.Pod) strset.Set { | ||
containerStatuses := pod.Status.InitContainerStatuses | ||
containerStatuses = append(containerStatuses, pod.Status.ContainerStatuses...) | ||
set := strset.New() |
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: "set" -> "logKeys"?
Closes #324
Checklist:
make test
andmake lint
cx refresh
)summary.md
)