auto unseal with cluster instructions

This commit is contained in:
ducoterra
2021-05-24 00:21:44 -04:00
parent d86bd6c84c
commit b56a8e0c19
11 changed files with 291 additions and 41 deletions

View File

@@ -8,7 +8,7 @@ import threading
vaults = ["vault-0"]
home = os.getenv("HOME")
with open(os.path.join(home, ".vault-keys/cluster-keys.json")) as f:
with open(os.path.join(home, ".vault-keys/pivault-cluster-keys.json")) as f:
vault_secrets = json.load(f)
procs = []
@@ -18,7 +18,7 @@ for vault in vaults:
threading.Thread(
target = subprocess.run,
args = (
["kubectl", "--context", "k3os-alpha.dnet-admin-vault",
["kubectl", "--context", "pikube.dnet-admin-pivault",
"exec", "-ti", vault, "--",
"vault", "operator", "unseal",
vault_secrets.get("unseal_keys_b64")[key]],))