CRD API Reference
API Reference
networkenforcer.kubewarden.io/v1alpha1
Package v1alpha1 contains API Schema definitions for the security v1alpha1 API group.
AcknowledgedViolationRecord
AcknowledgedViolationRecord wraps a ViolationRecord together with the acknowledgement reason and timestamp.
| Field | Description | Default | Validation |
|---|---|---|---|
|
Violation is the violation record that was acknowledged. |
||
|
Reason is an optional field to indicate why this violation was |
||
|
AcknowledgedAt is the time when the violation was acknowledged. |
IstioAuthorizationPolicyRule
| Field | Description | Default | Validation |
|---|---|---|---|
|
From defines source identities for the rule. |
||
|
To defines destination operations for the rule. |
IstioAuthorizationPolicySpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
Selector selects the destination workloads where the policy is enforced. |
||
|
Rules is the ruleset. |
IstioFrom
| Field | Description | Default | Validation |
|---|---|---|---|
|
Source defines the source identities for the rule. |
IstioOperation
| Field | Description | Default | Validation |
|---|---|---|---|
|
Ports is the list of destination ports. |
IstioSource
| Field | Description | Default | Validation |
|---|---|---|---|
|
Principals are the source SPIFFE identities. |
IstioTo
| Field | Description | Default | Validation |
|---|---|---|---|
|
Operation defines the destination operations for the rule. |
PolicyBackend
Underlying type: string
PolicyBackend selects which data-plane policy model is used.
-
Enum: [kubernetes istio]
PolicyBackendSpec
PolicyBackendSpec contains the backend-specific policy payload.
| Field | Description | Default | Validation |
|---|---|---|---|
|
Backend selects which backend policy model this object carries. |
Enum: [kubernetes istio] |
|
|
Kubernetes contains the policy expressed as a standard Kubernetes |
||
Istio contains a constrained L4 policy model rendered as an Istio |
ViolationInfo
ViolationInfo holds the details of a single network policy violation without the controller-assigned ID. Backend scrapers produce observations in this shape (see violation.Observation); the controller assigns the ID when it persists the record into wnp.Status.Violations.
| Field | Description | Default | Validation |
|---|---|---|---|
|
Timestamp is when the violation last occurred. |
||
|
Source is the workload that initiated the traffic. |
||
|
Dest is the workload that received the traffic. |
||
|
Protocol is the L4 protocol (TCP, UDP). |
||
|
DstPort is the destination port. 0 when unavailable. |
Maximum: 65535 |
|
|
Action is the enforcement action taken (monitor or protect). |
Enum: [monitor protect] |
|
|
DenyingPolicyNamespace is the namespace of the WorkloadNetworkPolicy this |
||
|
DenyingPolicyName is the name of the WorkloadNetworkPolicy this violation |
ViolationRecord
ViolationRecord holds the details of a single network policy violation. It embeds ViolationInfo (the violation without the ID) so that the two types cannot drift apart: every violation field is defined once, in ViolationInfo.
| Field | Description | Default | Validation |
|---|---|---|---|
|
Timestamp is when the violation last occurred. |
||
|
Source is the workload that initiated the traffic. |
||
|
Dest is the workload that received the traffic. |
||
|
Protocol is the L4 protocol (TCP, UDP). |
||
|
DstPort is the destination port. 0 when unavailable. |
Maximum: 65535 |
|
|
Action is the enforcement action taken (monitor or protect). |
Enum: [monitor protect] |
|
|
DenyingPolicyNamespace is the namespace of the WorkloadNetworkPolicy this |
||
|
DenyingPolicyName is the name of the WorkloadNetworkPolicy this violation |
||
|
ID is a per-policy unique identifier allocated by the controller Stored as int64 (not uint64) for compatibility with the Kubernetes |
WorkloadKind
Underlying type: string
WorkloadKind identifies the Kubernetes owner resource kind for a workload.
WorkloadNetworkPolicy
WorkloadNetworkPolicy is the schema for the runtime network policy API.
Spec carries a backend-specific policy payload (Kubernetes or Istio) and a
mode (monitor or protect). The resource is intentionally namespaced and uses
the networkenforcer.kubewarden.io group to avoid colliding with the upstream
networking.k8s.io/NetworkPolicy kind.
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
|
WorkloadNetworkPolicyList
WorkloadNetworkPolicyList is a list of WorkloadNetworkPolicy.
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
|
WorkloadNetworkPolicyMode
Underlying type: string
WorkloadNetworkPolicyMode selects how a WorkloadNetworkPolicy is interpreted at runtime.
-
Enum: [monitor protect]
WorkloadNetworkPolicyProposal
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
WorkloadNetworkPolicyProposalList
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
|
WorkloadNetworkPolicyProposalSpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
Backend selects which backend policy model this object carries. |
Enum: [kubernetes istio] |
|
|
Kubernetes contains the policy expressed as a standard Kubernetes |
||
Istio contains a constrained L4 policy model rendered as an Istio |
WorkloadNetworkPolicyProposalStatus
| Field | Description | Default | Validation |
|---|---|---|---|
|
conditions represent the current state of the proposal. |
WorkloadNetworkPolicySpec
WorkloadNetworkPolicySpec defines the desired state of a WorkloadNetworkPolicy.
| Field | Description | Default | Validation |
|---|---|---|---|
|
Backend selects which backend policy model this object carries. |
Enum: [kubernetes istio] |
|
|
Kubernetes contains the policy expressed as a standard Kubernetes |
||
Istio contains a constrained L4 policy model rendered as an Istio |
|||
Mode controls whether the policy is observed (monitor) or actively |
monitor |
Enum: [monitor protect] |
WorkloadNetworkPolicyStatus
WorkloadNetworkPolicyStatus defines the observed state of a WorkloadNetworkPolicy.
| Field | Description | Default | Validation |
|---|---|---|---|
|
ObservedGeneration is the most recent generation observed for this |
||
|
ViolationCount is the total number of violation records ever |
0 |
|
|
ActiveViolationCount is the number of currently active (non-cleared) |
0 |
|
|
Violations is the list of the most recent violation records |
||
|
AcknowledgedViolations is the list of the most recent violation |
WorkloadRef
WorkloadRef identifies a Kubernetes workload.
| Field | Description | Default | Validation |
|---|---|---|---|
|
Namespace is the Kubernetes namespace of the workload. |
||
|
OwnerKind is the kind of the owner resource. |
||
|
OwnerName is the name of the owner resource. |
||
|
Identity is the istio-specific workload identity. |
||
|
Selector is the label selector for the workload. |