Fix Kubernetes namespaces for dotted usernames
Build and publish Docker image / build-and-publish (push) Successful in 8s
Build and publish Docker image / build-and-publish (push) Successful in 8s
This commit is contained in:
1 parent
522e5c5634
commit
6732ee9d47
8 files changed
+70
-19
No files matched your search
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
from database_service import database_connection, dict_from_row
|
||||
from namespace_utils import user_namespace
|
||||
import json
|
||||
from runtime_config import (
|
||||
logger,
|
||||
@@ -116,7 +117,7 @@ def get_server_access_and_namespace(server_id: str, requester_id: str) -> Tuple[
|
||||
if not owner:
|
||||
raise Exception("Server owner not found")
|
||||
|
||||
namespace = f"user-{owner['username']}".lower()
|
||||
namespace = server.get('namespace') or user_namespace(owner['username'])
|
||||
return namespace, server
|
||||
|
||||
def get_user_servers(user_id: str) -> List[Dict]:
|
||||
|
||||
Reference in new issue
Block a user