FileserverBuilder#
- class controller.services.builder.fileserver.FileserverBuilder(*, config, base_url, volumes, logger)#
Bases:
objectConstruct Kubernetes objects for user file servers.
- Parameters:
config (
EnabledFileserverConfig) – Fileserver configuration.base_url (
str) – Base URL for this Notebook Aspect instance.volumes (
list[VolumeConfig]) – Volumes to mount in the user’s file server.logger (
BoundLogger)
Methods Summary
build(user)Construct the objects that make up a user's fileserver.
build_name(username)Construct the name of fileserver objects.
get_username_for_pod(pod)Determine the username for a file server pod.
is_valid(username, state)Determine whether a running fileserver is valid.
Methods Documentation
- build(user)#
Construct the objects that make up a user’s fileserver.
- Parameters:
user (
GafaelfawrUserInfo) – User for whom to create a fileserver.- Returns:
Kubernetes objects for the fileserver.
- Return type:
- build_name(username)#
Construct the name of fileserver objects.
- get_username_for_pod(pod)#
Determine the username for a file server pod.
- is_valid(username, state)#
Determine whether a running fileserver is valid.
- Parameters:
username (
str) – Username the fileserver is for, used for logging.state (
FileserverStateObjects) – Kubernetes objects making up the fileserver.
- Returns:
Trueif the fileserver is valid and running,Falseotherwise.- Return type: