|
Ran
|
Jobs
1
|
Files
147
|
Run time
1min
|
Badge
README BADGES
|
push
github
fix: failover and sentinel StatefulSets were recreated on every change (#134) IsStatefulsetChanged2 decides whether a detected change can be applied in place, or needs the StatefulSet deleted with the Orphan policy and created again. It compares the specs outside the mutable fields, and two fields always differed between the builder output and the object read back from the API server: - revisionHistoryLimit, which the builders leave unset and the API server defaults to 10. cmpopts.EquateEmpty only equates empty slices and maps, so nil and 10 differ. - the status of each volume claim template, which the API server sets to phase Pending and the builders leave empty. Only failover instances with storage have claim templates. So every change that IsStatefulsetChanged detected, a new pod annotation for example, recreated the data and the sentinel StatefulSet of a failover instance. Reproduced on Kind with v2.0.1: the pods lost their owner and were adopted by the new StatefulSets, and in that second the failover engine logged "master not found on any nodes, maybe master is down" eight times. Both fields are now ignored in that comparison. A real change to a claim template, such as its size, is still classified as immutable. On Kind, the same change now updates all four StatefulSets of two failover instances, one with storage and one without, in place, keeping their UIDs and PVCs. Before Kubernetes v1.33, revisionHistoryLimit is immutable. The update carries it unset and the API server defaults it to 10 before validating, so the update is accepted. A value changed by hand on the live StatefulSet still hits the actors' existing fallback on "updates to statefulset spec for fields other than" and is recreated, as before. (cherry picked from commit 33f063cdc)
2 of 2 new or added lines in 1 file covered. (100.0%)
5533 of 20800 relevant lines covered (26.6%)
0.3 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 36077131083.1 | 147 |
26.6
|
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|