kubernetes: opt-in to connect only to Ready pods

Abierto
#223 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
elixir
Área
backend

Línea de trabajo

Start by reading the Kubernetes strategy implementation and its tests for pods mode; the issue does not name specific files. Trace how discovered pod conditions affect which pods are connected, then check how the proposed opt-in setting fits the existing configuration and documentation. Done means the default preserves current behavior and the ready-only option connects only to pods with a Ready condition of True.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Steps to reproduce
  • Configuration Used: Cluster.Strategy.Kubernetes, kubernetes_ip_lookup_mode: :pods, any namespace/selector.
  • Strategy Used: Cluster.Strategy.Kubernetes (pods mode).
  • Errors/Incorrect Behaviour Encountered: the strategy connects to every discovered pod that is Running, has an IP and is not terminating, including pods whose Ready condition is False.
Description of issue

That behavior is deliberate (the docs say readiness can depend on cluster formation), but it rules out a common deployment shape: only dialling a peer once it is actually serving. In our case a pod that is distributed but still booting should be discovered yet not connected to, because the work handlers are not up.

Endpoints and EndpointSlice modes gate on readiness, but they're a flat address list that drops terminating endpoints, so they can't express "discovered but not dialable". Pods mode already returns the conditions, so no extra request is needed.

Would an opt-in option in pods mode be acceptable in principle?

kubernetes_pod_readiness: :any | :ready
  • :any (default) keeps connecting to non-ready Running pods, as today.
  • :ready only connects to pods whose Ready condition is True.

The documentation is correct as written; this would be an additional mode rather than a correction.

Lenguaje dominante
Elixir
Estrellas
2.2k
Forks
202
Merge medio
2 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de bitwalker/libcluster

Todos los issues de bitwalker/libcluster

Issues similares

Más issues de Elixir

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.