registry

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package registry owns routing for the registry top-level command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultGitTag

func DefaultGitTag() string

func DeployRegistry

func DeployRegistry(logger *zap.Logger, namespace string, port int, registryType, registryStorageSize, manifestPath string) error

func New

func New(runtime *core.Runtime) *cobra.Command

New returns the registry command.

func NewWithManager

func NewWithManager(mgr *RegistryManager) *cobra.Command

NewWithManager returns the registry command using the provided manager.

func PublicImageRefForSavedLogin

func PublicImageRefForSavedLogin(image string) (string, bool)

PublicImageRefForSavedLogin rewrites an image ref whose registry is a local placeholder (registry.local) or the bundled in-cluster registry Service DNS name onto the registry host of the active platform login. Neither host is pullable by a remote platform's nodes, so deploys through the platform API must name the registry the user pushed to. It returns false when the ref names another registry or no platform login registry is known (e.g. a Kind test-mode login against localhost), leaving the ref unchanged.

func ResolveExternalRegistryConfig

func ResolveExternalRegistryConfig(flagCfg *config.ExternalRegistryConfig) (*config.ExternalRegistryConfig, error)

func ResolveInternalPlatformRegistryURL

func ResolveInternalPlatformRegistryURL(logger *zap.Logger) string

func ResolvePlatformRegistryURL

func ResolvePlatformRegistryURL(logger *zap.Logger) string

func RunAdminRegistryPush

func RunAdminRegistryPush(ctx context.Context, mgr *RegistryManager, image, registryURL, name, scope, mode, helperNamespace string) error

RunAdminRegistryPush pushes an image using direct Kubernetes access for operator debugging. Normal users should use server push instead.

func RunRegistryProvision

func RunRegistryProvision(mgr *RegistryManager, url, username, password, operatorImage string, dryRun bool) error

RunRegistryProvision contains the registry provision command flow for folder packages.

func RunRegistryPush

func RunRegistryPush(ctx context.Context, mgr *RegistryManager, image, registryURL, name, scope string) error

RunRegistryPush pushes an image through the platform API.

func SavedLoginRegistryHost

func SavedLoginRegistryHost() string

SavedLoginRegistryHost returns the registry host tied to the active platform login: the registry host saved by auth login, else one derived from the saved platform API URL (platform.<domain> -> registry.<domain>). It returns "" for logins against localhost or when no login is saved.

func ScopedRegistryRepository

func ScopedRegistryRepository(ctx context.Context, client *platformapi.PlatformClient, repo string, scope publishscope.Scope) (string, error)

ScopedRegistryRepository applies the repository prefix implied by a publish scope.

Types

type RegistryManager

type RegistryManager struct {
	// contains filtered or unexported fields
}

RegistryManager handles registry operations with injected dependencies.

func DefaultRegistryManager

func DefaultRegistryManager(logger *zap.Logger) *RegistryManager

DefaultRegistryManager returns a RegistryManager using default clients.

func NewRegistryManager

func NewRegistryManager(kubectl *core.KubectlClient, exec core.Executor, logger *zap.Logger) *RegistryManager

NewRegistryManager creates a RegistryManager with the given dependencies.

func (*RegistryManager) CheckRegistryStatus

func (m *RegistryManager) CheckRegistryStatus(namespace string) error

CheckRegistryStatus checks and displays registry status.

func (*RegistryManager) LoginRegistry

func (m *RegistryManager) LoginRegistry(registryURL, username, password string) error

LoginRegistry logs into a container registry.

func (*RegistryManager) PushDirect

func (m *RegistryManager) PushDirect(source, target string) error

PushDirect pushes an image directly using docker.

func (*RegistryManager) PushInCluster

func (m *RegistryManager) PushInCluster(source, target, helperNS string) error

PushInCluster pushes an image using an in-cluster helper pod.

func (*RegistryManager) PushViaPlatform

func (m *RegistryManager) PushViaPlatform(ctx context.Context, client *platformapi.PlatformClient, source, target, scope string) error

PushViaPlatform saves the local image and asks the platform API to push it in-cluster.

func (*RegistryManager) ShowRegistryInfo

func (m *RegistryManager) ShowRegistryInfo() error

ShowRegistryInfo displays registry connection information.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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