Skip to content

Conversation

kaworu
Copy link
Member

@kaworu kaworu commented Jun 21, 2024

#32313 introduced cluster name info at the Hubble flow Endpoint level. This PR adds corresponding filters on the Hubble server side, and two new --from-cluster and --to-cluster Hubble CLI flags leveraging the new filter.

For simplicity's sake the filter is a strict match for now, with the possibility to extend if/when the need arise (e.g. to RE2).

@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 hubble-cli PRs or GitHub issues related with hubble-cli labels Jun 21, 2024
@kaworu kaworu self-assigned this Jun 21, 2024
@kaworu kaworu requested review from a team as code owners June 21, 2024 14:07
@kaworu kaworu requested review from chancez and gandro June 21, 2024 14:07
@kaworu kaworu added release-blocker/1.16 This issue will prevent the release of the next version of Cilium. and removed release-blocker/1.16 This issue will prevent the release of the next version of Cilium. labels Jun 26, 2024
@kaworu kaworu force-pushed the pr/kaworu/hubble/from-to-cluster-filters branch from c606e39 to 5ec0a29 Compare June 28, 2024 09:16
@kaworu kaworu requested a review from a team as a code owner June 28, 2024 09:17
@kaworu kaworu requested review from a user and glrf June 28, 2024 09:17
@kaworu kaworu force-pushed the pr/kaworu/hubble/from-to-cluster-filters branch from 5ec0a29 to ec0d6b5 Compare June 28, 2024 09:22
@kaworu kaworu added the dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. label Aug 7, 2024
@kaworu kaworu force-pushed the pr/kaworu/hubble/from-to-cluster-filters branch from ec0d6b5 to 99fdcbe Compare August 7, 2024 15:56
Copy link

github-actions bot commented Sep 7, 2024

This pull request has been automatically marked as stale because it
has not had recent activity. It will be closed if no further activity
occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale. label Sep 7, 2024
Copy link

This pull request has not seen any activity since it was marked stale.
Closing.

@github-actions github-actions bot closed this Sep 21, 2024
@chancez
Copy link
Contributor

chancez commented Sep 24, 2024

@kaworu should we keep this open?

@kaworu kaworu reopened this Sep 25, 2024
@github-actions github-actions bot removed the stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale. label Sep 26, 2024
@kaworu kaworu force-pushed the pr/kaworu/hubble/from-to-cluster-filters branch from 99fdcbe to f6a6755 Compare October 9, 2024 14:26
@gandro
Copy link
Member

gandro commented Oct 9, 2024

Is this ready for review again? Otherwise I'd appreciate if we put it in draft, since every push creates an notification in all reviewers inbox. There are a couple unresolved comments still. We should resolve them (either by fixing them or declaring that we won't fix them).

@kaworu kaworu marked this pull request as draft October 9, 2024 14:48
@kaworu kaworu removed the dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. label Oct 9, 2024
@kaworu kaworu added the dont-merge/blocked Another PR must be merged before this one. label Oct 16, 2024
@kaworu
Copy link
Member Author

kaworu commented Oct 16, 2024

Will wait on #35415.

Reword the IP.source_xlated documentation comment on the way.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
Signed-off-by: Alexandre Perrin <alex@isovalent.com>
Signed-off-by: Alexandre Perrin <alex@isovalent.com>
Before this patch, the Hubble CLI `--cluster` flag was implemented as
`--node-name cluster/`, i.e. filtering flows emitted by all the nodes in
the target cluster.

This behavior was inconsistent with the `--namespace foo` flag, which
shows not only flows ingressing/egressing the `foo` namespace, but also
flows observed from other namespaces either going to or coming from the
`foo` namespace. It also made the `--cluster` and `--node-name` flags
incompatible.

163c874 ("hubble: add cluster name to a flow's endpoints") added
cluster name info at the flow endpoint level, and the previous commits
added corresponding Hubble filters (`--from-cluster` and `--to-cluster`
in the Hubble CLI).

This patch refactors the `--cluster` flag to filter based on the newly
introduced endpoint cluster name info, making `--cluster foo`
conceptually equivalent to "--from-cluster foo || --to-namespace foo"
(and thus consistent with the `--namespace` flag) and removing the
incompatibility with the `--node-name` flag.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
Suggested-by: Sebastian Wicki <sebastian@isovalent.com>
@kaworu kaworu force-pushed the pr/kaworu/hubble/from-to-cluster-filters branch from f6a6755 to b6c4e32 Compare November 4, 2024 09:27
@kaworu kaworu removed the dont-merge/blocked Another PR must be merged before this one. label Nov 4, 2024
@kaworu kaworu marked this pull request as ready for review November 4, 2024 09:43
@kaworu
Copy link
Member Author

kaworu commented Nov 4, 2024

Rebased on top of #35415 since it has been merged, now ready for review.

@kaworu kaworu requested a review from gandro November 4, 2024 09:44
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.

Thank you!

@kaworu
Copy link
Member Author

kaworu commented Nov 4, 2024

/test

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Nov 4, 2024
@julianwiedmann julianwiedmann added this pull request to the merge queue Nov 4, 2024
Merged via the queue into cilium:main with commit 76c6d11 Nov 4, 2024
66 checks passed
@kaworu kaworu deleted the pr/kaworu/hubble/from-to-cluster-filters branch November 4, 2024 14:11
@kaworu kaworu added affects/v1.15 This issue affects v1.15 branch affects/v1.16 This issue affects v1.16 branch labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/v1.15 This issue affects v1.15 branch affects/v1.16 This issue affects v1.16 branch hubble-cli PRs or GitHub issues related with hubble-cli 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants