KubernetesNodeImage#

class controller.models.domain.kubernetes.KubernetesNodeImage(references, size)#

Bases: object

A cached image on a Kubernetes node.

A cached image has one or more Docker references associated with it, reflecting the references by which it was retrieved.

The references will generally be in one of two formats:

  • registry/repository@digest

  • registry/repository:tag

Most entries will have both, but if the image was pulled by digest it’s possible only the first will be present.

Parameters:

Attributes Summary

digest

Determine the image digest, if possible.

Methods Summary

from_container_image(image)

Create from a Kubernetes API object.

Attributes Documentation

digest#

Determine the image digest, if possible.

Returns:

The digest for the image if found, or None if not.

Return type:

str or None

Methods Documentation

classmethod from_container_image(image)#

Create from a Kubernetes API object.

Parameters:

image (V1ContainerImage) – Kubernetes API object.

Returns:

The corresponding object.

Return type:

KubernetesNodeImage