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

fix: mount persistence PVC into migration #185

Merged
merged 3 commits into from
Nov 15, 2024

Conversation

lukas-reining
Copy link
Contributor

fixes: flipt-io/flipt#3616

Hey, when using --set migrations.enabled=true, and using --set persistence.enabled=true with SQLite, migrations fail because the persistent volume is not mounted into the pod of the migration job.
For testing and eval systems, using the SQLite is good enough and so it would be good to also be able to run the migrations automatically on them.
I created a copy of the migration job pod with the PVC mounted and it worked well!

Copy link
Member

@GeorgeMac GeorgeMac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lukas-reining !

Another way to approach this is (for future reference), when using SQLite for evaluation purposes, is to drop the migration job and instead add the following to the values.yaml:

flipt:
  args:
  - "--force-migrate"

Flipt has its migrations embedded and can run them before initializing the server.
Glad this approach works too though!

p.s. could you bump the patch version for me on the chart 🙏

@lukas-reining
Copy link
Contributor Author

Another way to approach this is (for future reference), when using SQLite for evaluation purposes, is to drop the migration job and instead add the following to the values.yaml:

Ah I did not see that one, good point!

Glad this approach works too though!

I think it is also good that the offered way to do migrations works for any storage option :)

p.s. could you bump the patch version for me on the chart 🙏

Done! Just now saw that the lint failed before.

@lukas-reining
Copy link
Contributor Author

can you approve the check @GeorgeMac? :)

@kodiakhq kodiakhq bot merged commit 07b3551 into flipt-io:main Nov 15, 2024
2 checks passed
@lukas-reining lukas-reining deleted the fix/mount-pv-in-migration-job branch November 15, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Helm Chart migrations do not mount PVC for persistence feature
3 participants