policystatus

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const ControllerName string = "root-policy-status"

Variables

This section is empty.

Functions

This section is empty.

Types

type RootPolicyStatusReconciler

type RootPolicyStatusReconciler struct {
	client.Client
	// Use a shared lock with the main policy controller to avoid conflicting updates.
	RootPolicyLocks *sync.Map
	Scheme          *runtime.Scheme
}

RootPolicyStatusReconciler handles replicated policy status updates and updates the root policy status.

func (*RootPolicyStatusReconciler) Reconcile

func (r *RootPolicyStatusReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)

Reconcile will update the root policy status based on the current state whenever a root or replicated policy status is updated. The reconcile request is always on the root policy. This approach is taken rather than just handling a single replicated policy status per reconcile to be able to "batch" status update requests when there are bursts of replicated policy status updates. This lowers resource utilization on the controller and the Kubernetes API server.

func (*RootPolicyStatusReconciler) SetupWithManager

func (r *RootPolicyStatusReconciler) SetupWithManager(mgr ctrl.Manager, maxConcurrentReconciles uint) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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