-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from akenza-io/add-support-for-vault-namespace
Add support for Vault namespaces (used in Vault Enterprise)
- Loading branch information
Showing
4 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: "3.5" | ||
services: | ||
vault: | ||
container_name: helm-vault | ||
image: vault | ||
ports: | ||
- 8200:8200 | ||
environment: | ||
VAULT_DEV_ROOT_TOKEN_ID: "802e831f-bf5e-2740-d1f1-bbd936140e0b" | ||
SKIP_SETCAP: "true" | ||
VAULT_ADDR: "http://localhost:8200" | ||
healthcheck: | ||
test: ["CMD", "vault", "status"] | ||
interval: 2s | ||
timeout: 3s | ||
retries: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
export VAULT_ADDR="http://localhost:8200" | ||
export VAULT_TOKEN="802e831f-bf5e-2740-d1f1-bbd936140e0b" | ||
export KVVERSION="v2" | ||
|
||
docker compose up -d | ||
function getContainerHealth { | ||
docker inspect --format "{{json .State.Health.Status }}" $1 | ||
} | ||
|
||
# check that vault is running | ||
while STATUS=$(getContainerHealth helm-vault); [ "$STATUS" != '"healthy"' ]; do | ||
if [ -z "$STATUS" ]; then | ||
echo "Failed to retrieve status of docker container helm-vault" | ||
exit 1 | ||
fi | ||
if [ "$STATUS" == '"unhealthy"' ]; then | ||
echo "Failed to start container helm-vault. See docker logs for details." | ||
exit 1 | ||
fi | ||
printf '.' | ||
sleep 1 | ||
done | ||
printf $'\n' | ||
|
||
# install and run tests | ||
pip3 install -r ./tests/requirements.txt | ||
python3 -m pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters