Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add persistent volume for LAPI dashboard (Metabase) #55

Closed
keliansb opened this issue Jun 30, 2022 · 4 comments · Fixed by #124
Closed

Add persistent volume for LAPI dashboard (Metabase) #55

keliansb opened this issue Jun 30, 2022 · 4 comments · Fixed by #124

Comments

@keliansb
Copy link
Contributor

Environment

Helm chart : crowdsec
Helm chart version : 0.5.0

Issue

Currently if the pod for the Local API is restarted the configurations made in the dashboard are lost (changing user password or language preferences for example).

Proposed solution

We could add an option to the Helm chart in lapi.persistentVolume to create a PVC for the metabase data, similar to the crowdsec-db and crowdsec-config PVCs.

@bmalynovytch
Copy link
Contributor

Seems to be related to #11
Right now, dashboard modifications are stored in /metabase-data whish is declared as an emptyDir, while the persistent volume is attached to /var/lib/crowdsec/data which seems to only contain data that are reset at restart.

I guess there was an inversion between mount points.

@bmalynovytch
Copy link
Contributor

bmalynovytch commented Sep 28, 2023

Ping @he2ss
This issue should be treated as critical.
Any instance of Crowdsec running with this Helm chart leaves the dashboard running with the default password (and loosing real user data) at each pod restart.

I'll try to find some time to make a PR, but fixing shouldn't take more than a couple of minutes.

Credentials are stored in the volume defined here: https://github.com/crowdsecurity/helm-charts/blob/main/charts/crowdsec/templates/lapi-deployment.yaml#L258
It'd better be a dedicated PVC (probably overkill) or as a subdir of Crowdsec's data PV (here https://github.com/crowdsecurity/helm-charts/blob/main/charts/crowdsec/templates/lapi-deployment.yaml#L262)

@albundy83
Copy link
Contributor

Hello,
any update on this one ?

@bmalynovytch
Copy link
Contributor

bmalynovytch commented Nov 21, 2023

@albundy83 did a PR yesterday, waiting for review and merge.

Fix is live on 2 clusters and works well.

he2ss pushed a commit that referenced this issue Feb 21, 2024
* Fix dashboard data volumes to use PVC instead of emptyDir
Fixes #55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants