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

feat(vault): reference dynamodb storage backend in prep for migration #1381

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions vault/vault.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ local kausal = import 'ksonnet-util/kausal.libsonnet';

local secret = k.core.v1.secret,

// TODO: Remove once we are ready to migrate storage backend in ops-eu-south-0
// Add GCS storage settings from a secret
withStorageGCSFromSecret(secret_name, secret_key, bucket):: {
_config+:: { vault+: { config+: {
Expand All @@ -31,6 +32,19 @@ local kausal = import 'ksonnet-util/kausal.libsonnet';
statefulset+: k.util.secretVolumeMount(secret_name, '/var/run/secrets/gcs-auth'),
},

withStorageDynamoDB(region, table):: {
_config+:: { vault+: { config+: {
storage+: {
dynamodb+: {
region: region,
table: table,
ha_enabled: 'true',
},
},
} } },
},

// TODO: Replace with withStorageDynamoDB once we are ready to migrate ops-eu-south-0
// Create the secret from a service account key and add the settings
withStorageGCS(bucket, key):: {
gcs_auth_secret:
Expand Down
Loading