Skip to content

add support for k8s leader election#1386

Merged
kenjenkins merged 2 commits intomainfrom
kenjenkins/sync-api-standalone
Apr 30, 2026
Merged

add support for k8s leader election#1386
kenjenkins merged 2 commits intomainfrom
kenjenkins/sync-api-standalone

Conversation

@kenjenkins
Copy link
Copy Markdown
Contributor

@kenjenkins kenjenkins commented Apr 22, 2026

Summary

In principle, when ingress-controller runs in the standalone mode and uses the new unified API sync, it does not need a direct connection to the Core databroker. However, ingress-controller does currently rely on Core for leader election.

Add support to instead use Kubernetes leader election in this case. Rename the acquire-databroker-lease health check to just acquire-lease to reflect that the lease being acquired is not necessarily a databroker lease. Refactor the kustomize configuration so that we can add permissions for acquiring a k8s lease object only within the 'pomerium' namespace.

Related issues

https://linear.app/pomerium/issue/ENG-3959/ingress-controller-allow-standalone-mode-independent-of-core

Checklist

  • reference any related issues
  • updated docs
  • updated unit tests
  • updated UPGRADING.md
  • add appropriate tag (improvement / bug / etc)
  • ready for review

In principle, when ingress-controller runs in the standalone mode and
uses the new unified API sync, it does not need a direct connection to
the Core databroker. However, ingress-controller does currently rely on
Core for leader election.

Add support to instead use Kubernetes leader election in this case.
Bypass the databroker lease and disable the corresponding readyz check.
Refactor the kustomize configuration so that we can add permissions for
acquiring a k8s lease object only within the 'pomerium' namespace.
@kenjenkins kenjenkins force-pushed the kenjenkins/sync-api-standalone branch from e7f0102 to 4795120 Compare April 24, 2026 22:32
@kenjenkins kenjenkins requested a review from wasaga April 27, 2026 21:36
@kenjenkins kenjenkins marked this pull request as ready for review April 27, 2026 21:40
@kenjenkins kenjenkins requested a review from a team as a code owner April 27, 2026 21:40
Comment thread cmd/controller.go Outdated
Comment thread cmd/controller.go Outdated
Comment thread cmd/controller.go Outdated
Comment thread controllers/config_controller.go
Comment thread controllers/config_controller.go
@kenjenkins kenjenkins requested a review from wasaga April 28, 2026 23:54
@kenjenkins kenjenkins merged commit 05ce0e8 into main Apr 30, 2026
8 checks passed
@kenjenkins kenjenkins deleted the kenjenkins/sync-api-standalone branch April 30, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants