aenix-io / etcd-operator

New generation community-driven etcd-operator!
https://etcd.aenix.io
Apache License 2.0
82 stars 14 forks source link

Simplify the condition transition rules #129

Closed lllamnyp closed 5 months ago

lllamnyp commented 5 months ago

When the cluster is initializing, either a quorum has not yet been established, so if the sts isn't ready, we don't change the reason for etcd not ready, or the cluster has initialized, so we set the status based on the sts state. This reduces the amount of nesting and repeated code in the condition/reason checks.