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 observe]: Add http header filter #1277
Conversation
3bfc583
to
4f15151
Compare
|
@ChrsMark Do you need help with this work? |
|
Hey @rolinh , I just wait for a pre-lease version of cilium so as to update the dependency and be able to use the types introduced with cilium/cilium#28851. |
|
Ah, I see. It's actually fine to upgrade the Cilium dep to whatever is |
4f15151
to
c63cc36
Compare
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.
The CI failure looks legit - TestTestHubbleObserve is failing due to different ordering of CLI args.
bfed0ca
to
3e67bff
Compare
cmd/observe/flows_filter.go
Outdated
| hVal := h[len(h)-1] | ||
| key := strings.Join(h[:len(h)-1], ":") |
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.
I think this should be the other way around. Everything before the first colon is the key and everything after is the value. I think strings.SplitN as mentioned by Anna would work as intended here. Another easier option might be strings.Cut:
key, hVal, _ := strings.Cut(h, ":")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.
Got it! I doubled checked and only the values can contain :. Changed that.
3e67bff
to
b7a861a
Compare
b7a861a
to
b58abab
Compare
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.
Looks good to me, thanks for updates.
One detail: I would split the Cilium update into a separate commit.
b58abab
to
b06a9ff
Compare
|
That vendor update related CI failure looks weird to me 🤔 : https://github.com/cilium/hubble/actions/runs/7049712881/job/19188814888?pr=1277#step:9:71 Is this sth that we should double check? |
This is an issue that was recently fixed upstream (ref. cilium/cilium#29481). Could you please update the vendored cilium version to latest |
f37b3a2
to
cf4b8c6
Compare
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
|
Thank's @tklauser, it should be fine now :) |
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.
Thanks @ChrsMark!
We are adding support for filtering on HTTP headers in cilium/cilium#28851. This PR adds this feature in the CLI by adding a new flag
--http-headerFixes: #776
How to test this manually
See cilium/cilium#28851