From 0d15ebc2b248b019c6efea6d80c8ce16a3049bf2 Mon Sep 17 00:00:00 2001 From: George Stykalin Date: Mon, 6 May 2024 00:00:46 +0300 Subject: [PATCH] add auto init/unseal for vault --- .gitignore | 2 +- .../templates/secrets-storage/vault-keys.json.tmpl | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 pkg/resources/templates/secrets-storage/vault-keys.json.tmpl diff --git a/.gitignore b/.gitignore index 58fc5b0..fba43ea 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,5 @@ *.env *artifacts* *k8s-admin* -*vault-keys.json* +vault-keys.json *config.yaml* \ No newline at end of file diff --git a/pkg/resources/templates/secrets-storage/vault-keys.json.tmpl b/pkg/resources/templates/secrets-storage/vault-keys.json.tmpl new file mode 100644 index 0000000..c52153f --- /dev/null +++ b/pkg/resources/templates/secrets-storage/vault-keys.json.tmpl @@ -0,0 +1,8 @@ +{ + "keys": [ + {{- range $index, $key := .Modules.SecretsStorage.UnsealKeys }} + "{{ $key }}", + {{- end }} + ], + "root_token": "{{ .Modules.SecretsStorage.RootToken }}" +} \ No newline at end of file