Fix logging
The following discussion from !90 (merged) should be addressed:
-
@kosamara started a discussion: (+10 comments) It's not a good idea to emit log lines from very deep in the call stack, because it increases the nesting levels and makes it more complex to reason about our code. The reasoning for having this log line is valid though.
We can calculate the number of replicas at the beginning of the reconciliation, before "ensure deployment". The replicas will also depend on the QoS class, even though we haven't implemented it yet. Therefore, this function can receive a precalculated number of replicas.
The calculation of the number of replicas can happen in a new function around here. Arguably, it could also be a new field in the DrupalSite Status, since it could be of interest to the end-users. In that case, you won't have to change the signature of this function at all.
For the moment, the calculation will only deal with Blocking status, but later it will be easy to extend to include the QoS.