Guess etcd replicas number function
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 30/100
调研方向
Read the proposal in this issue and the linked design reference in pull request #181, then locate the operator code that handles StatefulSets, cluster state ConfigMaps, etcd membership, endpoints, PVCs, and pods. Map how those sources determine the replica count and where scaling or recovery consumes it. Done means a function returns the highest discovered replica index plus one across the listed sources.
由索引模型根据 Issue 内容生成。
描述
According to the latest meeting 2024-06-18 MINUTES we decided that we need a function that guesses the needed amount of etcd replicas.
It can be used for recovering non-exising STS object and also for scaling from 0
Design ref: https://github.com/aenix-io/etcd-operator/pull/181
Proposal:
- Create variable
guessed=0 - Check cluster-state configmap
- if configmap exists and
initial-cluster-membersdefined- if there are any hostnames defined in
initial-cluster-members- take the hostname of pod with highest number and +1
- save value into
guessedvariable
- save value into
- take the hostname of pod with highest number and +1
- if there are any hostnames defined in
- if configmap exists and
- Check endpoins for etcd-headless service
- if there are any endpoints
- connect to the cluster using endpoint and collect information from
member list- if there are any members in output from etcd
- take the hostname with highest number and +1
- if value is greater then value in
guessed, save value intoguessedvariable
- if value is greater then value in
- take the hostname with highest number and +1
- if there are any members in output from etcd
- read endpoints from kubernetes object:
- take the hostname of the pod for endpoint with highest number and +1
- if value is greater then value in
guessed, save value intoguessedvariable
- if value is greater then value in
- take the hostname of the pod for endpoint with highest number and +1
- connect to the cluster using endpoint and collect information from
- if there are any endpoints
- read persistent volume claims that falls under StatefulSet label selector
- if there are any pvcs
- take the name of the pvc with highest number and +1
- if value is greater then value in
guessed, save value intoguessedvariable
- if value is greater then value in
- take the name of the pvc with highest number and +1
- if there are any pvcs
- read pods pods that falls under StatefulSet label selector
- if there are any pods
- take the pod name with highest number and +1
- if value is greater then value in
guessed, save value intoguessedvariable
- if value is greater then value in
- take the pod name with highest number and +1
- if there are any pods
- return
guessed
- 主要语言
- Go
- 星标
- 154
- 派生
- 31
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cozystack/etcd-operator 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
cozystack/etcd-operator#385 ·
-
难度 5/5 一周以上 新手友好度 35/100
cozystack/etcd-operator#383 ·
-
难度 5/5 一周以上 新手友好度 15/100
cozystack/etcd-operator#381 ·
-
难度 4/5 3-5 天 新手友好度 35/100
cozystack/etcd-operator#374 · 1 条评论 ·
-
Adoption deletes the legacy cluster-state ConfigMap but leaves Pods referencing it, and neither self-heal path detects the result可能已有人在做 @androndo 于 46 天前认领。 未关闭bug
难度 4/5 3-5 天 新手友好度 35/100
cozystack/etcd-operator#373 ·
查看 cozystack/etcd-operator 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
Correct local module testing instructions for Go sample contributors可能已有人在做 @slievrly 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 90/100
-
internal/core: cleanAttachmentName splits a rune at the 255-byte cap and stores invalid UTF-8可能已有人在做 @pacwestnobody 今天认领。 未关闭go good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
TestLaunchGolden spends about 98 seconds on fake-agent exit delays under -race可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
factory:subtask
难度 1/5 1 小时以内 新手友好度 95/100
维护者通常 1 天内回复