You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use rotator.AddRotator to build a rotator.ReconcileWH and add it to the controller manager, it uses a context.Background() which is never cancelled. This means the Watch added to the controller manager is never terminated, causing the controller manager to wait its entire Options.GracefulShutdownTimeout (default: 30s) before exiting after SIGTERM/SIGINT.
IIRC controller-runtime registers the intent for a watch, but actually starts it via the manager, which passes on the context (though I could be misremembering).
The background context appears to be passed into the various client.Get() calls that occur during a reconcile event.
If you use
rotator.AddRotator
to build arotator.ReconcileWH
and add it to the controller manager, it uses acontext.Background()
which is never cancelled. This means the Watch added to the controller manager is never terminated, causing the controller manager to wait its entireOptions.GracefulShutdownTimeout
(default: 30s) before exiting after SIGTERM/SIGINT.https://github.com/open-policy-agent/cert-controller/blob/master/pkg/rotator/rotator.go#L110
Can
rotator.AddRotator
be made to accept a context and pass it through so the controller can exit quickly & gracefully?Or am I using it wrong?
The text was updated successfully, but these errors were encountered: