kubernetes: opt-in to connect only to Ready pods

Đang mở
#223 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
elixir
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Elixir
Star
2.2k
Fork
202
Merge trung bình
2 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bitwalker/libcluster

Tất cả issue của bitwalker/libcluster

Issue tương tự

Thêm issue về Elixir

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.