registry

package
v0.0.0-...-bb99189 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const RegistryServerLabel = "kndp-registry-server-url"

Variables

This section is empty.

Functions

func CopyRegistries

func CopyRegistries(ctx context.Context, logger *log.Logger, sourceConfig *rest.Config, destinationConfig *rest.Config) error

Copy registries from source to destination contexts

Types

type Registry

type Registry struct {
	Config RegistryConfig
	corev1.Secret
}

func New

func New(server string, username string, password string, email string) Registry

Creates new Registry by required parameters

func Registries

func Registries(ctx context.Context, client *kubernetes.Clientset) ([]*Registry, error)

Return regestires from requested context

func (*Registry) Create

func (r *Registry) Create(ctx context.Context, config *rest.Config, logger *log.Logger) error

Creates registry in requested context and assign it to engine

func (*Registry) Delete

func (r *Registry) Delete(ctx context.Context, config *rest.Config, logger *log.Logger) error

func (*Registry) Exists

func (r *Registry) Exists(ctx context.Context, client *kubernetes.Clientset) bool

Check if registry in provided context exists

func (*Registry) FromSecret

func (r *Registry) FromSecret(sec corev1.Secret) *Registry

func (*Registry) SecretSpec

func (r *Registry) SecretSpec() corev1.Secret

Creates specs of Secret base on Registry data

func (*Registry) ToSecret

func (r *Registry) ToSecret() *corev1.Secret

func (*Registry) Validate

func (r *Registry) Validate() error

Validate data in Registry object

type RegistryAuth

type RegistryAuth struct {
	Username string `json:"username" validate:"required"`
	Password string `json:"password" validate:"required"`
	Email    string `json:"email" validate:"required,email"`
	Auth     string `json:"auth"`
}

type RegistryConfig

type RegistryConfig struct {
	Auths map[string]RegistryAuth `json:"auths"`
}

Jump to

Keyboard shortcuts

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