-
Notifications
You must be signed in to change notification settings - Fork 244
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
compact: Add traffic direction to policy verdict events #759
Conversation
pkg/printer/printer.go
Outdated
api.PolicyMatchType(f.GetPolicyMatchType()).String() + " " + | ||
f.GetTrafficDirection().String() | ||
|
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.
There are no cases when this is empty, right?
Also, minor nit comment: fmt.Sprintf
would maybe be easier to read here
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.
yeah i think it is always set to either ingress or egress. i'll change the code to use Sprintf instead 👍
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.
It's either INGRESS
, EGRESS
or TRAFFIC_DIRECTION_UNKNOWN
if unset (see here). The latter is rather verbose but I don't think it's expected to ever show up.
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.
TRAFFIC_DIRECTION_UNKNOWN
can be set for non-policy-verdict flows. But yes, for policy verdict it should always be set to EGRESS or INGRESS.
Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
ee99f35
to
4bf99a8
Compare
Signed-off-by: Michi Mutsuzaki michi@isovalent.com