Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NETOBSERV-1904 add configs for UDNs #909

Merged
merged 3 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from 2 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
40 changes: 39 additions & 1 deletion controllers/consoleplugin/config/static-frontend-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,13 @@ columns:
field: Interfaces
default: false
width: 15
- id: UDN
name: User Defined Network
tooltip: The user defined network identifier.
field: UdnId
filter: udn
default: false
width: 15
- id: Bytes
name: Bytes
tooltip: The total aggregated number of bytes.
Expand Down Expand Up @@ -849,6 +856,10 @@ filters:
component: autocomplete
placeholder: 'E.g: Ingress, Egress'
hint: Specify the direction of the Flow observed at the network interface observation point.
- id: udn
name: User Defined Network
component: autocomplete
hint: Specify a user defined network name.
- id: id
name: Conversation Id
component: text
Expand Down Expand Up @@ -913,6 +924,14 @@ scopes:
feature: multiCluster
filter: cluster_name
stepInto: zone
- id: udn
name: UDN
shortName: UDN
description: User Defined Network
labels:
- UdnId
filter: udn
stepInto: host
jpinsonneau marked this conversation as resolved.
Show resolved Hide resolved
- id: zone
name: Zone
shortName: AZ
Expand All @@ -935,9 +954,12 @@ scopes:
- SrcK8S_HostName
- DstK8S_HostName
groups:
- clusters
- udns
- zones
- clusters
- clusters+zones
- clusters+udns
- udns+zones
filters:
- src_host_name
- dst_host_name
Expand All @@ -956,6 +978,9 @@ scopes:
- zones
- zones+hosts
- hosts
- udns
- udns+zones
- udns+hosts
filters:
- src_namespace
- dst_namespace
Expand All @@ -982,6 +1007,10 @@ scopes:
- hosts
- hosts+namespaces
- namespaces
- udns
- udns+zones
- udns+hosts
- udns+namespaces
filters:
- src_owner_name
- dst_owner_name
Expand Down Expand Up @@ -1021,6 +1050,11 @@ scopes:
- namespaces
- namespaces+owners
- owners
- udns
- udns+zones
- udns+hosts
- udns+namespaces
- udns+owners
filters:
- src_resource
- dst_resource
Expand Down Expand Up @@ -1195,6 +1229,10 @@ fields:
- name: K8S_ClusterName
type: string
description: Cluster name or identifier
- name: UdnId
type: string
description: User Defined Network
lokiLabel: true
- name: _RecordType
type: string
description: "Type of record: 'flowLog' for regular flow logs, or 'newConnection', 'heartbeat', 'endConnection' for conversation tracking"
Expand Down
2 changes: 2 additions & 0 deletions controllers/flp/flp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ func TestConfigMapShouldDeserializeAsJSONWithLokiManual(t *testing.T) {
"DstK8S_Type",
"K8S_FlowLayer",
"FlowDirection",
"UdnId",
"_RecordType",
}, lokiCfg.Labels)
assert.Equal(`{app="netobserv-flowcollector"}`, fmt.Sprintf("%v", lokiCfg.StaticLabels))
Expand Down Expand Up @@ -713,6 +714,7 @@ func TestConfigMapShouldDeserializeAsJSONWithLokiStack(t *testing.T) {
"DstK8S_Type",
"K8S_FlowLayer",
"FlowDirection",
"UdnId",
"_RecordType",
}, lokiCfg.Labels)
assert.Equal(`{app="netobserv-flowcollector"}`, fmt.Sprintf("%v", lokiCfg.StaticLabels))
Expand Down
2 changes: 2 additions & 0 deletions pkg/helper/loki/labels_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func TestDefaultLokiLabels(t *testing.T) {
"DstK8S_Type",
"K8S_FlowLayer",
"FlowDirection",
"UdnId",
})
}

Expand All @@ -40,6 +41,7 @@ func TestAllLokiLabels(t *testing.T) {
"DstK8S_Type",
"K8S_FlowLayer",
"FlowDirection",
"UdnId",
"_RecordType",
"K8S_ClusterName",
"SrcK8S_Zone",
Expand Down
3 changes: 2 additions & 1 deletion pkg/helper/loki/loki-labels.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"DstK8S_OwnerName",
"DstK8S_Type",
"K8S_FlowLayer",
"FlowDirection"
"FlowDirection",
"UdnId"
],
"conntrack": [
"_RecordType"
Expand Down