strangelove-ventures / cosmos-operator

Cosmos Operator is a kubernetes operator for managing cosmos nodes
Apache License 2.0
75 stars 18 forks source link

version check patch #383

Closed agouin closed 9 months ago

agouin commented 9 months ago

The version-check initContainer and version-check-term container should use the Patch operation instead of Update to avoid race conditions that can result in errors logs such as:

failed to patch status: Operation cannot be fulfillfed on cosmosfullnodes.cosmos.strange.love: the object has been modified

This is only seen intermittently, and the instance will automatically recover on the next restart.

Since the version check is a synchronous operation per instance, we don't need to worry about multiple concurrent writers to the status.height of the specific instance. The RPC status.height updates will only occur after this when the node is started.