Skip to content
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

Stream logs from deployed containers #30

Merged
merged 4 commits into from
Mar 2, 2018
Merged

Stream logs from deployed containers #30

merged 4 commits into from
Mar 2, 2018

Conversation

r2d4
Copy link
Contributor

@r2d4 r2d4 commented Feb 4, 2018

Depends on #28
Fixes #26

@r2d4 r2d4 changed the title Streaming logs Stream logs from deployed containers Feb 4, 2018
@r2d4 r2d4 changed the title Stream logs from deployed containers [WIP] Stream logs from deployed containers Feb 8, 2018
@r2d4 r2d4 changed the title [WIP] Stream logs from deployed containers Stream logs from deployed containers Feb 9, 2018
@r2d4
Copy link
Contributor Author

r2d4 commented Feb 13, 2018

@dlorenc this should be ready for a look too

@r2d4 r2d4 mentioned this pull request Feb 14, 2018
5 tasks
return errors.Wrap(err, "writing to out")
}
}
msg := fmt.Sprintf("%s Stream finished", header)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fmt.fprintf

return errors.Wrap(err, "getting pods")
}
logrus.Infof("Looking for logs to stream for %s", image)
for _, p := range pods.Items {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put these into the Pods("") query instead of doing the selection here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that field selectors support anything nested like container image fields. I couldn't find any examples of this

@r2d4
Copy link
Contributor Author

r2d4 commented Feb 27, 2018

this should be ready for another look

r2d4 and others added 4 commits February 28, 2018 21:58
Interfacer throws a warning on passing a PodInterface as a corev1.CoreV1Interface but the client-go code restricts us from doing so.
Copy link
Contributor

@dlorenc dlorenc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last comment about a cancel channel.

if bRes != nil {
for _, b := range bRes.Builds {
tag := b.Tag
go kubernetes.StreamLogsRetry(r.out, r.kubeclient.CoreV1(), tag, 5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to pass in a cancel channel?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will exit when the container exists on the cluster, so you'll receive messages up until then, which is kind of a feature 👍

@r2d4 r2d4 merged commit 71d0b88 into GoogleContainerTools:master Mar 2, 2018
@r2d4 r2d4 deleted the streaming-logs branch March 2, 2018 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants