policyendpoints

package
v1.1.11 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IndexKeyPolicyReferenceName        = "spec.policyRef.name"
	IndexKeyClusterPolicyReferenceName = "spec.policyRef.name"
)
View Source
const (
	// LastChangeTriggerTimeAnnotation is set on PolicyEndpoint/ClusterPolicyEndpoint
	// to track when NPC last created or updated the resource. NPA reads this to
	// compute E2E policy programming latency (same pattern as kube-proxy's
	// endpoints.kubernetes.io/last-change-trigger-time on EndpointSlice).
	LastChangeTriggerTimeAnnotation = "networking.k8s.aws/last-change-trigger-time"
)

Variables

This section is empty.

Functions

func IndexFunctionClusterPolicyReferenceName added in v1.1.0

func IndexFunctionClusterPolicyReferenceName(obj client.Object) []string

IndexFunctionClusterPolicyReferenceName is IndexFunc for "ClusterPolicyReference" index.

func IndexFunctionPolicyReferenceName added in v0.5.2

func IndexFunctionPolicyReferenceName(obj client.Object) []string

IndexFunctionPolicyReferenceName is IndexFunc for "PolicyReference" index.

func NewPolicyEndpointsManager

func NewPolicyEndpointsManager(k8sClient client.Client, endpointChunkSize int, logger logr.Logger) *policyEndpointsManager

NewPolicyEndpointsManager constructs a new policyEndpointsManager

Types

type ClusterPolicyMetadata added in v1.1.0

type ClusterPolicyMetadata struct {
	Name     string
	UID      types.UID
	Tier     policyinfo.Tier
	Priority int32
	Subject  policyinfo.ClusterNetworkPolicySubject
}

ClusterPolicyMetadata contains metadata for creating ClusterPolicyEndpoints

type PolicyEndpointsManager

type PolicyEndpointsManager interface {
	Reconcile(ctx context.Context, policy *networking.NetworkPolicy) error
	Cleanup(ctx context.Context, policy *networking.NetworkPolicy) error
	ReconcileANP(ctx context.Context, anp *policyinfo.ApplicationNetworkPolicy) error
	CleanupANP(ctx context.Context, anp *policyinfo.ApplicationNetworkPolicy) error
	ReconcileCNP(ctx context.Context, cnp *policyinfo.ClusterNetworkPolicy) error
	CleanupCNP(ctx context.Context, cnp *policyinfo.ClusterNetworkPolicy) error
}

type PolicyMetadata added in v1.1.0

type PolicyMetadata struct {
	Name        string
	Namespace   string
	UID         types.UID
	PodSelector metav1.LabelSelector
	PolicyTypes []networking.PolicyType
	APIVersion  string
	Kind        string
}

PolicyMetadata contains the minimal metadata needed for creating PolicyEndpoints

Jump to

Keyboard shortcuts

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