Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set LeaderElectionNamespace to PodNamespace #5405

Conversation

aliaqel-stripe
Copy link
Contributor

@aliaqel-stripe aliaqel-stripe commented Jan 18, 2024

Sets the LeaderElectionNamespace on the controller runtime in keda-operator to use the PodNamespace so that leader election works in OutOfCluster mode. This is based on a similar change we had to make in karpenter

Couldn't find any general tests that test the operator but since this uses an existing utility and a parameter passed to the controller runtime, I don't think it's changing behavior enough to KEDA that it warrants a new test, but let me know and I'll happily write a new test!

I did validate manually in my own cluster and this worked.

Checklist

Fixes #5404

@aliaqel-stripe aliaqel-stripe marked this pull request as ready for review January 18, 2024 19:31
@aliaqel-stripe aliaqel-stripe requested a review from a team as a code owner January 18, 2024 19:31
@aliaqel-stripe aliaqel-stripe changed the title [fix] Set LeaderElectionNamespace to PodNamespace Set LeaderElectionNamespace to PodNamespace Jan 18, 2024
Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, just a nit in the changelog

CHANGELOG.md Outdated Show resolved Hide resolved
@aliaqel-stripe aliaqel-stripe force-pushed the aliaqel/issue-5404-outofcluster-leaderelection branch from c40343f to 571219d Compare January 18, 2024 19:53
@aliaqel-stripe
Copy link
Contributor Author

/run-e2e

@JorTurFer
Copy link
Member

JorTurFer commented Jan 18, 2024

/run-e2e
Update: You can check the progress here

@JorTurFer JorTurFer enabled auto-merge (squash) January 18, 2024 20:30
@JorTurFer
Copy link
Member

JorTurFer commented Jan 18, 2024

/run-e2e
Update: You can check the progress here

@JorTurFer
Copy link
Member

/skip-e2e

@JorTurFer JorTurFer merged commit 367fcd3 into kedacore:main Jan 18, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running leader election on KEDA running outside of cluster mode
4 participants