kubernetes: opt-in to connect only to Ready pods

未关闭
#223 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
elixir
领域
backend

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Elixir
星标
2.2k
派生
202
平均合并
2 分钟
30 天内合并 PR
1

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

bitwalker/libcluster 的其他 Issue

查看 bitwalker/libcluster 的全部 Issue

相似的 Issue

更多 Elixir Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。