Skip to content

Commit

Permalink
More genesis vault path keys
Browse files Browse the repository at this point in the history
[Kit Authoring Improvements]

* You can now find more genesis environment information in the manifest.
  In addition to the existing keys under `genesis.`, you can now find
  the vaultified environment (dashes into slashes) in
  `genesis.vault_env`, and the full path for the secrets and exodus
  base: `genesis.secrets_base` and `genesis.exodus_base` respectively.
  `genesis.secrets_base` is the same value as `meta.vault` but with the
  trailing `/`.
  • Loading branch information
dennisjbell committed Oct 6, 2022
1 parent b772e3a commit 9e63a74
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/Genesis/Env.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1046,9 +1046,12 @@ sub secrets_mount {

# }}}
# secrets_slug - returns the component of the Vault path under the mount that represents this environment (env: GENESIS_SECRETS_SLUG) {{{
sub default_secrets_slug {
sub env_vault_slug {
(my $p = $_[0]->name) =~ s|-|/|g;
return $p."/".$_[0]->top->type;
return $p;
}
sub default_secrets_slug {
return $_[0]->env_vault_slug()."/".$_[0]->top->type;
}
sub secrets_slug {
$_[0]->_memoize(sub {
Expand Down Expand Up @@ -2225,10 +2228,13 @@ EOF
name: (( concat genesis.env "-$type" ))
genesis:
env: ${\(scalar $self->lookup(['genesis.env','params.env'], $self->name))}
secrets_path: ${\($self->secrets_slug)}
vault_env: ${\($self->env_vault_slug)}
secrets_mount: ${\($self->secrets_mount)}
exodus_path: ${\($self->exodus_slug)}
secrets_path: ${\($self->secrets_slug)}
secrets_base: ${\($self->secrets_base)}
exodus_mount: ${\($self->exodus_mount)}
exodus_path: ${\($self->exodus_slug)}
exodus_base: ${\($self->exodus_base)}
ci_mount: ${\($self->ci_mount)}${\(
($self->use_create_env || $self->bosh_env eq $self->name) ? "" :
"\n bosh_env: $bosh_target")}
Expand Down

0 comments on commit 9e63a74

Please sign in to comment.