added missing files
This commit is contained in:
10
infra/s3/minio-entrypoint.sh
Normal file
10
infra/s3/minio-entrypoint.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
echo "Waiting for Vault Agent to render /vault/secrets/minio.env..."
|
||||
while [ ! -f /vault/secrets/minio.env ]; do
|
||||
sleep 0.5
|
||||
done
|
||||
|
||||
echo "Vault secrets ready, starting MinIO..."
|
||||
exec minio "$@"
|
||||
6
infra/s3/minio-wait.sh
Normal file
6
infra/s3/minio-wait.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
until [ -s /vault/secrets/MINIO_ROOT_USER ] && [ -s /vault/secrets/MINIO_ROOT_PASSWORD ]; do
|
||||
echo "waiting for MINIO creds"; sleep 1
|
||||
done
|
||||
exec /usr/bin/minio "$@"
|
||||
29
infra/s3/vault/agent.hcl
Normal file
29
infra/s3/vault/agent.hcl
Normal file
@@ -0,0 +1,29 @@
|
||||
auto_auth {
|
||||
method "approle" {
|
||||
mount_path = "auth/approle"
|
||||
config = {
|
||||
role_id_file_path = "/vault/secrets/role_id"
|
||||
secret_id_file_path = "/vault/secrets/secret_id"
|
||||
}
|
||||
}
|
||||
|
||||
sink "file" {
|
||||
config = { path = "/vault/token" }
|
||||
}
|
||||
}
|
||||
|
||||
template {
|
||||
source = "/etc/vault/templates/user.ctmpl"
|
||||
destination = "/vault/secrets/MINIO_ROOT_USER"
|
||||
perms = "0440"
|
||||
}
|
||||
|
||||
template {
|
||||
source = "/etc/vault/templates/password.ctmpl"
|
||||
destination = "/vault/secrets/MINIO_ROOT_PASSWORD"
|
||||
perms = "0440"
|
||||
}
|
||||
|
||||
vault {
|
||||
address = "http://vault_vault:8200"
|
||||
}
|
||||
1
infra/s3/vault/templates/password.ctmpl
Normal file
1
infra/s3/vault/templates/password.ctmpl
Normal file
@@ -0,0 +1 @@
|
||||
{{ with secret "kv/data/s3/minio" }}{{ .Data.data.password }}{{ end }}
|
||||
1
infra/s3/vault/templates/user.ctmpl
Normal file
1
infra/s3/vault/templates/user.ctmpl
Normal file
@@ -0,0 +1 @@
|
||||
{{ with secret "kv/data/s3/minio" }}{{ .Data.data.user }}{{ end }}
|
||||
Reference in New Issue
Block a user