Documentation
¶
Overview ¶
Package predicates provides predicates for filtering events.
Index ¶
- func GetBackupStoragePredicate() predicate.Funcs
- func GetLoadBalancerConfigPredicate() predicate.Funcs
- func GetMonitoringConfigPredicate() predicate.Funcs
- func GetPodSchedulingPolicyPredicate() predicate.Funcs
- type NamespaceFilter
- func (p *NamespaceFilter) Create(event event.CreateEvent) bool
- func (p *NamespaceFilter) Delete(event event.DeleteEvent) bool
- func (p *NamespaceFilter) Generic(event event.GenericEvent) bool
- func (p *NamespaceFilter) Match(namespace *corev1.Namespace) bool
- func (p *NamespaceFilter) Update(event event.UpdateEvent) bool
- type Nop
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBackupStoragePredicate ¶ added in v1.8.0
GetBackupStoragePredicate returns a predicate that filters events for BackupStorage resources.
func GetLoadBalancerConfigPredicate ¶ added in v1.9.0
GetLoadBalancerConfigPredicate returns a predicate that filters events for LoadBalancerConfig resources.
func GetMonitoringConfigPredicate ¶ added in v1.8.0
GetMonitoringConfigPredicate returns a predicate that filters events for MonitoringConfig resources.
func GetPodSchedulingPolicyPredicate ¶ added in v1.7.0
GetPodSchedulingPolicyPredicate returns a predicate that filters events for PodSchedulingPolicy resources.
Types ¶
type NamespaceFilter ¶
type NamespaceFilter struct {
// AllowNamespaces is a list of namespaces to allow.
AllowNamespaces []string
// MatchLabels is a map of labels to match on the namespace.
// All labels specified here need to match the labels on the namespace (i.e, they're ANDed).
MatchLabels map[string]string
// GetNamespace gets the namespace by name.
GetNamespace func(ctx context.Context, name string) (*corev1.Namespace, error)
// Log is the logger.
Log logr.Logger
}
NamespaceFilter is a predicate that filters events based on the specified namespace configuration.
func (*NamespaceFilter) Create ¶
func (p *NamespaceFilter) Create(event event.CreateEvent) bool
Create returns true if the object should be created.
func (*NamespaceFilter) Delete ¶
func (p *NamespaceFilter) Delete(event event.DeleteEvent) bool
Delete returns true if the object should be deleted.
func (*NamespaceFilter) Generic ¶
func (p *NamespaceFilter) Generic(event event.GenericEvent) bool
Generic returns true if the object should be processed.
func (*NamespaceFilter) Match ¶
func (p *NamespaceFilter) Match(namespace *corev1.Namespace) bool
Match returns true if the filter allows the namespace.
func (*NamespaceFilter) Update ¶
func (p *NamespaceFilter) Update(event event.UpdateEvent) bool
Update returns true if the object should be updated.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package enginefeatures contains a set of predicates for the enginefeatures.everest.percona.com API group that can be used by controllers.
|
Package enginefeatures contains a set of predicates for the enginefeatures.everest.percona.com API group that can be used by controllers. |