Skip to content

rotator.AddRotator doesn't exit when the process is terminated #42

Description

@karlkfi

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.

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions