diff --git a/controllers/consoleplugin/config/static-frontend-config.yaml b/controllers/consoleplugin/config/static-frontend-config.yaml index fd383737d..5b5ec03ff 100644 --- a/controllers/consoleplugin/config/static-frontend-config.yaml +++ b/controllers/consoleplugin/config/static-frontend-config.yaml @@ -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. @@ -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 @@ -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: namespace - id: zone name: Zone shortName: AZ @@ -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 @@ -956,6 +978,9 @@ scopes: - zones - zones+hosts - hosts + - udns + - udns+zones + - udns+hosts filters: - src_namespace - dst_namespace @@ -982,6 +1007,10 @@ scopes: - hosts - hosts+namespaces - namespaces + - udns + - udns+zones + - udns+hosts + - udns+namespaces filters: - src_owner_name - dst_owner_name @@ -1021,6 +1050,11 @@ scopes: - namespaces - namespaces+owners - owners + - udns + - udns+zones + - udns+hosts + - udns+namespaces + - udns+owners filters: - src_resource - dst_resource @@ -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" diff --git a/controllers/flp/flp_test.go b/controllers/flp/flp_test.go index 05b32fbb9..614ffd8cb 100644 --- a/controllers/flp/flp_test.go +++ b/controllers/flp/flp_test.go @@ -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)) @@ -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)) diff --git a/pkg/helper/loki/labels_test.go b/pkg/helper/loki/labels_test.go index ddb67e28a..afb438847 100644 --- a/pkg/helper/loki/labels_test.go +++ b/pkg/helper/loki/labels_test.go @@ -20,6 +20,7 @@ func TestDefaultLokiLabels(t *testing.T) { "DstK8S_Type", "K8S_FlowLayer", "FlowDirection", + "UdnId", }) } @@ -40,6 +41,7 @@ func TestAllLokiLabels(t *testing.T) { "DstK8S_Type", "K8S_FlowLayer", "FlowDirection", + "UdnId", "_RecordType", "K8S_ClusterName", "SrcK8S_Zone", diff --git a/pkg/helper/loki/loki-labels.json b/pkg/helper/loki/loki-labels.json index 4cec2f960..1f1d3384b 100644 --- a/pkg/helper/loki/loki-labels.json +++ b/pkg/helper/loki/loki-labels.json @@ -7,7 +7,8 @@ "DstK8S_OwnerName", "DstK8S_Type", "K8S_FlowLayer", - "FlowDirection" + "FlowDirection", + "UdnId" ], "conntrack": [ "_RecordType"