imagestream

package
v3.10.0-0.54.0+incompa... Latest Latest
Warning

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

Go to latest
Published: May 29, 2018 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InternalStrategy added in v1.0.7

type InternalStrategy struct {
	Strategy
}

InternalStrategy implements behavior for updating both the spec and status of an image stream

func NewInternalStrategy added in v1.0.7

func NewInternalStrategy(strategy Strategy) InternalStrategy

NewInternalStrategy creates an update strategy around an existing stream strategy.

func (InternalStrategy) Canonicalize added in v1.1.2

func (InternalStrategy) Canonicalize(obj runtime.Object)

Canonicalize normalizes the object after validation.

func (InternalStrategy) PrepareForCreate added in v1.1.2

func (s InternalStrategy) PrepareForCreate(ctx apirequest.Context, obj runtime.Object)

func (InternalStrategy) PrepareForUpdate added in v1.0.7

func (s InternalStrategy) PrepareForUpdate(ctx apirequest.Context, obj, old runtime.Object)

type Registry

type Registry interface {
	// ListImageStreams obtains a list of image streams that match a selector.
	ListImageStreams(ctx apirequest.Context, options *metainternal.ListOptions) (*imageapi.ImageStreamList, error)
	// GetImageStream retrieves a specific image stream.
	GetImageStream(ctx apirequest.Context, id string, options *metav1.GetOptions) (*imageapi.ImageStream, error)
	// CreateImageStream creates a new image stream.
	CreateImageStream(ctx apirequest.Context, repo *imageapi.ImageStream) (*imageapi.ImageStream, error)
	// UpdateImageStream updates an image stream.
	UpdateImageStream(ctx apirequest.Context, repo *imageapi.ImageStream) (*imageapi.ImageStream, error)
	// UpdateImageStreamSpec updates an image stream's spec.
	UpdateImageStreamSpec(ctx apirequest.Context, repo *imageapi.ImageStream) (*imageapi.ImageStream, error)
	// UpdateImageStreamStatus updates an image stream's status.
	UpdateImageStreamStatus(ctx apirequest.Context, repo *imageapi.ImageStream) (*imageapi.ImageStream, error)
	// DeleteImageStream deletes an image stream.
	DeleteImageStream(ctx apirequest.Context, id string) (*metav1.Status, error)
	// WatchImageStreams watches for new/changed/deleted image streams.
	WatchImageStreams(ctx apirequest.Context, options *metainternal.ListOptions) (watch.Interface, error)
}

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

func NewRegistry

func NewRegistry(s Storage, status, internal rest.Updater) Registry

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

type ResourceGetter

type ResourceGetter interface {
	Get(apirequest.Context, string, *metav1.GetOptions) (runtime.Object, error)
}

type StatusStrategy

type StatusStrategy struct {
	Strategy
}

func NewStatusStrategy

func NewStatusStrategy(strategy Strategy) StatusStrategy

NewStatusStrategy creates a status update strategy around an existing stream strategy.

func (StatusStrategy) Canonicalize added in v1.1.2

func (StatusStrategy) Canonicalize(obj runtime.Object)

Canonicalize normalizes the object after validation.

func (StatusStrategy) PrepareForUpdate

func (StatusStrategy) PrepareForUpdate(ctx apirequest.Context, obj, old runtime.Object)

func (StatusStrategy) ValidateUpdate

func (s StatusStrategy) ValidateUpdate(ctx apirequest.Context, obj, old runtime.Object) field.ErrorList

type Storage

type Storage interface {
	rest.GracefulDeleter
	rest.Lister
	rest.Getter
	rest.Watcher

	Create(ctx apirequest.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, _ bool) (runtime.Object, error)
	Update(ctx apirequest.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc) (runtime.Object, bool, 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 ImageStreams.

func NewStrategy

func NewStrategy(
	registryHostname imageapi.RegistryHostnameRetriever,
	subjectAccessReviewClient authorizationclient.SubjectAccessReviewInterface,
	limitVerifier imageadmission.LimitVerifier,
	registryWhitelister whitelist.RegistryWhitelister,
	imageStreamGetter ResourceGetter,
) Strategy

NewStrategy is the default logic that applies when creating and updating ImageStream objects via the REST API.

func (Strategy) AllowCreateOnUpdate

func (s Strategy) AllowCreateOnUpdate() bool

AllowCreateOnUpdate is false for image streams.

func (Strategy) AllowUnconditionalUpdate added in v1.0.2

func (Strategy) AllowUnconditionalUpdate() bool

func (Strategy) Canonicalize added in v1.1.2

func (Strategy) Canonicalize(obj runtime.Object)

Canonicalize normalizes the object after validation.

func (Strategy) Decorate

func (s Strategy) Decorate(obj runtime.Object) error

Decorate decorates stream.Status.DockerImageRepository using the logic from dockerImageRepository().

func (Strategy) NamespaceScoped

func (s Strategy) NamespaceScoped() bool

NamespaceScoped is true for image streams.

func (Strategy) PrepareForCreate

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

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

func (Strategy) PrepareForUpdate

func (s Strategy) PrepareForUpdate(ctx apirequest.Context, obj, old runtime.Object)

func (Strategy) Validate

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

Validate validates a new image stream and verifies the current user is authorized to access any image streams newly referenced in spec.tags.

func (Strategy) ValidateUpdate

func (s Strategy) ValidateUpdate(ctx apirequest.Context, obj, old runtime.Object) field.ErrorList

ValidateUpdate is the default update validation for an end user.

type TagVerifier

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

func (*TagVerifier) Verify

func (v *TagVerifier) Verify(old, stream *imageapi.ImageStream, user user.Info) field.ErrorList

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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