registry

package
v0.0.0-...-cce75fc Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfigInterface

type ClientConfigInterface interface {
	GetRegistryURL() string
	GetUserID() string
	GetToken() string
	IsInsecureSkipTLSVerifyPolicy() bool
	GetContextCertificate() (*x509.Certificate, error)
	GetServerNameOverride() string
	GetContextName() string
	GetExternalRegistryCredentials(registryHost string) (string, string, error)
}

type ImageCtrl

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

func NewImageCtrl

func NewImageCtrl(config imageConfig) ImageCtrl

func NewImageCtrlFromContext

func NewImageCtrlFromContext(config imageConfig) ImageCtrl

func (ImageCtrl) ExpandOktetoDevRegistry

func (ic ImageCtrl) ExpandOktetoDevRegistry(tag string) string

ExpandOktetoDevRegistry translates okteto.dev

func (ImageCtrl) ExpandOktetoGlobalRegistry

func (ic ImageCtrl) ExpandOktetoGlobalRegistry(tag string) string

ExpandOktetoGlobalRegistry translates okteto.global

func (ImageCtrl) GetDevTagFromGlobal

func (ic ImageCtrl) GetDevTagFromGlobal(image string) string

func (ImageCtrl) GetRegistryAndRepo

func (ImageCtrl) GetRegistryAndRepo(tag string) (string, string)

GetRegistryAndRepo returns image tag and the registry to push the image

func (ImageCtrl) GetRepoNameAndTag

func (ImageCtrl) GetRepoNameAndTag(image string) (string, string)

GetRepoNameAndTag returns the image repo and the tag separated

type ImageMetadata

type ImageMetadata struct {
	Image   string
	CMD     []string
	Workdir string
	Ports   []Port
	Envs    []string
}

type OktetoImageReference

type OktetoImageReference struct {
	Registry string
	Repo     string
	Tag      string
	Image    string
}

type OktetoRegistry

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

OktetoRegistry represents the registry

func NewOktetoRegistry

func NewOktetoRegistry(config configInterface) OktetoRegistry

func (OktetoRegistry) CloneGlobalImageToDev

func (or OktetoRegistry) CloneGlobalImageToDev(imageWithDigest string) (string, error)

CloneGlobalImageToDev clones an image from the global registry to the dev registry

func (OktetoRegistry) GetImageMetadata

func (or OktetoRegistry) GetImageMetadata(image string) (ImageMetadata, error)

func (OktetoRegistry) GetImageReference

func (OktetoRegistry) GetImageReference(image string) (OktetoImageReference, error)

GetImageReference returns the values to setup the image environment variables

func (OktetoRegistry) GetImageTag

func (or OktetoRegistry) GetImageTag(image, service, namespace string) string

GetImageTag returns the image tag to build for a given services

func (OktetoRegistry) GetImageTagWithDigest

func (or OktetoRegistry) GetImageTagWithDigest(image string) (string, error)

func (OktetoRegistry) GetRegistryAndRepo

func (or OktetoRegistry) GetRegistryAndRepo(image string) (string, string)

GetRegistryAndRepo returns image and registry of a given image

func (OktetoRegistry) GetRepoNameAndTag

func (or OktetoRegistry) GetRepoNameAndTag(repo string) (string, string)

GetRepoNameAndTag returns the repo name and tag of a given image

func (OktetoRegistry) HasGlobalPushAccess

func (or OktetoRegistry) HasGlobalPushAccess() (bool, error)

HasGlobalPushAccess checks if the user has push access to the global registry

func (OktetoRegistry) IsGlobalRegistry

func (or OktetoRegistry) IsGlobalRegistry(image string) bool

func (OktetoRegistry) IsOktetoRegistry

func (or OktetoRegistry) IsOktetoRegistry(image string) bool

IsOktetoRegistry returns if an image tag is pointing to the okteto registry

type Port

type Port struct {
	Protocol      apiv1.Protocol
	ContainerPort int32
}

func (Port) GetContainerPort

func (p Port) GetContainerPort() int32

func (Port) GetHostPort

func (Port) GetHostPort() int32

func (Port) GetProtocol

func (p Port) GetProtocol() apiv1.Protocol

type Replacer

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

func NewRegistryReplacer

func NewRegistryReplacer(config ReplacerConfigInterface) Replacer

func (Replacer) Replace

func (r Replacer) Replace(image, registryType, namespace string) string

type ReplacerConfigInterface

type ReplacerConfigInterface interface {
	GetRegistryURL() string
}

Jump to

Keyboard shortcuts

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