Documentation
¶
Overview ¶
Package registry owns routing for the registry top-level command.
Index ¶
- func DefaultGitTag() string
- func DeployRegistry(logger *zap.Logger, namespace string, port int, ...) error
- func New(runtime *core.Runtime) *cobra.Command
- func NewWithManager(mgr *RegistryManager) *cobra.Command
- func PublicImageRefForSavedLogin(image string) (string, bool)
- func ResolveExternalRegistryConfig(flagCfg *config.ExternalRegistryConfig) (*config.ExternalRegistryConfig, error)
- func ResolveInternalPlatformRegistryURL(logger *zap.Logger) string
- func ResolvePlatformRegistryURL(logger *zap.Logger) string
- func RunAdminRegistryPush(ctx context.Context, mgr *RegistryManager, ...) error
- func RunRegistryProvision(mgr *RegistryManager, url, username, password, operatorImage string, ...) error
- func RunRegistryPush(ctx context.Context, mgr *RegistryManager, ...) error
- func SavedLoginRegistryHost() string
- func ScopedRegistryRepository(ctx context.Context, client *platformapi.PlatformClient, repo string, ...) (string, error)
- type RegistryManager
- func (m *RegistryManager) CheckRegistryStatus(namespace string) error
- func (m *RegistryManager) LoginRegistry(registryURL, username, password string) error
- func (m *RegistryManager) PushDirect(source, target string) error
- func (m *RegistryManager) PushInCluster(source, target, helperNS string) error
- func (m *RegistryManager) PushViaPlatform(ctx context.Context, client *platformapi.PlatformClient, ...) error
- func (m *RegistryManager) ShowRegistryInfo() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultGitTag ¶
func DefaultGitTag() string
func DeployRegistry ¶
func NewWithManager ¶
func NewWithManager(mgr *RegistryManager) *cobra.Command
NewWithManager returns the registry command using the provided manager.
func PublicImageRefForSavedLogin ¶
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 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.