We need a readinessProbe that indicates when all vhosts are ready
When the webeos server starts, it must not process any HTTP request until all the vhosts have been generated. If it did, we could get unexpected errors for a website because we don't have it's vhost ready yet.
Kubernetes provides readinessProbe just for this purpose.
The problem is, how can we know when all vhosts are ready? Some thoughts:
- there may be a way to know that we've reconciled all resources in the SDK's libraries? In upstream operators, I've seen sometimes code waiting for Informer caches to synchronize. Not sure if it is useful here.
- we might do a first pass where we query all WebeosSite CRs and call the
reconcile
function on each of them before starting the current event-driven reconciliation? Then we're sure we have all vhosts when we start the event-driven reconciliation
@estevesm what do you think?