HomeClusterLabs Projects

podman-etcd: compute dynamic revision bump from maxRaftIndex (#2087)

Description

podman-etcd: compute dynamic revision bump from maxRaftIndex (#2087)

Replace hardcoded 1 billion revision bump with dynamic calculation based
on 20% of the last known maxRaftIndex from revision.json.

This aligns with the logic used by cluster-etcd-operator's
quorum-restore-pod utility and ensures the bump amount is proportional
to the cluster's actual revision state.

The implementation:

  • Adds compute_bump_revision() function with safe fallback to 1bn default
  • Extracts magic values to named constants (ETCD_REVISION_BUMP_PERCENTAGE, ETCD_BUMP_REV_DEFAULT, ETCD_REVISION_JSON)
  • Validates computed values (non-zero, not exceeding default)
  • Logs computation results for debugging

Reference:
https://github.com/openshift/cluster-etcd-operator/blob/215998939f5223da9166
22c71fd07d17656faf6b/bindata/etcd/quorum-restore-pod.yaml#L26-L34

Details

Provenance
clobranoAuthored on Tue, Oct 28, 7:47 AM
GitHub <noreply@github.com>Committed on Tue, Oct 28, 7:47 AM
Parents
rRfc3c646f9572: OCPEDGE-1502: feat: podman-etcd: add support for cert rotation (#2085)
Branches
Unknown
Tags
Unknown