dvcr

package
v1.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package dvcr keeps names of DVCR repositories in sync between the components that write images and the components that look their owners up: the virtualization-controller builds the repository path when it starts an importer or an uploader, while the DVCR garbage collector maps an existing repository back to the resource that owns it. Both must derive the same string from the same resource, so the shortening lives here and not in either of them.

Index

Constants

View Source
const (
	// RepoNameMaxLen is the maximum length of an OCI repository name, as defined
	// by the distribution spec. A longer name is rejected while the reference is
	// parsed, before any request reaches the registry.
	//
	// The registry host counts towards the limit: the reference parser vendored
	// into containers/image applies it to the whole name, host included, and that
	// parser is what the pvc-importer reads its source image with.
	RepoNameMaxLen = 255

	// DefaultRegistryHost is the address of DVCR inside the cluster. The registry
	// is a component of the module rather than a configurable endpoint, so the
	// host is the same everywhere.
	// ponytail: a constant while the address is fixed; pass the real host from the
	// module configuration once DVCR can live elsewhere.
	DefaultRegistryHost = "dvcr.d8-virtualization.svc"
)

Variables

This section is empty.

Functions

func ClusterImageRepoName

func ClusterImageRepoName(registryHost, name string) string

ClusterImageRepoName returns the name to use in the "cvi/<name>" repository path.

func DiskRepoName

func DiskRepoName(registryHost, namespace, name string) string

DiskRepoName returns the name to use in the "vd/<namespace>/<name>" repository path.

func ImageRepoName

func ImageRepoName(registryHost, namespace, name string) string

ImageRepoName returns the name to use in the "vi/<namespace>/<name>" repository path.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL