networkpolicy

package
v1.101.3 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const ControllerName = "networkpolicy"

ControllerName is the name of the controller.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reconciler

type Reconciler struct {
	TargetClient client.Client
	Config       config.NetworkPolicyControllerConfig
	// contains filtered or unexported fields
}

Reconciler reconciles Service objects and creates NetworkPolicy objects.

func (*Reconciler) AddToManager

func (r *Reconciler) AddToManager(ctx context.Context, mgr manager.Manager, targetCluster cluster.Cluster) error

AddToManager adds Reconciler to the given manager.

func (*Reconciler) IngressPredicate added in v1.67.0

func (r *Reconciler) IngressPredicate() predicate.Predicate

IngressPredicate returns a predicate which filters UPDATE events on Ingresses such that only updates to the rules are relevant.

func (*Reconciler) MapIngressToServices added in v1.67.0

func (r *Reconciler) MapIngressToServices(_ context.Context, _ logr.Logger, _ client.Reader, obj client.Object) []reconcile.Request

MapIngressToServices is a mapper.MapFunc for mapping a Ingresses to all referenced services.

func (*Reconciler) MapNetworkPolicyToService added in v1.67.0

func (r *Reconciler) MapNetworkPolicyToService(_ context.Context, _ logr.Logger, _ client.Reader, obj client.Object) []reconcile.Request

MapNetworkPolicyToService is a mapper.MapFunc for mapping a NetworkPolicy to the referenced service.

func (*Reconciler) MapToAllServices

func (r *Reconciler) MapToAllServices(ctx context.Context, log logr.Logger, _ client.Reader, _ client.Object) []reconcile.Request

MapToAllServices is a mapper.MapFunc for mapping a Namespace to all Services.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

Reconcile performs the main reconciliation logic.

func (*Reconciler) ServicePredicate

func (r *Reconciler) ServicePredicate() predicate.Predicate

ServicePredicate returns a predicate which filters UPDATE events on services such that only updates to the deletion timestamp, the port list, the pod label selector, or well-known annotations are relevant.

Jump to

Keyboard shortcuts

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