Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[SDN-1364] Add Network Policy audit logging Enhancement #617
[SDN-1364] Add Network Policy audit logging Enhancement #617
Changes from 1 commit
db5e983
764870b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
For user to be able to make sense of this, the source/destination podname and namespace would need to also be included, otherwise they'll need to manually resolve the IP which is potentially valid for a short period of time, which IMO would limit the usefulness of this feature.
As a user I'd like to see something like: "NetworkPolicy namespace1/X is dropping icmp/8 traffic from namespace2/mypod-abcdef"
Why? If NetworkPolicies are dropping traffic it probably means my app is probably broken in some way, but that might be non-obvious. May help with #613
I think it should work in a similar way to pod events, eg. when waiting for PVC's to become available - it'll only log a message every ~minute and the Kubernetes will fold these into a single message and say it's been repeated n times.
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.
Hey @jackevans43 Thanks for the review! I completely agree with you on this, however I think it may be out of the scope of the enhancement since it would require quite a bit more infrastructure to resolve the IPs to pod names and ACLs directly to Network Policies, Etc. I fully expect there to be follow up epics regarding network policy observability based on the overall observability epic spearheaded by @russellb
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 totally agree with the improvement, and that it'd be a future step. I think it would be good to document this somewhere as one of the next steps with this feature. Maybe we could have a "future work" section if there's not already something like that in the template. I would also add integration with the OpenShift console in that "future work" section.
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.
We should try and generate an IP audit log in ovn-kube master, since we control IPAM there.
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.
That's a good idea. It's probably already in the northd log, but of course that's not persisted (unless you use cluster logging)