-
Notifications
You must be signed in to change notification settings - Fork 252
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
cmd/observe: Add --first to support querying for earlier flows and events #719
Conversation
@chancez I'd like to get this into the next release. Now that the upstream PR has been merged, do you think you could rebase this? |
@gandro I was waiting for a new release branch to be cut that has my changes so I can update the reference to vendor. Do we have a branch I can update the vendored cilium/cilium to yet? |
@chancez No need for a new release branch to be cut. Just pick latest master, we'll take care of updating the dependency to the next RC once it's out. |
fd65e67
to
e38d82d
Compare
How I tested: I ran the following two commands at "roughly the same time" and they typically contained the exact same 5 flows (if I ran them "at the same time"). This required building cilium & Hubble-relay from master and installing cilium with those images.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except that copy paste type in the flag help message.
cmd/observe/flows.go
Outdated
@@ -198,6 +198,7 @@ more.`, | |||
selectorFlags := pflag.NewFlagSet("selectors", pflag.ContinueOnError) | |||
selectorFlags.BoolVar(&selectorOpts.all, "all", false, "Get all flows stored in Hubble's buffer") | |||
selectorFlags.Uint64Var(&selectorOpts.last, "last", 0, fmt.Sprintf("Get last N flows stored in Hubble's buffer (default %d)", defaults.FlowPrintCount)) | |||
selectorFlags.Uint64Var(&selectorOpts.first, "first", 0, fmt.Sprintf("Get last N flows stored in Hubble's buffer (default %d)", defaults.FlowPrintCount)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
selectorFlags.Uint64Var(&selectorOpts.first, "first", 0, fmt.Sprintf("Get last N flows stored in Hubble's buffer (default %d)", defaults.FlowPrintCount)) | |
selectorFlags.Uint64Var(&selectorOpts.first, "first", 0, fmt.Sprintf("Get first N flows stored in Hubble's buffer (default %d)", defaults.FlowPrintCount)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof, good catch. I'm embarrassed by that one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
…ents Also updates vendored cilium/cilium to pickup new First field in observer APIs Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
e38d82d
to
8cd73fa
Compare
Depends on cilium/cilium#19819