kubernetes: opt-in to connect only to Ready pods

Offen
#223 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
elixir
Bereich
backend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Elixir
Sterne
2.2k
Forks
202
Ø Merge
2 Min.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus bitwalker/libcluster

Alle Issues in bitwalker/libcluster

Ähnliche Issues

Weitere Issues zu Elixir

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.