Change DrupalSite CRD to allow easy management of initialization processes
Currently we run site-install
on every DrupalSite
CR creation.
This is an issue when the CR created is a recovery from a deleted website for example.
To solve this issue, and allow flexibility, add a new field on the Spec, example initialized:true/false
, in order to manage the initialization.
We should do the following steps on the Operator to achieve this:
-
Add new field on the spec
-
The installation/clone job is only ensured if spec initialized: false
-
On the ensureSpec
, check ifinitialized: false
then lookup site-install/clone job have validate if it iscompleted
, if it is then update the spec toinitialized: true
, if looking up the jobs returns an error, the error should be ignored as jobs might not yet been created -
Remove initialized
fromStatus