Skip to content

Commit

Permalink
Helm template update
Browse files Browse the repository at this point in the history
  • Loading branch information
ghecquet committed Jul 2, 2024
1 parent daf7347 commit 0acafc8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tools/kubernetes/cells/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,17 @@ data:
EXIT_STATUS=$?
if echo \"$VAULT_STATUS\" | grep '"initialized": false'; then
vault operator init -n 1 -t 1 >> ${OUTPUT?}
if echo \"$VAULT_STATUS\" | grep '"type": "shamir"'; then
vault operator init -n 1 -t 1 >> ${OUTPUT?}
unseal=$(cat ${OUTPUT?} | grep "Unseal Key 1:" | sed -e "s/Unseal Key 1: //g")
vault operator unseal ${unseal?}
else
vault operator init >> ${OUTPUT?}
fi
root=$(cat ${OUTPUT?} | grep "Initial Root Token:" | sed -e "s/Initial Root Token: //g")
unseal=$(cat ${OUTPUT?} | grep "Unseal Key 1:" | sed -e "s/Unseal Key 1: //g")
vault operator unseal ${unseal?}
vault login -no-print ${root?}
vault secrets enable -version=2 -path=secret kv
Expand Down

0 comments on commit 0acafc8

Please sign in to comment.