Skip to content

Commit

Permalink
fix: include NDSLABS_EMAIL (for DSpace)
Browse files Browse the repository at this point in the history
  • Loading branch information
bodom0015 committed Jan 12, 2024
1 parent 7d2108c commit 936062c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion api/v1/user_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ def to_spec_map(specs, existing_map=None):


def create_userapp(stack, user, token_info):
logger.info('token_info=%s' % token_info)
username = kube.get_username(user)
user_email = token_info['email']
stack['creator'] = username
stack_id = generate_unique_id(user)
stack['id'] = stack['_id'] = stack_id
Expand All @@ -84,7 +86,7 @@ def create_userapp(stack, user, token_info):
kube.init_user(username=user)

# Create service(s) / ingress / deployment
kube.create_userapp(username=username, userapp=stack, spec_map=spec_map)
kube.create_userapp(username=username, email=user_email, userapp=stack, spec_map=spec_map)

# Save metadata to database
stack = data_store.create_userapp(stack)
Expand Down
3 changes: 2 additions & 1 deletion pkg/kube.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def get_init_container(username, spec_key, svc_key):


# Creates the Kubernetes resources related to a userapp
def create_userapp(username, userapp, spec_map):
def create_userapp(username, email, userapp, spec_map):
namespace = get_resource_namespace(username)
containers = []
ingress_hosts = {}
Expand Down Expand Up @@ -523,6 +523,7 @@ def create_userapp(username, userapp, spec_map):

configmap_data['NDSLABS_STACK'] = userapp_id
configmap_data['NDSLABS_USER'] = username
configmap_data['NDSLABS_EMAIL'] = email
configmap_data['NDSLABS_NAMESPACE'] = namespace
configmap_data['NDSLABS_SERVICE'] = stack_service['id']
configmap_data['NDSLABS_DOMAIN'] = config.DOMAIN
Expand Down

0 comments on commit 936062c

Please sign in to comment.