PrepullerStatus¶
- pydantic model controller.models.v1.prepuller.PrepullerStatus¶
Status of the image prepuller.
This model is returned by the
/spawner/v1/prepulls
route.- Parameters:
data (
Any
)
Show JSON schema
{ "title": "PrepullerStatus", "description": "Status of the image prepuller.\n\nThis model is returned by the ``/spawner/v1/prepulls`` route.", "type": "object", "properties": { "config": { "$ref": "#/$defs/PrepullerOptions", "title": "Prepuller configuration" }, "images": { "$ref": "#/$defs/PrepullerImageStatus", "title": "Prepuller status by image" }, "nodes": { "items": { "$ref": "#/$defs/Node" }, "title": "Prepuller status by node", "type": "array" } }, "$defs": { "DockerSourceOptions": { "description": "Docker Registry from which to get images.", "properties": { "type": { "const": "docker", "title": "Type of image source", "type": "string" }, "registry": { "default": "docker.io", "description": "Hostname and optional port of the Docker registry holding lab images", "examples": [ "lighthouse.ceres" ], "title": "Docker registry", "type": "string" }, "repository": { "description": "Docker repository path to the lab image, without tags or digests. This is sometimes called the image name.", "examples": [ "library/sketchbook" ], "title": "Docker repository (image name)", "type": "string" }, "credentials_path": { "default": "/etc/secrets/.dockerconfigjson", "description": "Path to a file containing a JSON-encoded dictionary of Docker credentials for various registries, in the same format as the Docker configuration file and the value of a Kubernetes pull secret", "format": "path", "title": "Path to Docker API credentials", "type": "string" } }, "required": [ "type", "repository" ], "title": "DockerSourceOptions", "type": "object" }, "GARSourceOptions": { "description": "Google Artifact Registry from which to get images.\n\nThe Google Artifact Repository naming convention is unfortunate. It uses\n``repository`` for a specific management level of the Google Artifact\nRegistry within a Google project that does not include the name of the\nimage, unlike the terminology that is used elsewhere where the registry is\nthe hostname and the repository is everything else except the tag and\nhash.\n\nEverywhere else, repository is used in the non-Google sense. In this\nclass, the main class uses the Google terminology to avoid confusion, and\nuses ``path`` for what everything else calls the repository.", "properties": { "type": { "const": "google", "title": "Type of image source", "type": "string" }, "location": { "description": "This is the same as the hostname of the registry but with the ``-docker.pkg.dev`` suffix removed.", "examples": [ "us-central1" ], "title": "Region or multiregion of registry", "type": "string" }, "project_id": { "description": "Google Cloud Platform project ID containing the registry", "examples": [ "ceres-lighthouse-6ab4" ], "title": "GCP project ID", "type": "string" }, "repository": { "description": "Google Artifact Registry repository name", "examples": [ "library" ], "title": "GAR repository", "type": "string" }, "image": { "description": "Google Artifact Registry image name", "examples": [ "sketchbook" ], "title": "GAR image name", "type": "string" } }, "required": [ "type", "location", "project_id", "repository", "image" ], "title": "GARSourceOptions", "type": "object" }, "Node": { "description": "Information about available images on a single Kubernetes node.", "properties": { "name": { "description": "Hostname of the Kubernetes node", "examples": [ "gke-science-platform-d-core-pool-78ee-03baf5c9-7w75" ], "title": "Name of node", "type": "string" }, "eligible": { "default": true, "description": "Whether images should be prepulled to this node", "examples": [ true ], "title": "Eligible for prepulling", "type": "boolean" }, "comment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "If this node is not eligible for prepulling, this field contains the reason why", "examples": [ "Cordoned because of disk problems" ], "title": "Reason for node ineligibility" }, "cached": { "default": [], "description": "References of images cached on this node", "examples": [ [ "lighthouse.ceres/library/sketchbook:latest_daily" ] ], "items": { "type": "string" }, "title": "Cached images", "type": "array" } }, "required": [ "name" ], "title": "Node", "type": "object" }, "NodeImage": { "description": "An available image present on at least some Kubernetes nodes.", "properties": { "reference": { "description": "Reference of image, which includes the registry host name, the normally-two-part image name within that registry, and the tag or hash of the specific version of that image.", "examples": [ "lighthouse.ceres/library/sketchbook:latest_daily" ], "title": "Docker reference of image", "type": "string" }, "tag": { "description": "Tag portion of the image reference", "examples": [ "w_2023_04" ], "title": "Image tag", "type": "string" }, "name": { "description": "Tag of the image formatted for humans", "examples": [ "Latest Daily (Daily 2077_10_23)" ], "title": "Human-readable tag", "type": "string" }, "digest": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Full digest of image if known", "examples": [ "sha256:e693782192ecef4f7846ad2b21b1574682e700747f94c5a256b5731331a2eec2" ], "title": "Digest of image" }, "size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Size of the image in bytes if reported by the node", "examples": [ 8675309 ], "title": "Size in bytes" }, "nodes": { "default": [], "description": "Nodes on which this image is cached", "examples": [ [ "node-1", "node-2" ] ], "items": { "type": "string" }, "title": "Nodes caching image", "type": "array" }, "missing": { "default": [], "description": "Nodes on which the image should be cached but isn't", "examples": [ [ "node-3" ] ], "items": { "type": "string" }, "title": "Nodes not caching image", "type": "array" } }, "required": [ "reference", "tag", "name" ], "title": "NodeImage", "type": "object" }, "PrepullerImageStatus": { "description": "Status of the images being prepulled.", "properties": { "prepulled": { "default": [], "items": { "$ref": "#/$defs/NodeImage" }, "title": "Successfully cached images", "type": "array" }, "pending": { "default": [], "description": "Images that are missing on at least one eligible node", "items": { "$ref": "#/$defs/NodeImage" }, "title": "Images not yet cached", "type": "array" } }, "title": "PrepullerImageStatus", "type": "object" }, "PrepullerOptions": { "description": "Options for the prepuller.\n\nThe information here comes from the YAML configuration for the Nublado\ncontroller and is a component of the model returned by the\n``/spawner/v1/prepulls`` route. The model for the YAML configuration also\nenables camel-case aliases, but those are not enabled here since we want\nthe API to return snake-case.", "properties": { "source": { "anyOf": [ { "$ref": "#/$defs/DockerSourceOptions" }, { "$ref": "#/$defs/GARSourceOptions" } ], "title": "Source of images" }, "recommended_tag": { "default": "recommended", "description": "This image will be shown first on the menu as the default choice.", "examples": [ "recommended" ], "title": "Tag of recommended image", "type": "string" }, "num_releases": { "default": 1, "description": "This many releases, starting with the most recent, will be prepulled and shown as menu selections.", "examples": [ 1 ], "minimum": 0, "title": "Number of releases to prepull", "type": "integer" }, "num_weeklies": { "default": 2, "description": "This many weeklies, starting with the most recent, will be prepulled and shown as menu selections.", "examples": [ 2 ], "minimum": 0, "title": "Number of weeklies to prepull", "type": "integer" }, "num_dailies": { "default": 3, "description": "This many dailies, starting with the most recent, will be prepulled and shown as menu selections.", "examples": [ 3 ], "minimum": 0, "title": "Number of dailies to prepull", "type": "integer" }, "cycle": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Telescope and Site images contain software implementing a specific XML schema version, and it is not safe to use software using a different XML schema version. If this is set, only images with a matching cycle will be shown in the spawner menu.", "examples": [ 27 ], "title": "Limit to this cycle number (XML schema version)" }, "pin": { "default": [], "description": "Forces images to be cached and pinned to the menu even when they would not normally be prepulled (not recommended or within the latest dailies, weeklies, or releases). This can be used to add additional images to the menu or to force resolution of the image underlying the recommended tag when Docker is used as the image source so that we can give it a proper display name.", "examples": [ [ "d_2077_10_23" ] ], "items": { "type": "string" }, "title": "List of image tags to prepull and pin to the menu", "type": "array" }, "alias_tags": { "default": [], "description": "These tags will automatically be recognized as alias tags rather than unknown tags, which results in different sorting and better human-readable descriptions.", "examples": [ [ "recommended_cycle0027" ] ], "items": { "type": "string" }, "title": "Additional alias tags", "type": "array" } }, "required": [ "source" ], "title": "PrepullerOptions", "type": "object" } }, "required": [ "config", "images", "nodes" ] }
- Fields:
- field config: Annotated[PrepullerOptions, Field(title='Prepuller configuration')] [Required]¶
- field images: Annotated[PrepullerImageStatus, Field(title='Prepuller status by image')] [Required]¶
- field nodes: Annotated[list[Node], Field(title='Prepuller status by node')] [Required]¶