Closed DonMartin76 closed 5 years ago
This had a very simple and straightforward fix: Surround calling npm start with a forever.sh
bash script, which just restarts the process. This makes Kubernetes usually not even detect that something has restarted.
The same thing could be applied to the api
container as well - there is now a semaphore which checks whether a stopped node process is due to a deliberate reload, or not. If it is, the container is kept up, the git repo is recloned, and everything just restarts, without e.g. Kubernetes or docker agent interaction.
Will land in 1.0.0-rc.8.
On Kubernetes environments, the restarting of the wicked environment after a configuration reload still takes unnecessarily long, even after implementing #191.
The solution of this may lie in the Kubernetes configuration, and in the liveness and readiness probes. As shows on the wicked.box environment, restarts can be pretty quick (just 2-3 seconds usually).
Explore whether using either
nodemon
orpm2
can be a solution for the non-api
containers. Theapi
container will still need a full reload, as thegit clone
happens in the startup script of the container - at least currently.