-
Notifications
You must be signed in to change notification settings - Fork 208
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
sysdump: run bugtool even when cilium agent is not running #970
Conversation
Now that bugtool supports directly generating tar.gz files, do that and remove the explicit extra step. Signed-off-by: Casey Callendrello <cdc@isovalent.com>
When we try and run cilium-bugtool in the agent container, it fails if that container is not running (e.g. because it's in CrashLoopBackoff). So, if that's not running, fall back to an EphemeralContainer or, if that fails, create another pod for exec purposes. Fixes: cilium#871 Signed-off-by: Casey Callendrello <cdc@isovalent.com>
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.
Looks great, thank you!
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.
LGTM 💯
|
||
// CreateEphemeralContainer will create a EphemeralContainer (debug container) in the specified pod. | ||
// EphemeralContainers are special containers which can be added after-the-fact in running pods. They're | ||
// useful for debugging, either when the target container image doesn't have necessary tools, or because |
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.
when the target container image doesn't have necessary tools
This could be a good usage for us going forward, a few customers are asking if cilium agent can be with scratch/distroless/minimal base image. Right now, we rely on installing new tools (e.g. tcpdump) some one cases during troubleshooting.
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.
Indeed, it can be a big space savings, but it will be a long time before we can rely on that feature existing. Right now it's in beta, auto-enabled but behind an optional feature gate. It is scheduled to go GA in 1.25.
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 is great! Thanks @squeed!
One small concern below on the first commit.
When we try and run cilium-bugtool in the agent container, it fails if that container is not running (e.g. because it's in CrashLoopBackoff). So, if that's not running, fall back to an EphemeralContainer or, if that fails, create another pod for exec purposes.
Fixes: #871