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

Running leader election on KEDA running outside of cluster mode #5404

Closed
aliaqel-stripe opened this issue Jan 18, 2024 · 0 comments · Fixed by #5405
Closed

Running leader election on KEDA running outside of cluster mode #5404

aliaqel-stripe opened this issue Jan 18, 2024 · 0 comments · Fixed by #5405
Labels
bug Something isn't working

Comments

@aliaqel-stripe
Copy link
Contributor

Report

Similar to what we experienced running Out Of Cluster mode in Karpenter here, when trying to run leader election in OutOfCluster mode (i.e when we pass a kubeconfig file as a launch arg), the KEDA operator crashes on launch with

unable to find leader election namespace: not running in-cluster, please specify LeaderElectionNamespace

I believe for KEDA since we have kedautil.GetPodNamespace() already, we can add

LeaderElectionNamespace: kedautil.GetPodNamespace(),

to the controller manager initializer .

Expected Behavior

When running in OutOfCluster mode with a passed in Kubeconfig, Leader Election should work.

Actual Behavior

KEDA crashes on launch with

unable to find leader election namespace: not running in-cluster, please specify LeaderElectionNamespace

Steps to Reproduce the Problem

  1. Run KEDA-Operator in OutOfCluster mode by passing in kubeconfig file as launch arg
  2. Enable Leader Election

Logs from KEDA operator

unable to find leader election namespace: not running in-cluster, please specify LeaderElectionNamespace

KEDA Version

None

Kubernetes Version

1.25

Platform

Amazon Web Services

Scaler Details

No response

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant