Skip to content

Commit

Permalink
Add data variable for name of ssh keys secret.
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Feb 3, 2023
1 parent acf06d8 commit 2f1cb12
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions session-manager/handlers/workshopsession.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,7 @@ def resolve_security_policy(name):
storage_class=CLUSTER_STORAGE_CLASS,
ssh_private_key=ssh_private_key,
ssh_public_key=ssh_public_key,
ssh_keys_secret=f"{session_namespace}-ssh-keys",
)

application_variables_list = workshop_spec.get("session").get("variables", [])
Expand Down Expand Up @@ -2375,9 +2376,7 @@ def _apply_environment_patch(patch):
},
},
"data": {
"id_rsa": base64.b64encode(ssh_private_key.encode("utf-8")).decode(
"utf-8"
),
"id_rsa": base64.b64encode(ssh_private_key.encode("utf-8")).decode("utf-8"),
"id_rsa.pub": base64.b64encode(ssh_public_key.encode("utf-8")).decode(
"utf-8"
),
Expand Down

0 comments on commit 2f1cb12

Please sign in to comment.