registry

package
v0.0.0-...-c9b62ac Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: Apache-2.0 Imports: 20 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 ContainerInfo

type ContainerInfo struct {
	Namespace        string
	ImagePullSecrets string
	RegistryAddress  string
	RegistryName     string
	RegistryUsername string
	RegistryPassword string
	Image            string
	// contains filtered or unexported fields
}

K8s structure keeps information retrieved from POD definition

func (*ContainerInfo) Collect

func (k *ContainerInfo) Collect(container *corev1.Container, podSpec *corev1.PodSpec, credentialsCache *cache.Cache) error

Collect reads information from k8s and load them into the structure

type DockerCreds

type DockerCreds struct {
	Auths map[string]dockerTypes.AuthConfig `json:"auths"`
}

type ImageRegistry

type ImageRegistry interface {
	GetImageConfig(
		clientset kubernetes.Interface,
		namespace string,
		container *corev1.Container,
		podSpec *corev1.PodSpec) (*imagev1.ImageConfig, error)
}

ImageRegistry is a docker registry

func NewRegistry

func NewRegistry() ImageRegistry

NewRegistry creates and initializes registry

type Registry

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

Registry impl

func (*Registry) GetImageConfig

func (r *Registry) GetImageConfig(
	clientset kubernetes.Interface,
	namespace string,
	container *corev1.Container,
	podSpec *corev1.PodSpec) (*imagev1.ImageConfig, error)

GetImageConfig returns entrypoint and command of container

Jump to

Keyboard shortcuts

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