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

hubble/filter: add a new endpoint workload filter #21296

Merged

Conversation

kaworu
Copy link
Member

@kaworu kaworu commented Sep 14, 2022

Before this patch, although the source and destination endpoint workload information was filled in Hubble flows, the GetFlows API did not expose a way to filter on the workload fields.

This commit add server-side support for filtering flows based on source and/or destination endpoint workloads.

@kaworu kaworu added kind/feature This introduces new functionality. release-note/minor This PR changes functionality that users may find relevant to operating Cilium. sig/hubble Impacts hubble server or relay labels Sep 14, 2022
@kaworu kaworu requested review from a team as code owners September 14, 2022 10:06
Copy link
Member

@gandro gandro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat, thanks!

@kaworu kaworu force-pushed the pr/kaworu/hubble-add-endpoint-workload-filter branch from 15e3f18 to 0a587b2 Compare September 15, 2022 13:20
@kaworu
Copy link
Member Author

kaworu commented Sep 15, 2022

/test

Copy link
Contributor

@chancez chancez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment.

pkg/hubble/filters/workload.go Show resolved Hide resolved
@kaworu kaworu force-pushed the pr/kaworu/hubble-add-endpoint-workload-filter branch 3 times, most recently from bec620e to b131be4 Compare September 19, 2022 10:31
@kaworu kaworu force-pushed the pr/kaworu/hubble-add-endpoint-workload-filter branch 2 times, most recently from 7197f10 to 626c279 Compare September 19, 2022 13:10
Copy link
Member

@rolinh rolinh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, lgtm!

@kaworu kaworu force-pushed the pr/kaworu/hubble-add-endpoint-workload-filter branch 2 times, most recently from 6feb30a to e796431 Compare September 19, 2022 15:32
Copy link
Member

@gandro gandro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! A very minor nit in the test cases, otherwise looks good to me!

pkg/hubble/filters/workload_test.go Outdated Show resolved Hide resolved
pkg/hubble/filters/workload_test.go Outdated Show resolved Hide resolved
@kaworu kaworu force-pushed the pr/kaworu/hubble-add-endpoint-workload-filter branch from e796431 to 573fb9f Compare September 20, 2022 08:44
@kaworu
Copy link
Member Author

kaworu commented Sep 20, 2022

/test

Job 'Cilium-PR-K8s-1.25-kernel-net-next' failed:

Click to show.

Test Name

K8sDatapathConfig Check BPF masquerading with ip-masq-agent DirectRouting

Failure Output

FAIL: Failed to add ip route

If it is a flake and a GitHub issue doesn't already exist to track it, comment /mlh new-flake Cilium-PR-K8s-1.25-kernel-net-next so I can create one.

@kaworu kaworu force-pushed the pr/kaworu/hubble-add-endpoint-workload-filter branch 3 times, most recently from 739f163 to bb5d3e4 Compare September 21, 2022 16:07
@kaworu kaworu force-pushed the pr/kaworu/hubble-add-endpoint-workload-filter branch from bb5d3e4 to 22552f5 Compare September 22, 2022 14:04
Before this patch, although the source and destination endpoint workload
information was filled in Hubble flows, the GetFlows API did not expose
a way to filter on the workload fields.

This commit add server-side support for filtering flows based on source
and/or destination endpoint workloads.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
@kaworu
Copy link
Member Author

kaworu commented Sep 23, 2022

/test

Job 'Cilium-PR-K8s-1.25-kernel-net-next' failed:

Click to show.

Test Name

K8sDatapathConfig Check BPF masquerading with ip-masq-agent DirectRouting

Failure Output

FAIL: Failed to add ip route

If it is a flake and a GitHub issue doesn't already exist to track it, comment /mlh new-flake Cilium-PR-K8s-1.25-kernel-net-next so I can create one.

@kaworu
Copy link
Member Author

kaworu commented Sep 26, 2022

/ci-external-workloads

@kaworu
Copy link
Member Author

kaworu commented Sep 26, 2022

/test-1.25-net-next

@kaworu kaworu added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Sep 27, 2022
@kaworu
Copy link
Member Author

kaworu commented Sep 27, 2022

@chancez won't be able to review this, CI passed and all other reviews are in so marking as ready-to-merge.

@gandro gandro merged commit f632b8f into cilium:master Sep 27, 2022
@kaworu kaworu deleted the pr/kaworu/hubble-add-endpoint-workload-filter branch September 27, 2022 13:51
chancez added a commit to chancez/hubble that referenced this pull request Oct 6, 2022
This adds support to Hubble CLI for filtering against endpoints workloads
The server side of this was implemented in cilium/cilium#21296

Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
chancez added a commit to chancez/hubble that referenced this pull request Oct 6, 2022
This adds support to Hubble CLI for filtering against endpoints workloads
The server side of this was implemented in cilium/cilium#21296

Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
chancez added a commit to chancez/hubble that referenced this pull request Oct 7, 2022
This adds support to Hubble CLI for filtering against endpoints workloads
The server side of this was implemented in cilium/cilium#21296

Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
chancez added a commit to chancez/hubble that referenced this pull request Oct 10, 2022
This adds support to Hubble CLI for filtering against endpoints workloads
The server side of this was implemented in cilium/cilium#21296

Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
chancez added a commit to chancez/hubble that referenced this pull request Oct 10, 2022
This adds support to Hubble CLI for filtering against endpoints workloads
The server side of this was implemented in cilium/cilium#21296

Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
chancez added a commit to chancez/hubble that referenced this pull request Oct 11, 2022
This adds support to Hubble CLI for filtering against endpoints workloads
The server side of this was implemented in cilium/cilium#21296

Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
chancez added a commit to chancez/hubble that referenced this pull request Oct 12, 2022
This adds support to Hubble CLI for filtering against endpoints workloads
The server side of this was implemented in cilium/cilium#21296

Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
michi-covalent pushed a commit to cilium/hubble that referenced this pull request Oct 13, 2022
This adds support to Hubble CLI for filtering against endpoints workloads
The server side of this was implemented in cilium/cilium#21296

Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature This introduces new functionality. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/minor This PR changes functionality that users may find relevant to operating Cilium. sig/hubble Impacts hubble server or relay
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants