-
Notifications
You must be signed in to change notification settings - Fork 12
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
fix: logging and pf improvements, skip namespaces & non-ClusterIP svcs #249
Conversation
This PR contains a number of reliability and UX improvements for using localizer in a larger cluster. * When creating a port-forward, we don't pass a stop channel anymore. This was previously passed `ctx.Done()` which would silently stop the port-forward on ^C. This caused invalid "use of closed connection" logging that was confusing to the user but also possibly could end up in a port-forward not being fully stopped. * When shutting down, pass a temporary context that has a timeout of 30 seconds. This ensures that `/etc/host` modifications, ip pool cleanups, and other shutdown functions properly finish instead of possibly being terminated midway through during normal shutdown. * Enabled delibird to remove tracing/metrics information being sent by default in localizer binaries. This is a OSS friendly way of us getting telemetry by logging to disk instead, which a user can opt to send us when reporting bugs (more on that in future work!) * Upgraded all dependencies, including `client-go`. We still need a fork, but thankfully our fork is a single line now so it's much more likely we can upstream the change we made (the other change was upstreamed a year ago by another user!) * Exposes `stderr` from the port-forwarder to the console with a colored prefix. This makes it easier to tell when a port-forward was busted but localizer didn't detect it (or if it did, why it failed!) * Skipped namespaces by default (`kube-system`) and enabled the user to pass `--skip-namespace` to provide more (helps #212). * Skip non-clusterIP services. These aren't addressable in the cluster, so we shouldn't create a tunnel for them. This helps with `NodePort` and `LoadBalancer` service overhead that some larger clusters may have. * Reduced logging to be easier to read, while keeping a lot of helpful logs in the `debug` level. Defaults to `info` logging instead of `debug` logging (pass `--log-level debug` for that!)
return nil | ||
} | ||
|
||
var skip bool |
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 inefficent, but I figured this shouldn't be in a hot enough code path that this would matter.
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 this mostly makes sense. I have a comment/question.
🎉 This PR is included in version 1.15.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
It does not seem like the |
This PR contains a number of reliability and UX improvements for using
localizer in a larger cluster.
This was previously passed
ctx.Done()
which would silently stop theport-forward on ^C. This caused invalid "use of closed connection"
logging that was confusing to the user but also possibly could end up
in a port-forward not being fully stopped.
seconds. This ensures that
/etc/host
modifications, ip poolcleanups, and other shutdown functions properly finish instead of
possibly being terminated midway through during normal shutdown.
default in localizer binaries. This is a OSS friendly way of us
getting telemetry by logging to disk instead, which a user can opt to
send us when reporting bugs (more on that in future work!)
client-go
. We still need afork, but thankfully our fork is a single line now so it's much more
likely we can upstream the change we made (the other change was
upstreamed a year ago by another user!)
stderr
from the port-forwarder to the console with a coloredprefix. This makes it easier to tell when a port-forward was busted
but localizer didn't detect it (or if it did, why it failed!)
kube-system
) and enabled the user topass
--skip-namespace
to provide more (helps Run against multiple namespaces, but not all #212).so we shouldn't create a tunnel for them. This helps with
NodePort
and
LoadBalancer
service overhead that some larger clusters mayhave.
logs in the
debug
level. Defaults toinfo
logging instead ofdebug
logging (pass--log-level debug
for that!)