How to auto restart OpenShift deployment on a weekly/daily basis?

2.3k Views Asked by At

I'm having a flask app that fetches data from external source only at application startup. I need to refresh app data, and the easiest way (without changing app logic) would be to daily restart deployment (scale pod to zero and up again).

Is this possible to achieve this in deployment configuration (DeploymentConfig)? OpenShift version is v3.11.104.

1

There are 1 best solutions below

0
diman82 On

Seems to be solvable with running an app using OpenShift Cronjob, configuring the Cronjob to be run every day, and setting ConcurrencyPolicy param to Replace.