imagestreammapping

package
v4.0.0-alpha.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type REST

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

REST implements the RESTStorage interface in terms of an image registry and image stream registry. It only supports the Create method and is used to simplify adding a new Image and tag to an ImageStream.

func NewREST

func NewREST(imageRegistry image.Registry, imageStreamRegistry imagestream.Registry, registry registryhostname.RegistryHostnameRetriever) *REST

NewREST returns a new REST.

func (*REST) Create

func (s *REST) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, _ bool) (runtime.Object, error)

Create registers a new image (if it doesn't exist) and updates the specified ImageStream's tags. If attempts to update the ImageStream fail with a resource conflict, the update will be retried if the newer ImageStream has no tag diffs from the previous state. If tag diffs are detected, the conflict error is returned.

func (*REST) NamespaceScoped

func (s *REST) NamespaceScoped() bool

func (*REST) New

func (r *REST) New() runtime.Object

New returns a new ImageStreamMapping for use with Create.

type Registry

type Registry interface {
	// CreateImageStreamMapping creates a new image stream mapping.
	CreateImageStreamMapping(ctx context.Context, mapping *imageapi.ImageStreamMapping) (*metav1.Status, error)
}

Registry is an interface for things that know how to store ImageStreamMapping objects.

func NewRegistry

func NewRegistry(s Storage) Registry

NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic.

type Storage

type Storage interface {
	Create(ctx context.Context, obj runtime.Object) (runtime.Object, error)
}

Storage is an interface for a standard REST Storage backend

type Strategy

type Strategy struct {
	runtime.ObjectTyper
	names.NameGenerator
	// contains filtered or unexported fields
}

Strategy implements behavior for image stream mappings.

func NewStrategy

func NewStrategy(registryHost registryhostname.RegistryHostnameRetriever) Strategy

Strategy is the default logic that applies when creating ImageStreamMapping objects via the REST API.

func (Strategy) Canonicalize

func (s Strategy) Canonicalize(obj runtime.Object)

Canonicalize normalizes the object after validation.

func (Strategy) NamespaceScoped

func (s Strategy) NamespaceScoped() bool

NamespaceScoped is true for image stream mappings.

func (Strategy) PrepareForCreate

func (s Strategy) PrepareForCreate(ctx context.Context, obj runtime.Object)

PrepareForCreate clears fields that are not allowed to be set by end users on creation.

func (Strategy) Validate

func (s Strategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList

Validate validates a new ImageStreamMapping.

Jump to

Keyboard shortcuts

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