ImageRef
struct ImageRefhost/repo:tag taken apart.
Implements Copyable, Movable
- Fields
host: Stringrepo: Stringtag: String
parse
def parse(image: String) -> Self ghcr.io/magmalake/orca:tag (a tag is needed; a host too).
orca.registryWhich architectures a container image has (#267): the pool autoscaler makes a machine only of a type the worker image runs on.
var r = Registry.from_env() r.arches("ghcr.io/magmalake/orca:e82807b") # ["amd64", "arm64"]
An image's tag names a manifest; a multi-architecture image's is an index
(OCI) or a manifest list (Docker), whose entries each name a platform, and
a single-architecture image's has its architecture in its config blob.
This reads the registry's v2 API with a pull token: anonymous, or from
ORCA_REGISTRY_USER and the secret ORCA_REGISTRY_TOKEN_SECRET names
(orca.control.fetch_secret) for a private image, never in an error.
ORCA_REGISTRY_ENDPOINT points every image's registry at one URL, for
tests' fake.
ImageRefstruct ImageRefhost/repo:tag taken apart.
Implements Copyable, Movable
host: Stringrepo: Stringtag: Stringparsedef parse(image: String) -> Self ghcr.io/magmalake/orca:tag (a tag is needed; a host too).
Registrystruct RegistryImplements Movable
endpoint: String: Every registry at this URL (tests), or empty for https://<host>.user: String__init__def __init__(out self, endpoint: String, user: String, token: String) from_envdef from_env() -> Self has_credentialsdef has_credentials(self) -> Bool credentialsdef credentials(self) -> Tuple[String, String] The user and token to log in to pull the image (the pool machines' boot, orca.pool_boot); empty for none.
archesdef arches(self, image: String) -> List[String] The Linux architectures image has a variant for, Docker's names (amd64, arm64).
platform_archesdef platform_arches(manifest: Value) -> List[String] The architectures of an index's or manifest list's entries for Linux, without attestation entries (unknown), in order; empty for a single-architecture manifest.