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

Add support of specifying Lease name for Leader Election #4178

Open
WZHGAHO opened this issue Mar 6, 2025 · 0 comments
Open

Add support of specifying Lease name for Leader Election #4178

WZHGAHO opened this issue Mar 6, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@WZHGAHO
Copy link

WZHGAHO commented Mar 6, 2025

Summary

Please add support to specify default leader election Lease lock name or generate the name to something unique which includes instance-id.

Use Cases

I use Argo Rollouts in a distributed setup where multiple Argo Rollouts Controllers with --instance-id specified are connecting to a central cluster where a central Argo Rollouts Controller is running. The distributed controllers are using kubeconfig of the central cluster, so all of them are are detecting the same Lease (which is currently specified in the code as constant value argo-rollouts-controller-lock and therefore only one is elected, even though they are differentiated because of --instance-id flag.

According to Kubernetes documentation, best practice in case multiple instances are deployed of a component is like using a hashed value or a prefix to avoid collisions for the Leases:

If a cluster operator or another end user could deploy multiple instances of a component, select a name prefix and pick a mechanism (such as hash of the name of the Deployment) to avoid name collisions for the Leases.
You can use another approach so long as it achieves the same outcome: different software products do not conflict with one another.


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

@WZHGAHO WZHGAHO added the enhancement New feature or request label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant