Uploaded image for project: 'OpenShift BuildConfig'
  1. OpenShift BuildConfig
  2. OCPBUILD-149

Wire global context through all controllers in openshift-controller-manager

XMLWordPrintable

    • False
    • False

      User Story

      As an OpenShift cluster administrator/SRE
      I want ocm controllers to use a shared global context
      So that the controller manager gracefully terminates during cluster upgrades

      Acceptance criteria

      • Controllers managed by openshift-controller-manager inherit the same context object.
      • Parent context uses signal handlers to ensure the process gracefully terminates

      QE Impact

      It may be difficult for QE to verify this behavior, or to even write unit tests that verify behavior.

      Docs Impact

      None

      PX impact

      None

      Notes

      This is a bit of tech debt that was revealed during the k8s 1.23 rebase. Upstream Kubernetes is making more of its core context-aware, and openshift-controller-manager uses a lot of core Kubernetes code in its implementation of various controllers.

      Golang contexts have two features that can help improve performance with respect to graceful termination:

      1. Contexts can be cancellable, and objects can watch a "stop" channel to break out of time-intensive routines
      2. Context can have parent -> child relationships, so if a parent context is cancelled the child contexts are also cancelled.

              Unassigned Unassigned
              adkaplan@redhat.com Adam Kaplan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: