NodeImage#

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

An available image present on at least some Kubernetes nodes.

Parameters:

data (Any) –

Show JSON schema
{
   "title": "NodeImage",
   "description": "An available image present on at least some Kubernetes nodes.",
   "type": "object",
   "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"
   ]
}

Fields:
field digest: Annotated[str | None, Field(title='Digest of image', description='Full digest of image if known', examples=['sha256:e693782192ecef4f7846ad2b21b1574682e700747f94c5a256b5731331a2eec2'])] = None#

Full digest of image if known

field missing: Annotated[list[str], Field(title='Nodes not caching image', description="Nodes on which the image should be cached but isn't", examples=[['node-3']])] = []#

Nodes on which the image should be cached but isn’t

field name: Annotated[str, Field(title='Human-readable tag', description='Tag of the image formatted for humans', examples=['Latest Daily (Daily 2077_10_23)'])] [Required]#

Tag of the image formatted for humans

field nodes: Annotated[list[str], Field(title='Nodes caching image', description='Nodes on which this image is cached', examples=[['node-1', 'node-2']])] = []#

Nodes on which this image is cached

field reference: Annotated[str, Field(title='Docker reference of image', 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'])] [Required]#

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.

field size: Annotated[int | None, Field(title='Size in bytes', description='Size of the image in bytes if reported by the node', examples=[8675309])] = None#

Size of the image in bytes if reported by the node

field tag: Annotated[str, Field(title='Image tag', description='Tag portion of the image reference', examples=['w_2023_04'])] [Required]#

Tag portion of the image reference

classmethod from_rsp_image(image)#

Convert from an RSPImage.

Parameters:

image (RSPImage) – Source image.

Returns:

Converted image.

Return type:

NodeImage