registrymirror

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegistryMirror

type RegistryMirror struct {
	// BaseRegistry is the address of the registry mirror without namespace. Just the host and the port.
	BaseRegistry string
	// NamespacedRegistryMap stores mirror mappings for artifact registries
	NamespacedRegistryMap map[string]string
	// Auth should be marked as true if authentication is required for the registry mirror
	Auth bool
	// CACertContent defines the contents registry mirror CA certificate
	CACertContent string
	// InsecureSkipVerify skips the registry certificate verification.
	// Only use this solution for isolated testing or in a tightly controlled, air-gapped environment.
	InsecureSkipVerify bool
}

RegistryMirror configures mirror mappings for artifact registries.

func FromCluster

func FromCluster(cluster *v1alpha1.Cluster) *RegistryMirror

FromCluster is a constructor for RegistryMirror from a cluster schema.

func FromClusterRegistryMirrorConfiguration

func FromClusterRegistryMirrorConfiguration(config *v1alpha1.RegistryMirrorConfiguration) *RegistryMirror

FromClusterRegistryMirrorConfiguration is a constructor for RegistryMirror from a RegistryMirrorConfiguration schema.

func (*RegistryMirror) CoreEKSAMirror

func (r *RegistryMirror) CoreEKSAMirror() string

CoreEKSAMirror returns the configured mirror for public.ecr.aws.

func (*RegistryMirror) CuratedPackagesMirror

func (r *RegistryMirror) CuratedPackagesMirror() string

CuratedPackagesMirror returns the mirror for curated packages.

func (*RegistryMirror) ReplaceRegistry

func (r *RegistryMirror) ReplaceRegistry(url string) string

ReplaceRegistry replaces the host in a url with corresponding registry mirror It supports full URLs and container image URLs If the provided original url is malformed, there are no guarantees that the returned value will be valid If no corresponding registry mirror, it will return the original URL.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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