Documentation ¶
Index ¶
- type InternalStrategy
- type Registry
- type ResourceGetter
- type StatusStrategy
- type Storage
- type Strategy
- func (s Strategy) AllowCreateOnUpdate() bool
- func (Strategy) AllowUnconditionalUpdate() bool
- func (Strategy) Canonicalize(obj runtime.Object)
- func (s Strategy) Decorate(obj runtime.Object) error
- func (s Strategy) NamespaceScoped() bool
- func (s Strategy) PrepareForCreate(ctx context.Context, obj runtime.Object)
- func (s Strategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object)
- func (s Strategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList
- func (s Strategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList
- type TagVerifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InternalStrategy ¶
type InternalStrategy struct {
Strategy
}
InternalStrategy implements behavior for updating both the spec and status of an image stream
func NewInternalStrategy ¶
func NewInternalStrategy(strategy Strategy) InternalStrategy
NewInternalStrategy creates an update strategy around an existing stream strategy.
func (InternalStrategy) Canonicalize ¶
func (InternalStrategy) Canonicalize(obj runtime.Object)
Canonicalize normalizes the object after validation.
func (InternalStrategy) PrepareForCreate ¶
func (s InternalStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object)
func (InternalStrategy) PrepareForUpdate ¶
func (s InternalStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object)
type Registry ¶
type Registry interface { // ListImageStreams obtains a list of image streams that match a selector. ListImageStreams(ctx context.Context, options *metainternal.ListOptions) (*imageapi.ImageStreamList, error) // GetImageStream retrieves a specific image stream. GetImageStream(ctx context.Context, id string, options *metav1.GetOptions) (*imageapi.ImageStream, error) // CreateImageStream creates a new image stream. CreateImageStream(ctx context.Context, repo *imageapi.ImageStream, options *metav1.CreateOptions) (*imageapi.ImageStream, error) // UpdateImageStream updates an image stream. UpdateImageStream(ctx context.Context, repo *imageapi.ImageStream, forceAllowCreate bool, options *metav1.UpdateOptions) (*imageapi.ImageStream, error) // UpdateImageStreamSpec updates an image stream's spec. UpdateImageStreamSpec(ctx context.Context, repo *imageapi.ImageStream, forceAllowCreate bool, options *metav1.UpdateOptions) (*imageapi.ImageStream, error) // UpdateImageStreamStatus updates an image stream's status. UpdateImageStreamStatus(ctx context.Context, repo *imageapi.ImageStream, forceAllowCreate bool, options *metav1.UpdateOptions) (*imageapi.ImageStream, error) // DeleteImageStream deletes an image stream. DeleteImageStream(ctx context.Context, id string) (*metav1.Status, error) // WatchImageStreams watches for new/changed/deleted image streams. WatchImageStreams(ctx context.Context, options *metainternal.ListOptions) (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) Canonicalize ¶
func (StatusStrategy) Canonicalize(obj runtime.Object)
Canonicalize normalizes the object after validation.
func (StatusStrategy) PrepareForUpdate ¶
func (StatusStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object)
func (StatusStrategy) ValidateUpdate ¶
type Storage ¶
type Storage interface { rest.GracefulDeleter rest.Lister rest.Getter rest.Watcher Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (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 registryhostname.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 ¶
AllowCreateOnUpdate is false for image streams.
func (Strategy) AllowUnconditionalUpdate ¶
func (Strategy) Canonicalize ¶
Canonicalize normalizes the object after validation.
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.
func (Strategy) PrepareForUpdate ¶
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