registry

package
v0.0.0-...-60784e1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	RegistryImageV3               = "docker.io/library/registry:3"
	RegistryConfigTargetPath      = "/etc/distribution/config.yml"
	EducatesNetworkName           = "educates"
	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

*

  • TODO: Learn whether this is needed or not
  • This function is used to update the registry k8s service.
  • It is used when creating a cluster or a registry in order to update the k8s service to point to the new registry.

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)
}

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. 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