Skip to content

Commit

Permalink
reference dynamodb storage backend in prep for migration
Browse files Browse the repository at this point in the history
  • Loading branch information
nafisat2 committed Dec 26, 2024
1 parent e13a89c commit 161c5a5
Showing 1 changed file with 14 additions and 0 deletions.
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

0 comments on commit 161c5a5

Please sign in to comment.