-
Notifications
You must be signed in to change notification settings - Fork 373
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
Decouple Audit logging from AntreaPolicy feature gate #5352
Conversation
MaxSize: int(o.config.AuditLogging.MaxSize), | ||
MaxBackups: int(*o.config.AuditLogging.MaxBackups), | ||
MaxAge: int(*o.config.AuditLogging.MaxAge), | ||
Compress: *o.config.AuditLogging.Compress, |
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 defaulting code in cmd/antrea-agent/options.go should be updated. Otherwise antrea-agent would panic when AntreaPolicy is disabled.
Better to test it once in case there are other issues preventing K8s policy logging from working when AntreaPolicy is disabled.
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 and tested with AntreaPolicy disabled.
f256b21
to
d510190
Compare
pkg/agent/openflow/framework.go
Outdated
@@ -152,6 +152,10 @@ func newTable(tableName string, stage binding.StageID, pipeline binding.Pipeline | |||
return table | |||
} | |||
|
|||
func (t *Table) GetStatus() bool { |
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.
perhaps name it IsInitialized
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.
Done, probably could wait until 5369 is merged.
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, but perhaps it should wait for #5369 and then resolve conflicts
#5369 has been merged, can you rebase? |
Currently Audit logging is controlled by AntreaPolicy feature gate, but it also logs K8s NetworkPolicies. This solution decouples Audit logging with the AntreaPolicy feature gate and renames the related objects. Fixes antrea-io#5340 Signed-off-by: Qiyue Yao <yaoq@vmware.com>
0d3e4d6
to
715d757
Compare
/test-all |
Currently Audit logging is controlled by AntreaPolicy feature gate, but it also logs K8s NetworkPolicies.
This solution decouples Audit logging with the AntreaPolicy feature gate and renames the related objects.
Fixes #5340