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

Ability to Use Postgres as a Backing Store for VSecM Safe #1165

Merged
merged 13 commits into from
Oct 12, 2024
Merged

Conversation

v0lkan
Copy link
Contributor

@v0lkan v0lkan commented Oct 10, 2024

Ability to Use Postgres as a Backing Store for VSecM Safe

Description

This pull request provides the option for VMware Secrets Manager to use Postgres as a backing store instead of the default "persistent volume."

Changes

  • Added a new backing store type "postgres"
  • When backing store is configured to be "postgres" any attempt to read from and write to disk panicks.
  • Ability to configure VSecM Safe for postgres usage
  • Configuration update is dynamic (no need to restart VSecM Safe)

To configure, a command like the following will be needed:

k exec $S -n vsecm-system -- safe \
-w vsecm-safe \
-s '{"config":{"backingStore":"postgres","dataSourceName":"postgresql://postgres:Hx07Cvjf4Q@my-postgres-postgresql.default.svc.cluster.local:5432/postgres?sslmode=disable"}}'

Code Quality

  • I have followed the coding standards for this project.
  • I have performed a self-review of my code.
  • My code is well-commented, particularly in areas that may be difficult
    to understand.

Additional Comments

This is an initial stab at this feature.
Follow-up issues will

  • Address any TODO: item in the comments.
  • Create documentation
  • Update unit and integration tests.
  • Flexibility in configuration (for example, ability to change the name of the database table to be used)

Checklist

Before you submit this PR, please make sure:

  • You have read the contributing guidelines and
    especially the test policy.
  • You have thoroughly tested your changes.
  • You have followed all the contributing guidelines for this project.
  • You understand and agree that your contributions will be publicly available
    under the project's license.

By submitting this pull request, you confirm that my contribution is made under
the terms of the project's license and that you have the authority to grant
these rights.


Thank you for your contribution to VMware Secrets Manager
🐢⚡️!

@v0lkan v0lkan merged commit 4d050c9 into main Oct 12, 2024
@v0lkan v0lkan deleted the ovolkan/postgres branch October 12, 2024 03:07
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.

1 participant