Running leader election on KEDA running outside of cluster mode #5404
Closed
Description
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
- Run KEDA-Operator in OutOfCluster mode by passing in kubeconfig file as launch arg
- 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
Metadata
Assignees
Labels
Type
Projects
Status
Ready To Ship