Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/flowcollector/v1beta2/flowcollector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,9 @@ type SubnetLabel struct {
// List of CIDRs, such as `["1.2.3.4/32"]`.
//+required
CIDRs []string `json:"cidrs,omitempty"` // Note, starting with k8s 1.31 / ocp 4.16 there's a new way to validate CIDR such as `+kubebuilder:validation:XValidation:rule="isCIDR(self)",message="field should be in CIDR notation format"`. But older versions would reject the CRD so we cannot implement it now to maintain compatibility.

// Label name, used to flag matching flows.
// +kubebuilder:validation:Pattern:="^[a-zA-Z_:-][a-zA-Z0-9_:-]*$"
//+required
Name string `json:"name,omitempty"`
}
Expand Down
1 change: 1 addition & 0 deletions bundle/manifests/flows.netobserv.io_flowcollectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6113,6 +6113,7 @@ spec:
type: array
name:
description: Label name, used to flag matching flows.
pattern: ^[a-zA-Z_:-][a-zA-Z0-9_:-]*$
type: string
required:
- cidrs
Expand Down
1 change: 1 addition & 0 deletions config/crd/bases/flows.netobserv.io_flowcollectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5648,6 +5648,7 @@ spec:
type: array
name:
description: Label name, used to flag matching flows.
pattern: ^[a-zA-Z_:-][a-zA-Z0-9_:-]*$
type: string
required:
- cidrs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ spec:
type: Counter
valueField: Bytes
direction: Egress
labels: [SrcK8S_HostName,SrcK8S_Namespace,SrcK8S_OwnerName,SrcK8S_OwnerType]
labels: [SrcK8S_HostName,SrcK8S_Namespace,SrcK8S_OwnerName,SrcK8S_OwnerType,DstSubnetLabel]
filters:
- field: DstSubnetLabel
matchType: Absence
- field: DstSubnetLabel
matchType: MatchRegex
value: "^EXT:.*"
charts:
- dashboardName: Main
title: External egress traffic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ spec:
type: Counter
valueField: Bytes
direction: Ingress
labels: [DstK8S_HostName,DstK8S_Namespace,DstK8S_OwnerName,DstK8S_OwnerType]
labels: [DstK8S_HostName,DstK8S_Namespace,DstK8S_OwnerName,DstK8S_OwnerType,SrcSubnetLabel]
filters:
- field: SrcSubnetLabel
matchType: Absence
- field: SrcSubnetLabel
matchType: MatchRegex
value: "^EXT:.*"
charts:
- dashboardName: Main
title: External ingress traffic
Expand Down
1 change: 1 addition & 0 deletions helm/crds/flows.netobserv.io_flowcollectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5652,6 +5652,7 @@ spec:
type: array
name:
description: Label name, used to flag matching flows.
pattern: ^[a-zA-Z_:-][a-zA-Z0-9_:-]*$
type: string
required:
- cidrs
Expand Down