registry

package
v0.0.0-...-b8f6642 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAllowedToCache

func IsAllowedToCache(container *corev1.Container) bool

IsAllowedToCache checks that information about Docker image can be cached base on image name and container PullPolicy

Types

type ImageRegistry

type ImageRegistry interface {
	GetImageConfig(
		ctx context.Context,
		clientset kubernetes.Interface,
		namespace string,
		container *corev1.Container,
		podSpec *corev1.PodSpec) (*v1.Config, error)
	WithImageConfig(name string, image *v1.Config)
}

ImageRegistry is a docker registry

func NewRegistry

func NewRegistry() ImageRegistry

NewRegistry creates and initializes registry

type MockRegistry

type MockRegistry struct {
	Image      v1.Config
	ShouldFail bool
}

func (*MockRegistry) GetImageConfig

func (*MockRegistry) WithImageConfig

func (r *MockRegistry) WithImageConfig(name string, imageConfig *v1.Config)

type Registry

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

Registry impl

func (*Registry) GetImageConfig

func (r *Registry) GetImageConfig(ctx context.Context, client kubernetes.Interface, namespace string, container *corev1.Container, podSpec *corev1.PodSpec) (*v1.Config, error)

GetImageConfig returns entrypoint and command of container

func (*Registry) WithImageConfig

func (r *Registry) WithImageConfig(name string, imageConfig *v1.Config)

Jump to

Keyboard shortcuts

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