predicate

package
v1.69.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IsObjectBeingMigrated = gardenerutils.IsObjectBeingMigrated

IsObjectBeingMigrated is an alias for gardenerutils.IsObjectBeingMigrated.

Functions

func EvalGeneric

func EvalGeneric(obj client.Object, predicates ...predicate.Predicate) bool

EvalGeneric returns true if all predicates match for the given object.

func ExtensionStatusChanged added in v1.60.0

func ExtensionStatusChanged() predicate.Predicate

ExtensionStatusChanged returns a predicate which returns true when the status of the extension object has changed.

func ForEventTypes added in v1.57.0

func ForEventTypes(events ...EventType) predicate.Predicate

ForEventTypes is a predicate which returns true only for the provided event types.

func HasName

func HasName(name string) predicate.Predicate

HasName returns a predicate which returns true when the object has the provided name.

func IsBeingMigratedPredicate added in v1.61.0

func IsBeingMigratedPredicate(reader client.Reader, seedName string, getSeedNamesFromObject func(client.Object) (*string, *string)) predicate.Predicate

IsBeingMigratedPredicate returns a predicate which returns true for objects that are being migrated to a different seed cluster.

func IsDeleting

func IsDeleting() predicate.Predicate

IsDeleting is a predicate for objects having a deletion timestamp.

func ManagedResourceConditionsChanged added in v1.59.0

func ManagedResourceConditionsChanged() predicate.Predicate

ManagedResourceConditionsChanged returns a predicate which returns true if the status/reason/message of the Resources{Applied,Healthy,Progressing} condition of the ManagedResource changes.

func RelevantConditionsChanged added in v1.58.0

func RelevantConditionsChanged(
	getConditionsFromObject func(obj client.Object) []gardencorev1beta1.Condition,
	relevantConditionTypes ...gardencorev1beta1.ConditionType,
) predicate.Predicate

RelevantConditionsChanged returns true for all events except for 'UPDATE'. Here, true is only returned when the status, reason or message of a relevant condition has changed.

func SeedNamePredicate added in v1.62.0

func SeedNamePredicate(seedName string, getSeedNamesFromObject func(client.Object) (*string, *string)) predicate.Predicate

SeedNamePredicate returns a predicate which returns true for objects that are being migrated to a different seed cluster.

Types

type EventType added in v1.57.0

type EventType byte

EventType is an alias for byte.

const (
	// Create is a constant for an event of type 'create'.
	Create EventType = iota
	// Update is a constant for an event of type 'update'.
	Update
	// Delete is a constant for an event of type 'delete'.
	Delete
	// Generic is a constant for an event of type 'generic'.
	Generic
)

Jump to

Keyboard shortcuts

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