laksa19 / mikhmonv3

MikroTik Hotspot Monitor V3 [MikroTik API PHP]
https://laksa19.github.io
GNU General Public License v2.0
378 stars 255 forks source link

Persistent Volume on Kubernetes unable to use due to Unspesific Location of Stateful files. #41

Open anwareset opened 2 years ago

anwareset commented 2 years ago

MIKHMON is not able to save the data persistently on Kubernetes

As per my understanding this source code have several files that will be overwriten by other script it self. In example is ./include/config.php will save the MIKHMON login password. In the container orchestration platform such as Kubernetes, usually we make a PV (Persistent Volume) to save a stateful data, but only directory and not a file. If we mount a PV to ./include than every data inside those source code directory will be empty because the running container will only read the newly mounted volume.

I think it's a good idea for create a specific directory to save any stateful file on it, so we can figure how to implement persistent volume with MIKHMON on Kubernetes. You can create an specific file to save your only sateful data (string) as placeholder, not combined with any of your code (like config.php).

Thankyou.