Documentation ¶
Index ¶
- func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error)
- func MatchCluster(label labels.Selector, field fields.Selector) storage.SelectionPredicate
- func SelectableFields(obj *clusterapis.Cluster) fields.Set
- type StatusStrategy
- func (StatusStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set
- func (StatusStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object)
- func (StatusStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList
- func (StatusStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string
- type Strategy
- func (Strategy) AllowCreateOnUpdate() bool
- func (Strategy) AllowUnconditionalUpdate() bool
- func (Strategy) Canonicalize(obj runtime.Object)
- func (Strategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set
- func (Strategy) NamespaceScoped() bool
- func (Strategy) PrepareForCreate(ctx context.Context, obj runtime.Object)
- func (Strategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object)
- func (Strategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList
- func (Strategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList
- func (Strategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string
- func (Strategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAttrs ¶
GetAttrs returns labels.Set, fields.Set, and error in case the given runtime.Object is not a Cluster.
func MatchCluster ¶
MatchCluster is the filter used by the generic etcd backend to watch events from etcd to clients of the apiserver only interested in specific labels/fields.
func SelectableFields ¶
func SelectableFields(obj *clusterapis.Cluster) fields.Set
SelectableFields returns a field set that represents the object.
Types ¶
type StatusStrategy ¶
type StatusStrategy struct {
Strategy
}
StatusStrategy implements behavior for ClusterStatus.
func NewStatusStrategy ¶
func NewStatusStrategy(strategy Strategy) StatusStrategy
NewStatusStrategy creates and returns a StatusStrategy instance.
func (StatusStrategy) GetResetFields ¶
func (StatusStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set
GetResetFields returns the set of fields that get reset by the strategy and should not be modified by the user.
func (StatusStrategy) PrepareForUpdate ¶
func (StatusStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object)
PrepareForUpdate clears fields that are not allowed to be set by end users on update of status
func (StatusStrategy) ValidateUpdate ¶
ValidateUpdate is the default update validation for an end user updating status
func (StatusStrategy) WarningsOnUpdate ¶
WarningsOnUpdate returns warnings for the given update.
type Strategy ¶
type Strategy struct { runtime.ObjectTyper names.NameGenerator }
Strategy implements behavior for Cluster.
func NewStrategy ¶
func NewStrategy(typer runtime.ObjectTyper) Strategy
NewStrategy creates and returns a ClusterStrategy instance.
func (Strategy) AllowCreateOnUpdate ¶
AllowCreateOnUpdate returns true if the object can be created by a PUT.
func (Strategy) AllowUnconditionalUpdate ¶
AllowUnconditionalUpdate returns true if the object can be updated unconditionally (irrespective of the latest resource version), when there is no resource version specified in the object.
func (Strategy) Canonicalize ¶
Canonicalize allows an object to be mutated into a canonical form.
func (Strategy) GetResetFields ¶
func (Strategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set
GetResetFields returns the set of fields that get reset by the strategy and should not be modified by the user.
func (Strategy) NamespaceScoped ¶
NamespaceScoped returns if the object must be in a namespace.
func (Strategy) PrepareForCreate ¶
PrepareForCreate is invoked on create before validation to normalize the object.
func (Strategy) PrepareForUpdate ¶
PrepareForUpdate is invoked on update before validation to normalize the object.
func (Strategy) ValidateUpdate ¶
ValidateUpdate is invoked after default fields in the object have been filled in before the object is persisted.
func (Strategy) WarningsOnCreate ¶
WarningsOnCreate returns warnings for the creation of the given object.