registry

package
v0.0.0-...-d7e018f Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RegistryImageV3               = "docker.io/library/registry:3"
	RegistryConfigTargetPath      = "/etc/distribution/config.yml"
	EducatesNetworkName           = "educates"
	ClusterNetworkName            = "kind"
	EducatesRegistryContainer     = "educates-registry"
	EducatesControlPlaneContainer = "educates-control-plane"
)

Variables

This section is empty.

Functions

func DeleteMirrorAndUnlinkFromCluster

func DeleteMirrorAndUnlinkFromCluster(mirrorConfig *MirrorConfig, p Progress) error

*

  • This function is used to delete a local registry mirror and unlink it from the cluster.
  • It is used when deleting a local registry mirror.

func DeleteRegistry

func DeleteRegistry(p Progress) error

*

  • This function is used to delete the local registry.
  • It is used when deleting a local registry or deleting all components of the local cluster.

func DeleteRegistryMirrors

func DeleteRegistryMirrors(p Progress) error

func DeployMirrorAndLinkToCluster

func DeployMirrorAndLinkToCluster(mirrorConfig *MirrorConfig, p Progress) error

*

  • This function is used to deploy a registry mirror and link it to the cluster.
  • It is used when creating a new local registry mirror.

func DeployRegistry

func DeployRegistry(bindIP string, p Progress) error

*

  • This function is used to deploy a registry.
  • It is used when creating a new local registry.
  • It will not link the registry to the cluster.

func DeployRegistryAndLinkToCluster

func DeployRegistryAndLinkToCluster(bindIP string, client *kubernetes.Clientset, p Progress) error

*

  • This function is used to deploy the registry and link it to the cluster.
  • It is used when creating a new local cluster.

func PruneRegistry

func PruneRegistry(p Progress) error

func UpdateRegistryK8SService

func UpdateRegistryK8SService(k8sclient *kubernetes.Clientset) error

UpdateRegistryK8SService points the registry Service in the default namespace at the local registry. Pods reach the local registry as registry.default.svc.cluster.local, which this Service, having no selector, maps to the registry container's address on the cluster network through its EndpointSlice. Nodes do not depend on it, as containerd reaches the registry by its container name. It is used when creating a cluster or deploying a registry, and updates both objects in place so the Service keeps its cluster IP.

Types

type MirrorConfig

type MirrorConfig struct {
	Mirror   string
	URL      string
	Username string
	Password string
	Port     string
	BindIP   string
}

MirrorConfig is the focused input for registry-mirror container management. Decouples the registry package from any specific CLI config kind. Callers build one from EducatesLocalConfig (via the laptop create command) or from individual command flags (via 'educates local mirror deploy/delete').

type Progress

type Progress interface {
	Update(phase string)
	Warn(msg string)
}

Progress is the minimal surface the registry package uses to surface sub-operation detail on the caller's current step line. The caller (cmd) owns the step lifecycle (Start/Done/Fail); these functions only report intermediate phase text via Update, and warnings via Warn. A nil Progress is valid and silences detail — used by callers that don't render progress. progress.Step satisfies this interface.

type RegistryMirror

type RegistryMirror struct {
	Name          string
	URL           string
	Username      string
	Status        string
	ContainerName string
}

RegistryMirror describes a deployed local registry mirror, read back from its container labels.

func ListRegistryMirrors

func ListRegistryMirrors() ([]RegistryMirror, error)

ListRegistryMirrors returns the deployed local registry mirrors, sorted by name. Each mirror's metadata (name, URL, username) is read back from the container labels set at deploy time.

Jump to

Keyboard shortcuts

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