PrepullerOptions#

pydantic model controller.models.v1.prepuller.PrepullerOptions#

Options for the prepuller.

The information here comes from the YAML configuration for the Nublado controller and is a component of the model returned by the /spawner/v1/prepulls route. The model for the YAML configuration also enables camel-case aliases, but those are not enabled here since we want the API to return snake-case.

Parameters:

data (Any) –

Show JSON schema
{
   "title": "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.",
   "type": "object",
   "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"
      }
   },
   "$defs": {
      "DockerSourceOptions": {
         "description": "Docker Registry from which to get images.",
         "properties": {
            "type": {
               "const": "docker",
               "title": "Type of image source"
            },
            "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"
            },
            "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"
      }
   },
   "required": [
      "source"
   ]
}

Fields:
field alias_tags: Annotated[list[str], Field(title='Additional alias tags', 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']])] = []#

These tags will automatically be recognized as alias tags rather than unknown tags, which results in different sorting and better human-readable descriptions.

field cycle: Annotated[int | None, Field(title='Limit to this cycle number (XML schema version)', 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])] = None#

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.

field num_dailies: Annotated[int, Field(title='Number of dailies to prepull', description='This many dailies, starting with the most recent, will be prepulled and shown as menu selections.', examples=[3], ge=0)] = 3#

This many dailies, starting with the most recent, will be prepulled and shown as menu selections.

Constraints:
  • ge = 0

field num_releases: Annotated[int, Field(title='Number of releases to prepull', description='This many releases, starting with the most recent, will be prepulled and shown as menu selections.', examples=[1], ge=0)] = 1#

This many releases, starting with the most recent, will be prepulled and shown as menu selections.

Constraints:
  • ge = 0

field num_weeklies: Annotated[int, Field(title='Number of weeklies to prepull', description='This many weeklies, starting with the most recent, will be prepulled and shown as menu selections.', examples=[2], ge=0)] = 2#

This many weeklies, starting with the most recent, will be prepulled and shown as menu selections.

Constraints:
  • ge = 0

field pin: Annotated[list[str], Field(title='List of image tags to prepull and pin to the menu', 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']])] = []#

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.

field recommended_tag: Annotated[str, Field(title='Tag of recommended image', description='This image will be shown first on the menu as the default choice.', examples=['recommended'])] = 'recommended'#

This image will be shown first on the menu as the default choice.

field source: Annotated[DockerSourceOptions | GARSourceOptions, Field(title='Source of images')] [Required]#