Documentation ¶
Index ¶
- func ImageStreamToSelectableFields(ir *api.ImageStream) labels.Set
- func MatchImageStream(label labels.Selector, field fields.Selector) generic.Matcher
- type DefaultRegistry
- type DefaultRegistryFunc
- type Registry
- type ResourceGetter
- type StatusStrategy
- type Storage
- type Strategy
- func (s Strategy) AllowCreateOnUpdate() bool
- func (s Strategy) Decorate(obj runtime.Object) error
- func (s Strategy) NamespaceScoped() bool
- func (s Strategy) PrepareForCreate(obj runtime.Object)
- func (s Strategy) PrepareForUpdate(obj, old runtime.Object)
- func (s Strategy) Validate(ctx kapi.Context, obj runtime.Object) fielderrors.ValidationErrorList
- func (s Strategy) ValidateUpdate(ctx kapi.Context, obj, old runtime.Object) fielderrors.ValidationErrorList
- type TagVerifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImageStreamToSelectableFields ¶
func ImageStreamToSelectableFields(ir *api.ImageStream) labels.Set
ImageStreamToSelectableFields returns a label set that represents the object.
Types ¶
type DefaultRegistry ¶
DefaultRegistry returns the default Docker registry (host or host:port), or false if it is not available.
type DefaultRegistryFunc ¶
DefaultRegistryFunc implements DefaultRegistry for a simple function.
func (DefaultRegistryFunc) DefaultRegistry ¶
func (fn DefaultRegistryFunc) DefaultRegistry() (string, bool)
DefaultRegistry implements the DefaultRegistry interface for a function.
type Registry ¶
type Registry interface { // ListImageStreams obtains a list of image streams that match a selector. ListImageStreams(ctx kapi.Context, selector labels.Selector) (*api.ImageStreamList, error) // GetImageStream retrieves a specific image stream. GetImageStream(ctx kapi.Context, id string) (*api.ImageStream, error) // CreateImageStream creates a new image stream. CreateImageStream(ctx kapi.Context, repo *api.ImageStream) (*api.ImageStream, error) // UpdateImageStream updates an image stream. UpdateImageStream(ctx kapi.Context, repo *api.ImageStream) (*api.ImageStream, error) // UpdateImageStream updates an image stream's status. UpdateImageStreamStatus(ctx kapi.Context, repo *api.ImageStream) (*api.ImageStream, error) // DeleteImageStream deletes an image stream. DeleteImageStream(ctx kapi.Context, id string) (*kapi.Status, error) // WatchImageStreams watches for new/changed/deleted image streams. WatchImageStreams(ctx kapi.Context, label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error) }
Registry is an interface for things that know how to store ImageStream objects.
type ResourceGetter ¶
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) PrepareForUpdate ¶
func (StatusStrategy) PrepareForUpdate(obj, old runtime.Object)
func (StatusStrategy) ValidateUpdate ¶
func (StatusStrategy) ValidateUpdate(ctx kapi.Context, obj, old runtime.Object) fielderrors.ValidationErrorList
type Storage ¶
type Storage interface { rest.GracefulDeleter rest.Lister rest.Getter rest.Watcher Create(ctx kapi.Context, obj runtime.Object) (runtime.Object, error) Update(ctx kapi.Context, obj runtime.Object) (runtime.Object, bool, error) }
Storage is an interface for a standard REST Storage backend
type Strategy ¶
type Strategy struct { runtime.ObjectTyper kapi.NameGenerator ImageStreamGetter ResourceGetter // contains filtered or unexported fields }
Strategy implements behavior for ImageStreams.
func NewStrategy ¶
func NewStrategy(defaultRegistry DefaultRegistry, subjectAccessReviewClient subjectaccessreview.Registry) Strategy
NewStrategy is the default logic that applies when creating and updating ImageStream objects via the REST API.
func (Strategy) AllowCreateOnUpdate ¶
AllowCreateOnUpdate is false for image streams.
func (Strategy) Decorate ¶
Decorate decorates stream.Status.DockerImageRepository using the logic from dockerImageRepository().
func (Strategy) NamespaceScoped ¶
NamespaceScoped is true for image streams.
func (Strategy) PrepareForCreate ¶
PrepareForCreate clears fields that are not allowed to be set by end users on creation, and verifies the current user is authorized to access any image streams newly referenced in spec.tags.
func (Strategy) PrepareForUpdate ¶
func (Strategy) Validate ¶
func (s Strategy) Validate(ctx kapi.Context, obj runtime.Object) fielderrors.ValidationErrorList
Validate validates a new image stream.
func (Strategy) ValidateUpdate ¶
func (s Strategy) ValidateUpdate(ctx kapi.Context, obj, old runtime.Object) fielderrors.ValidationErrorList
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 *api.ImageStream, user user.Info) fielderrors.ValidationErrorList