etcd-io / etcd-io/etcd-operator

When one of the etcd cluster member/pod is deleted, the status shown is incorrect

Open
#358 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
164
Forks
72
Avg merge
22h 46m
Merged PRs (30d)
34

Description

Steps to reproduce:

Create the CR:
```
❯ kubectl create -f operator_v1alpha1_etcdcluster.yaml
etcdcluster.operator.etcd.io/etcdcluster-sample created
```

Status seen after successful creation:
```
status:
conditions:
- lastTransitionTime: "2026-06-06T07:06:52Z"
message: Etcd cluster has 3/3 healthy members with quorum
observedGeneration: 1
reason: ClusterAvailable
status: "True"
type: Available
- lastTransitionTime: "2026-06-06T07:06:52Z"
message: Etcd cluster is stable
observedGeneration: 1
reason: ClusterStable
status: "False"
type: Progressing
- lastTransitionTime: "2026-06-06T07:06:37Z"
message: All etcd members are healthy
observedGeneration: 1
reason: ClusterHealthy
status: "False"
type: Degraded
currentReplicas: 3
currentVersion: 3.5.21
leaderID: 41f5beba5f42189a
memberCount: 3
members:
- id: 41f5beba5f42189a
isHealthy: true
isLeader: true
name: etcdcluster-sample-0
version: 3.5.21
- id: a2ec1c51b36711d8
isHealthy: true
name: etcdcluster-sample-1
version: 3.5.21
- id: b8bce8ddff0f6f4f
isHealthy: true
name: etcdcluster-sample-2
version: 3.5.21
observedGeneration: 1
readyReplicas: 3
```

Delete one the members:
```
❯ kubectl delete pod etcdcluster-sample-0
pod "etcdcluster-sample-0" deleted
❯ kubectl get pods
NAME READY STATUS RESTARTS AGE
etcdcluster-sample-0 0/1 Error 2 (17s ago) 18s
etcdcluster-sample-1 1/1 Running 0 2m4s
etcdcluster-sample-2 1/1 Running 0 119s
```

Note: respective logs are visible in the etcd operator pod.

Actual result:
```
status:
conditions:
- lastTransitionTime: "2026-06-06T07:06:52Z"
message: Etcd cluster has 3/3 healthy members with quorum
observedGeneration: 1
reason: ClusterAvailable
status: "True"
type: Available
- lastTransitionTime: "2026-06-06T07:06:52Z"
message: Etcd cluster is stable
observedGeneration: 1
reason: ClusterStable
status: "False"
type: Progressing
- lastTransitionTime: "2026-06-06T07:06:37Z"
message: All etcd members are healthy
observedGeneration: 1
reason: ClusterHealthy
status: "False"
type: Degraded
currentReplicas: 3
currentVersion: 3.5.21
leaderID: 41f5beba5f42189a
memberCount: 3
members:
- id: 41f5beba5f42189a
isHealthy: true
isLeader: true
name: etcdcluster-sample-0
version: 3.5.21
- id: a2ec1c51b36711d8
isHealthy: true
name: etcdcluster-sample-1
version: 3.5.21
- id: b8bce8ddff0f6f4f
isHealthy: true
name: etcdcluster-sample-2
version: 3.5.21
observedGeneration: 1
readyReplicas: 3
```

Expected result:
Some updates the status should showcase the Cluster is unhealthy: For example:
```
- lastTransitionTime: "2026-06-06T07:06:37Z"
message: All etcd members are not healthy
observedGeneration: 1
reason: ClusterHealthy
status: "True"
type: Degraded
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.