Use Garage environment secrets and document S3 setup

Avoid Garage's root-owned secret-file permission incompatibility with non-root Kubernetes mounts. Validate generated secret formats and document fresh installation, Vault provider configuration and preservation of existing MinIO data.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Cédric Verstraeten
2026-11-04 10:51:01 +00:00
co-authored by Copilot
parent 7bccddb995
commit 8619bb1965
9 changed files with 208 additions and 48 deletions
+8 -2
View File
@@ -21,8 +21,14 @@ if [[ -z "$secret" ]]; then
--from-literal="secret-key=$(openssl rand -hex 32)"
fi
kubectl -n garage get secret garage-credentials -o json |
jq -e '.data | all(."rpc-secret", ."access-key", ."secret-key"; type == "string" and length > 0)' > /dev/null
if ! kubectl -n garage get secret garage-credentials -o json |
jq -e '.data |
(."rpc-secret" | @base64d | test("^[0-9a-f]{64}$")) and
(."access-key" | @base64d | test("^GK[0-9a-f]{32}$")) and
(."secret-key" | @base64d | test("^[0-9a-f]{64}$"))' > /dev/null; then
echo "Garage credentials are missing or invalid; restore a valid garage-credentials Secret." >&2
exit 1
fi
if [[ $# -eq 1 ]]; then
echo "Garage credentials are ready; apply your Kustomize overlay next."
exit 0