Documentation
¶
Index ¶
- Constants
- type Reconciler
- func (r *Reconciler) AddToManager(mgr manager.Manager, targetCluster cluster.Cluster) error
- func (r *Reconciler) EventHandlerForNamespace(log logr.Logger) handler.EventHandler
- func (r *Reconciler) IngressPredicate() predicate.Predicate
- func (r *Reconciler) MapIngressToServices(_ context.Context, obj client.Object) []reconcile.Request
- func (r *Reconciler) MapNetworkPolicyToService(_ context.Context, obj client.Object) []reconcile.Request
- func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
- func (r *Reconciler) ServicePredicate() predicate.Predicate
Constants ¶
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 resourcemanagerconfigv1alpha1.NetworkPolicyControllerConfig
Recorder events.EventRecorder
// contains filtered or unexported fields
}
Reconciler reconciles Service objects and creates NetworkPolicy objects.
func (*Reconciler) AddToManager ¶
AddToManager adds Reconciler to the given manager.
func (*Reconciler) EventHandlerForNamespace ¶
func (r *Reconciler) EventHandlerForNamespace(log logr.Logger) handler.EventHandler
EventHandlerForNamespace returns an EventHandler that enqueues reconcile requests for Services associated with the given Namespace object.
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
MapIngressToServices is a handler.MapFunc for mapping a Ingresses to all referenced services.
func (*Reconciler) MapNetworkPolicyToService ¶ added in v1.67.0
func (r *Reconciler) MapNetworkPolicyToService(_ context.Context, obj client.Object) []reconcile.Request
MapNetworkPolicyToService is a handler.MapFunc for mapping a NetworkPolicy to the referenced service.
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.