issues
search
aenix-io
/
etcd-operator
New generation community-driven etcd-operator!
https://etcd.aenix.io
Apache License 2.0
90
stars
13
forks
source link
Improve conditions processing
#79
Closed
aobort
closed
7 months ago
aobort
commented
7 months ago
If conditions list is empty, fill it with all possible conditions in "False" state. This will allow to observe which phases cluster object should pass and already passed before it's in ready state (
https://github.com/aenix-io/etcd-operator/blob/main/internal/controller/etcdcluster_controller.go#L75-L84
).
Move initiail conditions' list filling and further condition(s) state update to separate function. This will decrease complexity of
Reconcile
method, improve code readability and make it easier to add new conditions. (
https://github.com/aenix-io/etcd-operator/blob/main/internal/controller/etcdcluster_controller.go#L102-L125
)
Update condition's
lastTransitionTime
only if the status changed
Reconcile
method, improve code readability and make it easier to add new conditions. (https://github.com/aenix-io/etcd-operator/blob/main/internal/controller/etcdcluster_controller.go#L102-L125)lastTransitionTime
only if the status changed