Deprecate Leader for life based leader election
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- go
- Domínio
- distributed-systems
Direção de pesquisa
Comece localizando a implementação de leader-for-life e como ela se integra ao manager e ao controller-runtime. Revise as issues vinculadas de operator-lib e controller-runtime antes de decidir o caminho de depreciação. Considera-se concluído quando a opção leader-for-life estiver deprecated e sua remoção estiver programada para futuras releases do Operator SDK, e a questão da integração upstream tiver sido abordada.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Feature Request
Is your feature request related to a problem? Please describe.
Currently, the repository contains a leader-for-life based election model that ensures that a single leader is elected for life during a HA state.
To briefly describe what leader for life and leader for lease approaches are:
(1) Leader for life: A leader pod is selected for life until its garbage collected. This ensures there is only one leader at any instant of time.
(2) Leader for lease: Leader election happens periodically at a defined interval which can be tweaked. When the current leader is not able to renew the lease, a new leader is elected.
More details on both of these approaches are available here.
Approach (2) is implemented upstream, in client-go and is scaffolded by default for the past 30+ releases of SDK, since it is implemented as a part of setting up the manager in controller-runtime. It guarantees faster election of leaders, less downtime, recovery from disconnected/frozen node failures. However, it does not eliminate the split brain scenario - where more than a single leader is available at an instant of time.
Approach (1) on the other hand, was developed long before we had a leader-for-lease implemented upstream. Though it solves the split brain scenario, it does not guarantee recovery from node failure nor faster recovery. We also have issues with integrating it to controller-runtime (https://github.com/operator-framework/operator-lib/issues/48). Neither is it being maintained nor used as widely as leader for lease.
Here is a detailed comment explaining the preference of (2) over the other, wherein users would prefer a faster recovery even though there is split brain scenario intermittently, rather than an implementation that does not guarantee faster recovery.
Describe the solution you'd like
Since leader for life approach is not being widely used, neither works with controller-runtime seamlessly, it is better to adopt a well tested upstream library than to depend on what is currently available as an option.
The solution for this is:
- To deprecate and remove leader for life in future releases of Operator SDK.
- To bring this up upstream (in controller-runtime), for easier integration. This had already been brought up upstream (https://github.com/kubernetes-sigs/controller-runtime/issues/1963) but there was no response on the same.
- Linguagem predominante
- Go
- Estrelas
- 40
- Forks
- 42
- Merge médio
- 4d 46min
- PRs com merge (30d)
- 7
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de operator-framework/operator-lib
-
Prune package?Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 25/100
-
lifecycle/frozen
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
operator-framework/operator-lib#103 · 6 comentários ·
-
lifecycle/frozen
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
operator-framework/operator-lib#48 · 4 comentários ·
Todas as issues de operator-framework/operator-lib
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
openimsdk/openim-sdk-core#1127 ·
-
github_actions
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Hochfrequenz/aibap.mcp#578 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
mvanhorn/cli-printing-press#4980 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
lenaxia/LLMSafeSpaces#1644 · 3 comentários · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
automation code-quality cookie documentation improvement quick-win task-mining
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
github/gh-aw#67262 · 2 comentários ·
Mantenedores costumam responder em até 1 dia