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

kube: controller lifecycle improvements #636

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

milas
Copy link
Contributor

@milas milas commented May 12, 2023

  • Optimize the Dockerfile to use cache mounts
  • Use the context.Context during HTTP operations
  • Add an internal context for normal controller operations
  • Sequence shutdown to wait for informer to stop and then attempt to unexpose any ports before exiting
    • Unexpose ports in parallel, we just log out all the errors regardless

"os"
"os/signal"
"syscall"
"time"

"github.com/moby/vpnkit/go/pkg/controller"
"github.com/moby/vpnkit/go/pkg/vpnkit"
log "github.com/sirupsen/logrus"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

logrus was being used in the controller but not here - switched for consistency and to add ability to config log level via flag

* Optimize the `Dockerfile` to use cache mounts
* Use the `context.Context` during HTTP operations
* Add an internal context for normal controller operations
* Sequence shutdown to wait for informer to stop and then
  attempt to unexpose any ports before exiting
  * Unexpose ports in parallel, we just log out all the
    errors regardless

Signed-off-by: Milas Bowman <[email protected]>
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.

1 participant