Skip to content

Commit 0a2cd8f

Browse files
NETOBSERV-2555 Filters observed even when features not enabled in flowcollector (#2410)
* add features on filters * Add Feature field to FilterConfig struct --------- Co-authored-by: Leandro Beretta <lea.beretta@gmail.com>
1 parent 21e6368 commit 0a2cd8f

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

internal/controller/consoleplugin/config/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ type FilterConfig struct {
9393
Examples string `yaml:"examples,omitempty" json:"examples,omitempty"`
9494
DocURL string `yaml:"docUrl,omitempty" json:"docUrl,omitempty"`
9595
Placeholder string `yaml:"placeholder,omitempty" json:"placeholder,omitempty"`
96+
Feature string `yaml:"feature,omitempty" json:"feature,omitempty"`
9697
}
9798

9899
type ScopeConfig struct {

internal/controller/consoleplugin/config/static-frontend-config.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@ filters:
695695
component: autocomplete
696696
placeholder: 'E.g: cluster-1, cluster-2'
697697
hint: Add cluster ID or name filter.
698+
feature: multiCluster
698699
- id: namespace
699700
name: Namespace
700701
component: autocomplete
@@ -857,36 +858,42 @@ filters:
857858
category: endpoint
858859
placeholder: 'E.g: zone-1, zone-2'
859860
hint: Add zone filter.
861+
feature: zones
860862
- id: src_zone
861863
name: Zone
862864
component: autocomplete
863865
category: source
864866
placeholder: 'E.g: zone-1, zone-2'
865867
hint: Add source zone filter.
868+
feature: zones
866869
- id: dst_zone
867870
name: Zone
868871
component: autocomplete
869872
category: destination
870873
placeholder: 'E.g: zone-1, zone-2'
871874
hint: Add destination zone filter.
875+
feature: zones
872876
- id: subnet_label
873877
name: Subnet Label
874878
component: autocomplete
875879
category: endpoint
876880
placeholder: 'E.g: Pods, Services, ExternalIP'
877881
hint: Add subnet label filter, or an empty string to get unmatched sources.
882+
feature: subnetLabels
878883
- id: src_subnet_label
879884
name: Subnet Label
880885
component: autocomplete
881886
category: source
882887
placeholder: 'E.g: Pods, Services, ExternalIP'
883888
hint: Add source subnet label filter, or an empty string to get unmatched sources.
889+
feature: subnetLabels
884890
- id: dst_subnet_label
885891
name: Subnet Label
886892
component: autocomplete
887893
category: destination
888894
placeholder: 'E.g: Pods, Services, ExternalIP'
889895
hint: Add destination subnet label filter, or an empty string to get unmatched destinations.
896+
feature: subnetLabels
890897
- id: resource
891898
name: Resource
892899
component: autocomplete
@@ -1087,16 +1094,19 @@ filters:
10871094
component: text
10881095
category: endpoint
10891096
hint: Add network name filter.
1097+
feature: multiNetworks
10901098
- id: src_network
10911099
name: Network Name
10921100
component: text
10931101
category: source
10941102
hint: Add source network name filter.
1103+
feature: multiNetworks
10951104
- id: dst_network
10961105
name: Network Name
10971106
component: text
10981107
category: destination
10991108
hint: Add destination network name filter.
1109+
feature: multiNetworks
11001110
- id: protocol
11011111
name: Protocol
11021112
component: autocomplete
@@ -1157,6 +1167,7 @@ filters:
11571167
name: User Defined Network
11581168
component: autocomplete
11591169
hint: Add user defined network name filter.
1170+
feature: udnMapping
11601171
- id: id
11611172
name: Conversation Id
11621173
component: text
@@ -1171,6 +1182,7 @@ filters:
11711182
- A _LINUX_TCP_STATES_H number like 1, 2, 3
11721183
- A _LINUX_TCP_STATES_H TCP name like ESTABLISHED, SYN_SENT, SYN_RECV
11731184
docUrl: https://github.com/torvalds/linux/blob/master/include/net/tcp_states.h
1185+
feature: pktDrop
11741186
- id: pkt_drop_cause
11751187
name: Packet drop latest cause
11761188
component: autocomplete
@@ -1181,20 +1193,24 @@ filters:
11811193
- A _LINUX_DROPREASON_CORE_H number like 2, 3, 4
11821194
- A _LINUX_DROPREASON_CORE_H SKB_DROP_REASON name like NOT_SPECIFIED, NO_SOCKET, PKT_TOO_SMALL
11831195
docUrl: https://github.com/torvalds/linux/blob/master/include/net/dropreason-core.h
1196+
feature: pktDrop
11841197
- id: dns_id
11851198
name: DNS Id
11861199
component: number
11871200
hint: Add DNS Id filter.
1201+
feature: dnsTracking
11881202
- id: dns_name
11891203
name: DNS Name
11901204
component: text
11911205
placeholder: 'E.g: www.example.com, www.example.org'
11921206
hint: Add DNS name filter.
1207+
feature: dnsTracking
11931208
- id: dns_latency
11941209
name: DNS Latency
11951210
component: number
11961211
placeholder: 'E.g: 100, 200'
11971212
hint: Add DNS Latency in milliseconds filter.
1213+
feature: dnsTracking
11981214
- id: dns_flag_response_code
11991215
name: DNS Response Code
12001216
component: autocomplete
@@ -1206,47 +1222,57 @@ filters:
12061222
- A IANA RCODE number like 0, 3, 9
12071223
- A IANA RCODE name like NoError, NXDomain, NotAuth
12081224
docUrl: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6
1225+
feature: dnsTracking
12091226
- id: dns_errno
12101227
name: DNS Error
12111228
component: autocomplete
12121229
hint: Add DNS error number filter.
1230+
feature: dnsTracking
12131231
- id: time_flow_rtt
12141232
name: Flow RTT
12151233
component: number
12161234
hint: Add TCP smoothed Round Trip Time in nanoseconds filter.
1235+
feature: flowRTT
12171236
- id: network_events
12181237
name: Network Events
12191238
component: text
12201239
hint: Add network event filter.
1240+
feature: networkEvents
12211241
- id: xlat_zone_id
12221242
name: Xlat Zone Id
12231243
component: number
12241244
hint: Add Xlat zone ID filter.
1245+
feature: packetTranslation
12251246
- id: xlat_src_address
12261247
name: Xlat source address
12271248
component: text
12281249
category: source
12291250
hint: Add IP or range filter.
1251+
feature: packetTranslation
12301252
- id: xlat_dst_address
12311253
name: Xlat destination address
12321254
component: text
12331255
category: destination
12341256
hint: Add destination IP or range filter.
1257+
feature: packetTranslation
12351258
- id: xlat_src_port
12361259
name: Xlat source port
12371260
component: autocomplete
12381261
category: source
12391262
hint: Add source port number or name filter.
1263+
feature: packetTranslation
12401264
- id: xlat_dst_port
12411265
name: Xlat destination port
12421266
component: autocomplete
12431267
category: destination
12441268
hint: Add destination port number or name filter.
1269+
feature: packetTranslation
12451270
- id: ipsec_status
12461271
name: IPsec Status
12471272
component: text
12481273
placeholder: 'E.g: success, error'
12491274
hint: Add IPsec status filter.
1275+
feature: ipsec
12501276
scopes:
12511277
- id: cluster
12521278
name: Cluster

0 commit comments

Comments
 (0)