Documentation
¶
Index ¶
- Constants
- func IndexFunctionClusterPolicyReferenceName(obj client.Object) []string
- func IndexFunctionPolicyReferenceName(obj client.Object) []string
- func NewPolicyEndpointsManager(k8sClient client.Client, endpointChunkSize int, logger logr.Logger) *policyEndpointsManager
- type ClusterPolicyMetadata
- type PolicyEndpointsManager
- type PolicyMetadata
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
IndexFunctionClusterPolicyReferenceName is IndexFunc for "ClusterPolicyReference" index.
func IndexFunctionPolicyReferenceName ¶ added in v0.5.2
IndexFunctionPolicyReferenceName is IndexFunc for "PolicyReference" index.
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
Click to show internal directories.
Click to hide internal directories.