EnabledFileserverConfig¶
- pydantic model controller.config.EnabledFileserverConfig¶
Configuration for enabled user file servers.
- Parameters:
data (
Any
)
Show JSON schema
{ "title": "EnabledFileserverConfig", "description": "Configuration for enabled user file servers.", "type": "object", "properties": { "enabled": { "const": true, "title": "Enabled", "type": "boolean" }, "pathPrefix": { "default": "/files", "description": "The route at which users spawn new user file servers", "title": "Path prefix for file server route", "type": "string" }, "affinity": { "anyOf": [ { "$ref": "#/$defs/Affinity" }, { "type": "null" } ], "default": null, "description": "Node and pod affinity rules for file server pods", "title": "Affinity rules" }, "application": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Argo CD application into which to put file servers", "title": "Argo CD application" }, "creationTimeout": { "default": "PT2M", "description": "How long to wait for a file server to start before returning an error to the user", "format": "duration", "title": "File server creation timeout", "type": "string" }, "deleteTimeout": { "default": "PT1M", "description": "How long to wait for a file server's Kubernetes objects to be deleted before raising an error", "format": "duration", "title": "File server deletion timeout", "type": "string" }, "extraAnnotations": { "additionalProperties": { "type": "string" }, "default": {}, "description": "Extra annotations to add to all user file server ``Job`` and ``Pod`` Kubernetes resources", "title": "Extra annotations", "type": "object" }, "idleTimeout": { "default": "PT1H", "description": "After this length of time, inactive file servers will shut down", "format": "duration", "title": "File server inactivity timeout", "type": "string" }, "image": { "$ref": "#/$defs/ContainerImage", "description": "Docker image to run as a user file server. This must follow the same API as worblehat.", "title": "File server Docker image" }, "namespace": { "description": "All file servers for any user will be created in this namespace", "title": "Namespace for user file servers", "type": "string" }, "nodeSelector": { "additionalProperties": { "type": "string" }, "default": {}, "description": "Labels that must be present on Kubernetes nodes for any file server to be scheduled there", "examples": [ { "disktype": "ssd" } ], "title": "File server node selector", "type": "object" }, "resources": { "anyOf": [ { "$ref": "#/$defs/LabResources" }, { "type": "null" } ], "default": null, "description": "Kubernetes resource requests and limits for user file server pods", "title": "Resource requests and limits" }, "tolerations": { "default": [], "description": "Kubernetes tolerations for file server pods", "items": { "$ref": "#/$defs/Toleration" }, "title": "File server pod tolerations", "type": "array" }, "volumeMounts": { "default": [], "description": "Volumes mounted in the file server and exposed via WebDAV. The ``containerPath`` settings represent the path visible over the WebDAV protocol.", "items": { "$ref": "#/$defs/VolumeMountConfig" }, "title": "Volume mounts", "type": "array" } }, "$defs": { "Affinity": { "additionalProperties": false, "description": "Pod affinity rules.", "properties": { "nodeAffinity": { "anyOf": [ { "$ref": "#/$defs/NodeAffinity" }, { "type": "null" } ], "default": null, "title": "Node affinity rules" }, "podAffinity": { "anyOf": [ { "$ref": "#/$defs/PodAffinity" }, { "type": "null" } ], "default": null, "title": "Pod affinity rules" }, "podAntiAffinity": { "anyOf": [ { "$ref": "#/$defs/PodAntiAffinity" }, { "type": "null" } ], "default": null, "title": "Pod anti-affinity rules" } }, "title": "Affinity", "type": "object" }, "ContainerImage": { "additionalProperties": false, "description": "Docker image that may be run as a container.\n\nThe structure of this model should follow the normal Helm chart\nconventions so that `Mend Renovate`_ can detect that this is a Docker\nimage reference and create pull requests to update it automatically.", "properties": { "repository": { "description": "Docker repository from which to pull the image", "examples": [ "docker.io/lsstit/ddsnet4u" ], "title": "Repository", "type": "string" }, "pullPolicy": { "$ref": "#/$defs/PullPolicy", "default": "IfNotPresent", "description": "Kubernetes image pull policy. Set to ``Always`` when testing images that reuse the same tag.", "examples": [ "Always" ], "title": "Pull policy" }, "tag": { "description": "Tag of image to use (conventionally the version)", "examples": [ "1.4.2" ], "title": "Image tag", "type": "string" } }, "required": [ "repository", "tag" ], "title": "ContainerImage", "type": "object" }, "LabResources": { "description": "Resource requests and limits for a lab.", "properties": { "limits": { "$ref": "#/$defs/ResourceQuantity", "description": "If the user's pod exceeds this CPU limit, it will be throttled. If it exceeds this memory limit, it will usually be killed with an out-of-memory error.", "title": "Maximum allowed resources" }, "requests": { "$ref": "#/$defs/ResourceQuantity", "description": "Guaranteed minimum resources available to the user's lab. If these resources are not available, the cluster will autoscale or the lab spawn will fail.", "title": "Minimum requested resources" } }, "required": [ "limits", "requests" ], "title": "LabResources", "type": "object" }, "LabelSelector": { "additionalProperties": false, "description": "Rule for matching labels of pods or namespaces.\n\nAll provided expressions must match. (In other words, they are combined\nwith and.)", "properties": { "matchExpressions": { "default": [], "description": "Rules for matching labels", "items": { "$ref": "#/$defs/LabelSelectorRequirement" }, "title": "Label match expressions", "type": "array" }, "matchLabels": { "additionalProperties": { "type": "string" }, "default": {}, "description": "Label keys and values that must be set", "title": "Exact label matches", "type": "object" } }, "title": "LabelSelector", "type": "object" }, "LabelSelectorOperator": { "description": "Match operations for label selectors.", "enum": [ "In", "NotIn", "Exists", "DoesNotExist" ], "title": "LabelSelectorOperator", "type": "string" }, "LabelSelectorRequirement": { "additionalProperties": false, "description": "Single rule for label matching.", "properties": { "key": { "description": "Label key to match", "title": "Key", "type": "string" }, "operator": { "$ref": "#/$defs/LabelSelectorOperator", "description": "Label match operator", "title": "Operator" }, "values": { "default": [], "description": "For ``In`` and ``NotIn``, matches any value in this list. For ``Exists`` or ``DoesNotExist``, must be empty.", "items": { "type": "string" }, "title": "Matching values", "type": "array" } }, "required": [ "key", "operator" ], "title": "LabelSelectorRequirement", "type": "object" }, "NodeAffinity": { "additionalProperties": false, "description": "Node affinity rules.", "properties": { "preferredDuringSchedulingIgnoredDuringExecution": { "default": [], "description": "Preference rules used for scheduling and ignored afterwards", "items": { "$ref": "#/$defs/PreferredSchedulingTerm" }, "title": "Scheduling terms", "type": "array" }, "requiredDuringSchedulingIgnoredDuringExecution": { "anyOf": [ { "$ref": "#/$defs/NodeSelector" }, { "type": "null" } ], "default": null, "description": "Required node selection rules", "title": "Node selectors" } }, "title": "NodeAffinity", "type": "object" }, "NodeSelector": { "additionalProperties": false, "description": "Matching terms for nodes.", "properties": { "nodeSelectorTerms": { "default": [], "description": "Matching terms for nodes", "items": { "$ref": "#/$defs/NodeSelectorTerm" }, "title": "Terms", "type": "array" } }, "title": "NodeSelector", "type": "object" }, "NodeSelectorOperator": { "description": "Match operations for node selectors.", "enum": [ "In", "NotIn", "Exists", "DoesNotExist", "Gt", "Lt" ], "title": "NodeSelectorOperator", "type": "string" }, "NodeSelectorRequirement": { "additionalProperties": false, "description": "Individual match rule for nodes.", "properties": { "key": { "description": "Label key to match", "title": "Key", "type": "string" }, "operator": { "$ref": "#/$defs/NodeSelectorOperator", "description": "Match operation to use", "title": "Operator" }, "values": { "default": [], "description": "For ``In`` and ``NotIn``, matches any value in this list. For ``Gt`` or ``Lt``, must contain a single member interpreted as an integer. For ``Exists`` or ``DoesNotExist``, must be empty.", "items": { "type": "string" }, "title": "Matching values", "type": "array" } }, "required": [ "key", "operator" ], "title": "NodeSelectorRequirement", "type": "object" }, "NodeSelectorTerm": { "additionalProperties": false, "description": "Term to match nodes.", "properties": { "matchExpressions": { "default": [], "description": "Matching rules applied to node labels", "items": { "$ref": "#/$defs/NodeSelectorRequirement" }, "title": "Rules for node labels", "type": "array" }, "matchFields": { "default": [], "description": "Matching rules applied to node fields", "items": { "$ref": "#/$defs/NodeSelectorRequirement" }, "title": "Rules for node fields", "type": "array" } }, "title": "NodeSelectorTerm", "type": "object" }, "PodAffinity": { "additionalProperties": false, "description": "Pod affinity rules.", "properties": { "preferredDuringSchedulingIgnoredDuringExecution": { "default": [], "description": "Preference rules used for scheduling and ignored afterwards", "items": { "$ref": "#/$defs/WeightedPodAffinityTerm" }, "title": "Scheduling terms", "type": "array" }, "requiredDuringSchedulingIgnoredDuringExecution": { "default": [], "description": "Required node selection rules", "items": { "$ref": "#/$defs/PodAffinityTerm" }, "title": "Node selectors", "type": "array" } }, "title": "PodAffinity", "type": "object" }, "PodAffinityTerm": { "additionalProperties": false, "description": "Pod matching term for pod affinity.", "properties": { "labelSelector": { "anyOf": [ { "$ref": "#/$defs/LabelSelector" }, { "type": "null" } ], "default": null, "description": "Match rules for pod labels", "title": "Pod label match" }, "namespaceSelector": { "anyOf": [ { "$ref": "#/$defs/LabelSelector" }, { "type": "null" } ], "default": null, "description": "Match rules for namespace labels", "title": "Namespace label match" }, "namespaces": { "default": [], "description": "List of namespaces to which this term applies. The term will apply to the union of this list of namespaces and any namespaces that match ``namespaceSelector``, if given. If both are empty, only the pod's namespace is matched.", "items": { "type": "string" }, "title": "Matching namespaces", "type": "array" }, "topologyKey": { "description": "Name of the node label that should match between nodes to consider two pods to be scheduled on adjacent nodes, which in turn is the definition of an affinity (and the opposite of an anti-affinity).", "title": "Node topology label", "type": "string" } }, "required": [ "topologyKey" ], "title": "PodAffinityTerm", "type": "object" }, "PodAntiAffinity": { "additionalProperties": false, "description": "Pod anti-affinity rules.\n\nNotes\n-----\nThis model is structurally identical to `PodAffinity`, but it has to\nconvert to a different Kubernetes model.", "properties": { "preferredDuringSchedulingIgnoredDuringExecution": { "default": [], "description": "Preference rules used for scheduling and ignored afterwards", "items": { "$ref": "#/$defs/WeightedPodAffinityTerm" }, "title": "Scheduling terms", "type": "array" }, "requiredDuringSchedulingIgnoredDuringExecution": { "default": [], "description": "Required node selection rules", "items": { "$ref": "#/$defs/PodAffinityTerm" }, "title": "Node selectors", "type": "array" } }, "title": "PodAntiAffinity", "type": "object" }, "PreferredSchedulingTerm": { "additionalProperties": false, "description": "Scheduling term with a weight, used to find preferred nodes.", "properties": { "preference": { "$ref": "#/$defs/NodeSelectorTerm", "description": "Selector term for a node", "title": "Node selector" }, "weight": { "description": "Weight to assign to nodes matching this term", "title": "Weight", "type": "integer" } }, "required": [ "preference", "weight" ], "title": "PreferredSchedulingTerm", "type": "object" }, "PullPolicy": { "description": "Pull policy for Docker images in Kubernetes.", "enum": [ "Always", "IfNotPresent", "Never" ], "title": "PullPolicy", "type": "string" }, "ResourceQuantity": { "description": "A Kubernetes resource request or limit.", "properties": { "cpu": { "description": "Number of CPU cores", "examples": [ 1.5 ], "title": "CPU", "type": "number" }, "memory": { "description": "Amount of memory in bytes. Also accepts strings with SI suffixes, which will be converted to bytes. Be sure to use the suffix with ``i`` to indicate powers of two (1024 rather than 1000) if that is desired.", "examples": [ 1073741824, "1Gi" ], "title": "Memory", "type": "integer" } }, "required": [ "cpu", "memory" ], "title": "ResourceQuantity", "type": "object" }, "TaintEffect": { "description": "Possible effects of a pod toleration.", "enum": [ "NoSchedule", "PreferNoSchedule", "NoExecute" ], "title": "TaintEffect", "type": "string" }, "Toleration": { "additionalProperties": false, "description": "Represents a single pod toleration rule.\n\nToleration rules describe what Kubernetes node taints a pod will tolerate,\nmeaning that the pod can still be scheduled on that node even though the\nnode is marked as tained.", "properties": { "effect": { "anyOf": [ { "$ref": "#/$defs/TaintEffect" }, { "type": "null" } ], "default": null, "description": "Taint effect to match. If ``None``, match all taint effects.", "title": "Taint effect" }, "key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Taint key to match. If ``None``, ``operator`` must be ``Exists``, and this combination is used to match all taints.", "title": "Taint key" }, "operator": { "$ref": "#/$defs/TolerationOperator", "default": "Equal", "description": "``Exists`` is equivalent to a wildcard for value and matches all possible taints of a given catgory.", "title": "Match operator" }, "tolerationSeconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Defines the length of time a ``NoExecute`` taint is tolerated and is ignored for other taint effects. The pod will be evicted this number of seconds after the taint is added, rather than immediately (the default with no toleration). ``None`` says to tolerate the taint forever.", "title": "Duration of toleration" }, "value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Taint value to match. Must be ``None`` if the operator is ``Exists``.", "title": "Taint value" } }, "title": "Toleration", "type": "object" }, "TolerationOperator": { "description": "Possible operators for a toleration.", "enum": [ "Equal", "Exists" ], "title": "TolerationOperator", "type": "string" }, "VolumeMountConfig": { "additionalProperties": false, "description": "The mount of a volume inside a container.", "properties": { "containerPath": { "description": "Absolute path at which to mount the volume in the lab container", "examples": [ "/home" ], "pattern": "^/.*", "title": "Path inside container", "type": "string" }, "subPath": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Mount only this sub-path of the volume source", "examples": [ "groups" ], "title": "Sub-path of source to mount" }, "readOnly": { "default": false, "description": "Whether this mount of the volume should be read-only", "examples": [ true ], "title": "Is read-only", "type": "boolean" }, "volumeName": { "description": "Name of the volume to mount", "title": "Volume name", "type": "string" } }, "required": [ "containerPath", "volumeName" ], "title": "VolumeMountConfig", "type": "object" }, "WeightedPodAffinityTerm": { "additionalProperties": false, "description": "Pod matching term for pod affinity with an associated weight.", "properties": { "podAffinityTerm": { "$ref": "#/$defs/PodAffinityTerm", "description": "Pod affinity matching term", "title": "Matching term" }, "weight": { "description": "Weight to associate with pods matching this term", "maximum": 100, "minimum": 1, "title": "Associated weight", "type": "integer" } }, "required": [ "podAffinityTerm", "weight" ], "title": "WeightedPodAffinityTerm", "type": "object" } }, "additionalProperties": false, "required": [ "enabled", "image", "namespace" ] }
- Fields:
- field affinity: Annotated[Affinity | None, Field(title='Affinity rules', description='Node and pod affinity rules for file server pods')] = None¶
Node and pod affinity rules for file server pods
- field application: Annotated[str | None, Field(title='Argo CD application', description='Argo CD application into which to put file servers')] = None¶
Argo CD application into which to put file servers
- field creationTimeout: Annotated[HumanTimedelta, Field(title='File server creation timeout', description='How long to wait for a file server to start before returning an error to the user')] = datetime.timedelta(seconds=120) (name 'creation_timeout')¶
How long to wait for a file server to start before returning an error to the user
- Constraints:
func = <function <lambda> at 0x7f78b9085300>
json_schema_input_type = PydanticUndefined
return_type = <class ‘float’>
when_used = json
- field deleteTimeout: Annotated[HumanTimedelta, Field(title='File server deletion timeout', description="How long to wait for a file server's Kubernetes objects to be deleted before raising an error")] = datetime.timedelta(seconds=60) (name 'delete_timeout')¶
How long to wait for a file server’s Kubernetes objects to be deleted before raising an error
- Constraints:
func = <function <lambda> at 0x7f78b9085300>
json_schema_input_type = PydanticUndefined
return_type = <class ‘float’>
when_used = json
- field enabled: Literal[True] [Required]¶
-
field extraAnnotations: Annotated[dict[str, str], Field(title='Extra annotations', description='Extra annotations to add to all user file server
Job
andPod
Kubernetes resources')] = {} (name 'extra_annotations')¶ Extra annotations to add to all user file server
Job
andPod
Kubernetes resources
- field idleTimeout: Annotated[HumanTimedelta, Field(title='File server inactivity timeout', description='After this length of time, inactive file servers will shut down')] = datetime.timedelta(seconds=3600) (name 'idle_timeout')¶
After this length of time, inactive file servers will shut down
- Constraints:
func = <function <lambda> at 0x7f78b9085300>
json_schema_input_type = PydanticUndefined
return_type = <class ‘float’>
when_used = json
- field image: Annotated[ContainerImage, Field(title='File server Docker image', description='Docker image to run as a user file server. This must follow the same API as worblehat.')] [Required]¶
Docker image to run as a user file server. This must follow the same API as worblehat.
- field namespace: Annotated[str, Field(title='Namespace for user file servers', description='All file servers for any user will be created in this namespace')] [Required]¶
All file servers for any user will be created in this namespace
- field nodeSelector: Annotated[dict[str, str], Field(title='File server node selector', description='Labels that must be present on Kubernetes nodes for any file server to be scheduled there', examples=[{'disktype': 'ssd'}])] = {} (name 'node_selector')¶
Labels that must be present on Kubernetes nodes for any file server to be scheduled there
- field pathPrefix: Annotated[str, Field(title='Path prefix for file server route', description='The route at which users spawn new user file servers')] = '/files' (name 'path_prefix')¶
The route at which users spawn new user file servers
- field resources: Annotated[LabResources | None, Field(title='Resource requests and limits', description='Kubernetes resource requests and limits for user file server pods')] = None¶
Kubernetes resource requests and limits for user file server pods
- field tolerations: Annotated[list[Toleration], Field(title='File server pod tolerations', description='Kubernetes tolerations for file server pods')] = []¶
Kubernetes tolerations for file server pods
-
field volumeMounts: Annotated[list[VolumeMountConfig], Field(title='Volume mounts', description='Volumes mounted in the file server and exposed via WebDAV. The
containerPath
settings represent the path visible over the WebDAV protocol.')] = [] (name 'volume_mounts')¶ Volumes mounted in the file server and exposed via WebDAV. The
containerPath
settings represent the path visible over the WebDAV protocol.