carlosedp / cluster-monitoring

Cluster monitoring stack for clusters based on Prometheus Operator
MIT License
740 stars 200 forks source link

Change path of storage #61

Closed exArax closed 4 years ago

exArax commented 4 years ago

Hello,

How could I change the path that database is stored ? I would like change the path to my secondary hdd

carlosedp commented 4 years ago

You need a PersistentVolume to store the data. Could be a HostPath on the host the containers are running.

exArax commented 4 years ago

Is HostPath an information that I could add on base_operator_stack.jsonnet under the section of prometheus?

carlosedp commented 4 years ago

No, in this case, you first need to create a PV manually (as described here) with the same volume or bigger pointing to the HostPath you plan to store your files. This PV will stay "unbound" waiting for a PVC (claim).

It's one PV for Grafana (2GB) and another for Prometheus (20GB). These sizes can be adjusted in base_operator_stack.jsonnet.

Then you enable the persistence in vars.jsonnet and re-generate the manifests. When they get applied, each PVC will claim a PV.

carlosedp commented 4 years ago

Just committed https://github.com/carlosedp/cluster-monitoring/commit/357a39a627de2ae29eca8e7c7e23aac84c95863f. Take a look. It would make easier.