feat: Allow configuring leader election namespace#1333
feat: Allow configuring leader election namespace#1333ratschance wants to merge 2 commits intoNVIDIA:mainfrom
Conversation
Add CLI flag to allow configuring the LeaderElectionNamespace on the controller-runtime's manager. This namespace is where the operator places its Lease object, and when unset, defaults to the namespace that the operator is running in. This new CLI flag defaults to an empty string to preserve that original behavior. Signed-off-by: Conrad Ratschan <cratschan@coreweave.com>
|
This PR is stale because it has been open 90 days with no activity. This PR will be closed in 30 days unless new comments are made or the stale label is removed. To skip these checks, apply the "lifecycle/frozen" label. |
|
👋 anything I can do (or am missing) to help gain traction on this one? |
|
@ratschance Do you anticipate creating a lease in a namespace other than the operator's namespace? It's not configurable right now because we want the Lease object to be in the same namespace. Since leader election is also not configurable via helm chart, I'm not entirely sure this change is necessary. |
|
@rajathagasthya Yes, we currently run the operator in a separate management cluster and give it a kubeconfig for the cluster it operates on. This leads to failures if we do not create a namespace in the tenant cluster matching the management cluster namespace that is hosting the gpu operator pod. Not using the helm chart this project provides due to the nature of this configuration. |
|
@ratschance Thanks for sharing context on your setup. I'm curious — in your split-cluster deployment, how are you handling the |
|
@rajathagasthya For that, we have it set as |
|
@ratschance Got it. This change makes sense to me, we'll review this. In the meantime, could you rebase? Thanks! |
Add CLI flag to allow configuring the LeaderElectionNamespace on the controller-runtime's manager. This namespace is where the operator places its Lease object, and when unset, defaults to the namespace that the operator is running in. This new CLI flag defaults to an empty string to preserve that original behavior.