predicate

package
v2.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NginxLabelPredicate

func NginxLabelPredicate(selector metav1.LabelSelector) k8spredicate.Predicate

NginxLabelPredicate returns a predicate that only matches resources with the nginx labels.

Types

type AnnotationPredicate

type AnnotationPredicate struct {
	predicate.Funcs
	Annotation string
}

AnnotationPredicate implements a predicate function based on the Annotation.

This predicate will skip the following events: 1. Create events that do not contain the Annotation. 2. Update events where the Annotation value has not changed.

func (AnnotationPredicate) Create

Create filters CreateEvents based on the Annotation.

func (AnnotationPredicate) Update

Update filters UpdateEvents based on the Annotation.

type GatewayClassPredicate

type GatewayClassPredicate struct {
	predicate.Funcs
	ControllerName string
}

GatewayClassPredicate implements a predicate function based on the controllerName of a GatewayClass. This predicate will skip events for GatewayClasses that don't reference this controller.

func (GatewayClassPredicate) Create

Create implements default CreateEvent filter for validating a GatewayClass controllerName.

func (GatewayClassPredicate) Delete

Delete implements default DeleteEvent filter for validating a GatewayClass controllerName.

func (GatewayClassPredicate) Update

Update implements default UpdateEvent filter for validating a GatewayClass controllerName.

type RestartDeploymentAnnotationPredicate

type RestartDeploymentAnnotationPredicate struct {
	predicate.Funcs
}

RestartDeploymentAnnotationPredicate skips update events if they are due to a rolling restart. This type of event is triggered by adding an annotation to the deployment's PodSpec. This is used by the provisioner to ensure it allows for rolling restarts of the nginx deployment without reverting the annotation and deleting the new pod(s). Otherwise, if a user changes the nginx deployment, we want to see that event so we can revert it back to the configuration that we expect it to have.

func (RestartDeploymentAnnotationPredicate) Update

Update filters UpdateEvents based on if the annotation is present or changed.

type SecretNamePredicate

type SecretNamePredicate struct {
	predicate.Funcs
	Namespace   string
	SecretNames []string
}

SecretNamePredicate implements a predicate function that returns true if the Secret matches the expected namespace and one of the expected names.

func (SecretNamePredicate) Create

Create filters CreateEvents based on the Secret name.

func (SecretNamePredicate) Delete

Delete filters DeleteEvents based on the Secret name.

func (SecretNamePredicate) Generic

Generic filters GenericEvents based on the Secret name.

func (SecretNamePredicate) Update

Update filters UpdateEvents based on the Secret name.

type ServiceChangedPredicate

type ServiceChangedPredicate struct {
	predicate.Funcs
}

ServiceChangedPredicate implements an update predicate function for a Service. This predicate will skip update events that have no change in a Service's Ports, TargetPorts, or AppProtocols.

func (ServiceChangedPredicate) Update

Update implements default UpdateEvent filter for validating Service port information changes.

Jump to

Keyboard shortcuts

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