-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Added plugin to download full container logs #2221
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
base: master
Are you sure you want to change the base?
Added plugin to download full container logs #2221
Conversation
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.
@maabiddevra Thank you for this PR. Just a couple comments
@@ -53,3 +53,13 @@ plugin: | |||
- $NAMESPACE | |||
- --context | |||
- $CONTEXT | |||
download-container-logs: | |||
shortCut: Ctrl-D | |||
description: "download full log" |
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.
I think it would be good to indicate to the users where the logs will be downloaded.
background: true | ||
args: | ||
- -c | ||
- "kubectl logs -n $NAMESPACE $POD -c $NAME --context $CONTEXT > $POD.log" |
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.
Do we want the download to land in the cwd?
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.
yes it will download to current working directory, or i can change it to $HOME ?
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.
log files have the potential to be sizeable and possibly ephemeral, wondering if parking them in tmp might be a better solution?
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.
Perhaps add a config setting so the user can define where logs should be downloaded to.
$HOME seems like a reasonable default. /tmp can be very small on security hardend systems.
If size is an issue, compress it on the fly.
@maabiddevra It looks like there is conflict with the latest drop. Could you update your pr? Thank you! |
Added a new plugin command to download full container logs to local, it is useful when logs are very large after downloading can check the logs easily on local.
Command shortcut:- Ctrl-D