Skip to content

Conversation

alvaroaleman
Copy link
Member

Controller-Runtime starts the certwatcher in the webhook server, which means it always runs regardless of the current replica being leader or not.

It turns out that kubebuilder adds it to the manager and as a result, it only runs on leader replicas. Make it a LeaderElectionRunnable and don't require leader election so that it will work correctly even if other projects use it in ways that were not originally anticipated.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 11, 2025
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 11, 2025
@sbueringer
Copy link
Member

/assign

Controller-Runtime starts the certwatcher in the webhook server, which
means it always runs regardless of the current replica being leader or
not.

It turns out that kubebuilder adds it to the manager and as a result, it
only runs on leader replicas. Make it a `LeaderElectionRunnable` and
don't require leader election so that it will work correctly even if
other projects use it in ways that were not originally anticipated.
@sbueringer
Copy link
Member

I didn't realize that cert watcher implements the Runnable interface. I hope it works correctly used as a Runnable, but I don't see anything obvious why it wouldn't

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 11, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 43b3f20ae7c738e3850e83b80d6c1760f7f0cf1a

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman, sbueringer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [alvaroaleman,sbueringer]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 019a52f into kubernetes-sigs:main Aug 11, 2025
9 checks passed
@alvaroaleman alvaroaleman deleted the certwatcher-le branch August 11, 2025 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants