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

Persist Tornjak DB info #141

Merged
merged 1 commit into from
Mar 23, 2023
Merged

Persist Tornjak DB info #141

merged 1 commit into from
Mar 23, 2023

Conversation

mrsabath
Copy link
Collaborator

Tornjak DB has to be moved to the persistent storage, e.g. same place where the SPIRE DB is kept.
Move the Tornjak DB to persistent storage and update the file name to be more descriptive.
This PR resolves issue #137

Signed-off-by: Mariusz Sabath <mrsabath@gmail.com>
@mrsabath mrsabath requested a review from maia-iyer March 22, 2023 14:59
@mrsabath mrsabath marked this pull request as ready for review March 22, 2023 20:38
@mrsabath mrsabath requested a review from lumjjb as a code owner March 22, 2023 20:38
Copy link
Collaborator

@maia-iyer maia-iyer left a comment

Choose a reason for hiding this comment

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

LGTM! Tested with Minikube and deleting the pod!

s.Db, err = agentdb.NewLocalSqliteDB("sqlite3", "./localtornjakdb", expBackoff)
s.Db, err = agentdb.NewLocalSqliteDB("sqlite3", "./tornjak.sqlite3", expBackoff)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this should end up being the run/spire/data/tornjak.sqlite3
to make sure it is in the right persistent volume. Currently this is not testable because we made the DB a required configuration.

Otherwise, the default value can be up to discussion - but given all our quickstarts have the same structure, we can have the default be placing it in the right volume for now

@maia-iyer maia-iyer merged commit d4f26fc into main Mar 23, 2023
@maia-iyer maia-iyer deleted the persist-db branch March 23, 2023 18:27
@maia-iyer maia-iyer linked an issue Mar 23, 2023 that may be closed by this pull request
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 this pull request may close these issues.

Persist Tornjak Database between restarts.
2 participants