predicate

package
v1.110.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 13 Imported by: 26

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IsInGardenNamespacePredicate = predicate.NewPredicateFuncs(func(obj client.Object) bool {
	return obj != nil && obj.GetNamespace() == v1beta1constants.GardenNamespace
})

IsInGardenNamespacePredicate is a predicate which returns true when the provided object is in the 'garden' namespace.

Functions

func AddTypeAndClassPredicates added in v1.110.2

func AddTypeAndClassPredicates(predicates []predicate.Predicate, extensionClass extensionsv1alpha1.ExtensionClass, extensionTypes ...string) []predicate.Predicate

AddTypeAndClassPredicates returns a new slice which contains a HasClass, a type predicate and the given `predicates`. If more than one extensionTypes is given they are combined with an OR.

func DefaultControllerPredicates added in v1.39.0

func DefaultControllerPredicates(ignoreOperationAnnotation bool, preconditions ...predicate.Predicate) []predicate.Predicate

DefaultControllerPredicates returns the default predicates for extension controllers. If the operation annotation is ignored then the only returned predicate is the 'GenerationChangedPredicate'.

func HasClass added in v1.101.0

func HasClass(extensionClass extensionsv1alpha1.ExtensionClass) predicate.Predicate

HasClass filters the incoming objects for the given extension class. For backwards compatibility, if the extension class is unset, it is assumed that the extension belongs to a shoot cluster. An empty given 'extensionClass' is likewise treated to be of class 'shoot'.

func HasOneOfTypesPredicate added in v1.110.2

func HasOneOfTypesPredicate(extensionTypes ...string) predicate.Predicate

HasOneOfTypesPredicate returns a new slice which contains a type predicate. If more than one extensionTypes is given they are combined with an OR.

func HasPurpose

func HasPurpose(purpose extensionsv1alpha1.Purpose) predicate.Predicate

HasPurpose filters the incoming ControlPlanes for the given spec.purpose.

func HasType

func HasType(typeName string) predicate.Predicate

HasType filters the incoming OperatingSystemConfigs for ones that have the same type as the given type.

func ShootNotFailedPredicate added in v1.39.0

func ShootNotFailedPredicate(ctx context.Context, mgr manager.Manager) predicate.Predicate

ShootNotFailedPredicate returns a predicate which returns true when the Shoot's `.status.lastOperation.state` is not equals 'Failed'.

Types

This section is empty.

Jump to

Keyboard shortcuts

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