cluster

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAttrs

func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error)

GetAttrs returns labels.Set, fields.Set, and error in case the given runtime.Object is not a Cluster.

func MatchCluster

func MatchCluster(label labels.Selector, field fields.Selector) storage.SelectionPredicate

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(_ context.Context, _, _ runtime.Object)

PrepareForUpdate clears fields that are not allowed to be set by end users on update of status

func (StatusStrategy) ValidateUpdate

func (StatusStrategy) ValidateUpdate(_ context.Context, _, _ runtime.Object) field.ErrorList

ValidateUpdate is the default update validation for an end user updating status

func (StatusStrategy) WarningsOnUpdate

func (StatusStrategy) WarningsOnUpdate(_ context.Context, _, _ runtime.Object) []string

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

func (Strategy) AllowCreateOnUpdate() bool

AllowCreateOnUpdate returns true if the object can be created by a PUT.

func (Strategy) AllowUnconditionalUpdate

func (Strategy) AllowUnconditionalUpdate() bool

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

func (Strategy) Canonicalize(obj runtime.Object)

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

func (Strategy) NamespaceScoped() bool

NamespaceScoped returns if the object must be in a namespace.

func (Strategy) PrepareForCreate

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

PrepareForCreate is invoked on create before validation to normalize the object.

func (Strategy) PrepareForUpdate

func (Strategy) PrepareForUpdate(_ context.Context, obj, old runtime.Object)

PrepareForUpdate is invoked on update before validation to normalize the object.

func (Strategy) Validate

Validate returns an ErrorList with validation errors or nil.

func (Strategy) ValidateUpdate

func (Strategy) ValidateUpdate(_ context.Context, obj, old runtime.Object) field.ErrorList

ValidateUpdate is invoked after default fields in the object have been filled in before the object is persisted.

func (Strategy) WarningsOnCreate

func (Strategy) WarningsOnCreate(_ context.Context, _ runtime.Object) []string

WarningsOnCreate returns warnings for the creation of the given object.

func (Strategy) WarningsOnUpdate

func (Strategy) WarningsOnUpdate(_ context.Context, _, _ runtime.Object) []string

WarningsOnUpdate returns warnings for the given update.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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