A kubernetes operator for creating and managing a cache of container images directly on the cluster worker nodes, so application pods start almost instantly
The syncHandler() method of the controller is where the controller reconciles the desired state of ImageCache with actual state. The syncHandler, before starting the reconciliation, updates the status of ImageCache (interim status) to Processing.
The business logic to update the status is currently within the syncHandler() method, with some amount of boiler plate. the logic to construct the status variable is best moved to separate methods of the controller. Proposal is to have two different methods:-
createStatusProcessing() generates the interim status
The syncHandler() method of the controller is where the controller reconciles the desired state of ImageCache with actual state. The syncHandler, before starting the reconciliation, updates the status of ImageCache (interim status) to Processing.
The business logic to update the status is currently within the syncHandler() method, with some amount of boiler plate. the logic to construct the status variable is best moved to separate methods of the controller. Proposal is to have two different methods:-
createStatusProcessing()
generates the interim statuscreateStatusFinal()
generates the final status