validator-elector helps run a Celo validator on Kubernetes with automatic failover. You can use validator-elector to increase availability or enable rolling deployments.
Add a validator-elector container to run as a sidecar to each Pod
running a Celo validator container. If the the Celo validator's
current block is recent, the validator-elector sidecar will race to
acquire a lock. The validator-elector container that successfully
acquires the lock makes an JSONRPC request to the Celo validator to
start validation.
The validator-elector periodically renews the lock. If the
validator-elector fails to renew the lock (e.g., Node
crash) within
a default time period, other validator-elector containers can acquire
the lock.
Before exit, a validator-elector will release the lock and make a JSONRPC request to the Celo validator to stop validation.
e2e has an example usage.
e2e/run.py