Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1032d3c
chips refactoring for more options
jpinsonneau Jun 3, 2025
acc6e16
refactor match and back and forth options
jpinsonneau Jun 12, 2025
d19f2a1
search input with popper
jpinsonneau Jun 17, 2025
e52d221
fix styling
jpinsonneau Jun 17, 2025
aea0c93
adapt src / dst actions naming when using peers
jpinsonneau Jun 18, 2025
8636b2c
explicitly show and / or
jpinsonneau Jun 18, 2025
82609ef
address feedback
jpinsonneau Jun 19, 2025
f279e24
add autocompletes on search field
jpinsonneau Jun 30, 2025
ffc1f08
equals vs contains
jpinsonneau Jul 2, 2025
fe17d7e
improved suggestions and display
jpinsonneau Jul 3, 2025
4e503a9
fix autocomplete display value usage
jpinsonneau Jul 3, 2025
be4ce0c
simplify addLineFilters args
jpinsonneau Jul 15, 2025
a6f2a3e
regex / equal match
jpinsonneau Jul 15, 2025
d12ff91
remove padding on filters menu toggle
jpinsonneau Jul 15, 2025
42c74d9
Update pkg/handler/flows.go
jpinsonneau Jul 16, 2025
a635e32
improve match dropdown
jpinsonneau Jul 16, 2025
9dd995e
move FilterCompare type to model
jpinsonneau Jul 16, 2025
96e59d1
fix rebase
jpinsonneau Nov 6, 2025
b11c5a8
fix autocompletes empty values
jpinsonneau Nov 18, 2025
b0e47d7
address feedback
jpinsonneau Nov 20, 2025
bade271
styling improvments
jpinsonneau Nov 21, 2025
326336d
data-test
jpinsonneau Nov 25, 2025
31f7879
bugfixes
jpinsonneau Dec 11, 2025
d41b42e
type + endpoint
jpinsonneau Dec 16, 2025
e80154e
split panel / suggestions
jpinsonneau Dec 16, 2025
310ac51
gateway case fix after rebase
jpinsonneau Dec 16, 2025
888ce86
fix cypress
jpinsonneau Dec 16, 2025
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
143 changes: 143 additions & 0 deletions config/sample-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -482,46 +482,55 @@ frontend:
- id: K8S_Name
name: Names
calculated: '[SrcK8S_Name,DstK8S_Name]'
filter: name
default: false
width: 15
- id: K8S_Type
name: Kinds
calculated: '[SrcK8S_Type,DstK8S_Type]'
filter: kind
default: false
width: 10
- id: K8S_OwnerName
name: Owners
calculated: '[SrcK8S_OwnerName,DstK8S_OwnerName]'
filter: owner_name
default: false
width: 15
- id: K8S_OwnerType
name: Owner Kinds
calculated: '[SrcK8S_OwnerType,DstK8S_OwnerType]'
filter: kind
default: false
width: 10
- id: K8S_Namespace
name: Namespaces
calculated: '[SrcK8S_Namespace,DstK8S_Namespace]'
filter: namespace
default: false
width: 15
- id: Addr
name: IP
calculated: '[SrcAddr,DstAddr]'
filter: address
default: false
width: 10
- id: Port
name: Ports
calculated: '[SrcPort,DstPort]'
filter: port
default: false
width: 10
- id: Mac
name: MAC
calculated: '[SrcMac,DstMac]'
filter: mac
default: false
width: 10
- id: K8S_HostIP
name: Node IP
calculated: '[SrcK8S_HostIP,DstK8S_HostIP]'
filter: host_address
default: false
width: 10
- id: Sampling
Expand All @@ -532,16 +541,19 @@ frontend:
- id: K8S_HostName
name: Node Name
calculated: '[SrcK8S_HostName,DstK8S_HostName]'
filter: host_name
default: false
width: 15
- id: K8S_Object
name: Kubernetes Objects
calculated: '[column.SrcK8S_Object,column.DstK8S_Object]'
filter: resource
default: false
width: 15
- id: K8S_OwnerObject
name: Owner Kubernetes Objects
calculated: '[column.SrcK8S_OwnerObject,column.DstK8S_OwnerObject]'
filter: resource
default: false
width: 15
- id: K8S_FlowLayer
Expand Down Expand Up @@ -842,6 +854,22 @@ frontend:
name: Cluster
component: autocomplete
hint: Specify a cluster ID or name.
- id: namespace
name: Namespace
component: autocomplete
autoCompleteAddsQuotes: true
category: endpoint
placeholder: 'E.g: netobserv'
hint: Specify a single kubernetes name.
examples: |-
Specify a single kubernetes name following these rules:
- Containing any alphanumeric, hyphen, underscrore or dot character
- Partial text like cluster, cluster-image, image-registry
- Exact match using quotes like "cluster-image-registry"
- Case sensitive match using quotes like "Deployment"
- Starting text like cluster, "cluster-*"
- Ending text like "*-registry"
- Pattern like "cluster-*-registry", "c*-*-r*y", -i*e-
- id: src_namespace
name: Namespace
component: autocomplete
Expand Down Expand Up @@ -874,6 +902,21 @@ frontend:
- Starting text like cluster, "cluster-*"
- Ending text like "*-registry"
- Pattern like "cluster-*-registry", "c*-*-r*y", -i*e-
- id: name
name: Name
component: text
category: endpoint
placeholder: 'E.g: my-pod'
hint: Specify a single kubernetes name.
examples: |-
Specify a single kubernetes name following these rules:
- Containing any alphanumeric, hyphen, underscrore or dot character
- Partial text like cluster, cluster-image, image-registry
- Exact match using quotes like "cluster-image-registry"
- Case sensitive match using quotes like "Deployment"
- Starting text like cluster, "cluster-*"
- Ending text like "*-registry"
- Pattern like "cluster-*-registry", "c*-*-r*y", -i*e-
- id: src_name
name: Name
component: text
Expand Down Expand Up @@ -904,6 +947,12 @@ frontend:
- Starting text like cluster, "cluster-*"
- Ending text like "*-registry"
- Pattern like "cluster-*-registry", "c*-*-r*y", -i*e-
- id: kind
name: Kind
component: autocomplete
autoCompleteAddsQuotes: true
category: endpoint
placeholder: 'E.g: Pod, Service'
- id: src_kind
name: Kind
component: autocomplete
Expand All @@ -916,6 +965,21 @@ frontend:
autoCompleteAddsQuotes: true
category: destination
placeholder: 'E.g: Pod, Service'
- id: owner_name
name: Owner Name
component: text
category: endpoint
placeholder: 'E.g: my-deployment'
hint: Specify a single kubernetes name.
examples: |-
Specify a single kubernetes name following these rules:
- Containing any alphanumeric, hyphen, underscrore or dot character
- Partial text like cluster, cluster-image, image-registry
- Exact match using quotes like "cluster-image-registry"
- Case sensitive match using quotes like "Deployment"
- Starting text like cluster, "cluster-*"
- Ending text like "*-registry"
- Pattern like "cluster-*-registry", "c*-*-r*y", -i*e-
- id: src_owner_name
name: Owner Name
component: text
Expand Down Expand Up @@ -946,6 +1010,11 @@ frontend:
- Starting text like cluster, "cluster-*"
- Ending text like "*-registry"
- Pattern like "cluster-*-registry", "c*-*-r*y", -i*e-
- id: zone
name: Zone
component: autocomplete
category: endpoint
hint: Specify a single zone.
- id: src_zone
name: Zone
component: autocomplete
Expand All @@ -956,6 +1025,11 @@ frontend:
component: autocomplete
category: destination
hint: Specify a single zone.
- id: subnet_label
name: Subnet Label
component: autocomplete
category: endpoint
hint: Specify a subnet label, or an empty string to get unmatched sources.
- id: src_subnet_label
name: Subnet Label
component: autocomplete
Expand All @@ -966,6 +1040,17 @@ frontend:
component: autocomplete
category: destination
hint: Specify a subnet label, or an empty string to get unmatched destinations.
- id: resource
name: Resource
component: autocomplete
category: endpoint
placeholder: 'E.g: Deployment.example.my-dep or Pod.default.my-pod'
hint: Specify an existing resource from its kind, namespace and name.
examples: |-
Specify a kind, namespace and name from existing:
- Select kind first from suggestions
- Then select namespace from suggestions
- Finally select name from suggestions
- id: src_resource
name: Resource
component: autocomplete
Expand All @@ -988,6 +1073,17 @@ frontend:
- Select kind first from suggestions
- Then select namespace from suggestions
- Finally select name from suggestions
- id: address
name: IP
component: text
category: endpoint
hint: Specify a single IP or range.
placeholder: 'E.g: 192.0.2.0'
examples: |-
Specify IP following one of these rules:
- A single IPv4 or IPv6 address like 192.0.2.0, ::1
- An IP address range like 192.168.0.1-192.189.10.12, 2001:db8::1-2001:db8::8
- A CIDR specification like 192.51.100.0/24, 2001:db8::/32
- id: src_address
name: IP
component: text
Expand All @@ -1010,6 +1106,17 @@ frontend:
- A single IPv4 or IPv6 address like 192.0.2.0, ::1
- An IP address range like 192.168.0.1-192.189.10.12, 2001:db8::1-2001:db8::8
- A CIDR specification like 192.51.100.0/24, 2001:db8::/32
- id: port
name: Port
component: autocomplete
category: endpoint
hint: Specify a single port number or name.
placeholder: 'E.g: 80'
examples: |-
Specify a single port following one of these rules:
- A port number like 80, 21
- A IANA name like HTTP, FTP
docUrl: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml
- id: src_port
name: Port
component: autocomplete
Expand All @@ -1032,6 +1139,12 @@ frontend:
- A port number like 80, 21
- A IANA name like HTTP, FTP
docUrl: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml
- id: mac
name: MAC
component: text
category: endpoint
placeholder: 'E.g: 42:01:0A:00:00:01'
hint: Specify a single MAC address.
- id: src_mac
name: MAC
component: text
Expand All @@ -1044,6 +1157,17 @@ frontend:
category: destination
placeholder: 'E.g: 42:01:0A:00:00:01'
hint: Specify a single MAC address.
- id: host_address
name: Node IP
component: text
category: endpoint
placeholder: 'E.g: 10.0.0.1'
hint: Specify a single IP or range.
examples: |-
Specify IP following one of these rules:
- A single IPv4 or IPv6 address like 192.0.2.0, ::1
- An IP address range like 192.168.0.1-192.189.10.12, 2001:db8::1-2001:db8::8
- A CIDR specification like 192.51.100.0/24, 2001:db8::/32
- id: src_host_address
name: Node IP
component: text
Expand All @@ -1066,6 +1190,21 @@ frontend:
- A single IPv4 or IPv6 address like 192.0.2.0, ::1
- An IP address range like 192.168.0.1-192.189.10.12, 2001:db8::1-2001:db8::8
- A CIDR specification like 192.51.100.0/24, 2001:db8::/32
- id: host_name
name: Node Name
component: text
category: endpoint
placeholder: 'E.g: my-node'
hint: Specify a single kubernetes name.
examples: |-
Specify a single kubernetes name following these rules:
- Containing any alphanumeric, hyphen, underscrore or dot character
- Partial text like cluster, cluster-image, image-registry
- Exact match using quotes like "cluster-image-registry"
- Case sensitive match using quotes like "Deployment"
- Starting text like cluster, "cluster-*"
- Ending text like "*-registry"
- Pattern like "cluster-*-registry", "c*-*-r*y", -i*e-
- id: src_host_name
name: Node Name
component: text
Expand Down Expand Up @@ -1096,6 +1235,10 @@ frontend:
- Starting text like cluster, "cluster-*"
- Ending text like "*-registry"
- Pattern like "cluster-*-registry", "c*-*-r*y", -i*e-
- id: network
name: Network Name
component: text
category: endpoint
- id: src_network
name: Network Name
component: text
Expand Down
4 changes: 2 additions & 2 deletions pkg/handler/flows.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ func (h *Handlers) getFlows(ctx context.Context, lokiClient httpclient.Caller, p
// TODO: this should actually be managed from the loki gateway, with "namespace" query param
filterGroups = filterGroups.Distribute(
[]filters.SingleQuery{
{filters.NewMatch(fields.SrcNamespace, `"`+namespace+`"`)},
{filters.NewMatch(fields.DstNamespace, `"`+namespace+`"`)},
{filters.NewEqualMatch(fields.SrcNamespace, namespace)},
{filters.NewEqualMatch(fields.DstNamespace, namespace)},
},
func(_ filters.SingleQuery) bool { return false },
)
Expand Down
6 changes: 3 additions & 3 deletions pkg/handler/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,14 @@ func (h *Handlers) GetNames(ctx context.Context) func(w http.ResponseWriter, r *
func (h *Handlers) getNamesForPrefix(ctx context.Context, cl clients, prefix, kind, namespace string) ([]string, int, error) {
filts := filters.SingleQuery{}
if namespace != "" {
filts = append(filts, filters.NewMatch(prefix+fields.Namespace, exact(namespace)))
filts = append(filts, filters.NewRegexMatch(prefix+fields.Namespace, exact(namespace)))
}
var searchField string
if utils.IsOwnerKind(kind) {
filts = append(filts, filters.NewMatch(prefix+fields.OwnerType, exact(kind)))
filts = append(filts, filters.NewRegexMatch(prefix+fields.OwnerType, exact(kind)))
searchField = prefix + fields.OwnerName
} else {
filts = append(filts, filters.NewMatch(prefix+fields.Type, exact(kind)))
filts = append(filts, filters.NewRegexMatch(prefix+fields.Type, exact(kind)))
searchField = prefix + fields.Name
}

Expand Down
10 changes: 5 additions & 5 deletions pkg/handler/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,11 @@ func expandQueries(queries filters.MultiQueries, namespace string, isForProm fun
// (Note that we use DstOwnerName both as an optimization as it's a Loki index,
// and as convenience because looking for empty fields won't work if they aren't indexed)
q1 := filters.SingleQuery{
filters.NewMatch(fields.FlowDirection, `"`+string(constants.Ingress)+`","`+string(constants.Inner)+`"`),
filters.NewRegexMatch(fields.FlowDirection, `"`+string(constants.Ingress)+`","`+string(constants.Inner)+`"`),
}
q2 := filters.SingleQuery{
filters.NewMatch(fields.FlowDirection, `"`+string(constants.Egress)+`"`),
filters.NewMatch(fields.DstType, `"","Service"`),
filters.NewRegexMatch(fields.FlowDirection, `"`+string(constants.Egress)+`"`),
filters.NewRegexMatch(fields.DstType, `"","Service"`),
}

shouldSkip := func(q filters.SingleQuery) bool {
Expand All @@ -258,8 +258,8 @@ func expandQueries(queries filters.MultiQueries, namespace string, isForProm fun
// TODO: this should actually be managed from the loki gateway, with "namespace" query param
expanded = expanded.Distribute(
[]filters.SingleQuery{
{filters.NewMatch(fields.SrcNamespace, `"`+namespace+`"`)},
{filters.NewMatch(fields.DstNamespace, `"`+namespace+`"`)},
{filters.NewRegexMatch(fields.SrcNamespace, `"`+namespace+`"`)},
{filters.NewRegexMatch(fields.DstNamespace, `"`+namespace+`"`)},
},
isForProm,
)
Expand Down
Loading