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

pkg/cvo/metrics: Graceful server shutdown #349

Merged

Commits on Jun 16, 2020

  1. pkg/start: Drop the internal EnableMetrics

    We've had it since 2b81f47 (cvo: Release our leader lease when we
    are gracefully terminated, 2019-01-16, openshift#87), but it's redundant
    vs. "ListenAddr is not an empty string".
    
    I'm also switching to:
    
      o.ListenAddr != ""
    
    instead of:
    
      len(o.ListenAddr) > 0
    
    because it seems slightly easier to understand, but obviously either
    will work.
    wking committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    07e5809 View commit details
    Browse the repository at this point in the history
  2. pkg/cvo/metrics: Graceful server shutdown

    Somewhat like the example in [1].  This pushes the server management
    down into a new RunMetrics method, which we then run in its own
    goroutine.  This is initial groundwork; I expect we will port more of
    our child goroutines to this framework in follow-up work.
    
    [1]: https://golang.org/pkg/net/http/#Server.Shutdown
    wking committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    b30aa0e View commit details
    Browse the repository at this point in the history
  3. pkg/start: Register metrics directly

    Pulling this up out of cvo.New() while working to decouple metrics
    handling from the core CVO goroutine.
    wking committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    53566c0 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2020

  1. pkg/cvo/egress: Pull HTTPS/Proxy egress into separate file

    These are not just for available updates, they're also for downloading
    signatures.  Placing them in a separate file makes it easier to focus
    on the code that is specific to available updates.
    wking committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    06cb138 View commit details
    Browse the repository at this point in the history