-
Notifications
You must be signed in to change notification settings - Fork 377
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
Improve handling of config changes in FlowAggregator #6378
Improve handling of config changes in FlowAggregator #6378
Conversation
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
klog.InfoS("Updated RecordContents.PodLabels configuration", "value", fa.includePodLabels) | ||
} | ||
var unsupportedUpdates []string | ||
if opt.Config.APIServer != fa.APIServer { |
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 golang can check the contents in the struct (we only have int and string in APIServer)?
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, one typo
@@ -440,6 +441,35 @@ func TestFlowAggregator_updateFlowAggregator(t *testing.T) { | |||
mockLogExporter.EXPECT().UpdateOptions(opt) | |||
flowAggregator.updateFlowAggregator(opt) | |||
}) | |||
t.Run("includePodLables", func(t *testing.T) { |
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.
t.Run("includePodLables", func(t *testing.T) { | |
t.Run("includePodLabels", func(t *testing.T) { |
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
Prior to this change, only updates to the configuration of exporters (sinks) were handled gracefully, without requiring a FlowAggregator restart. After this change, we also support updating recordContents.podLabels at runtime. For all other unsupported config changes, we print an error log, asking users to restart the FlowAggregator. Signed-off-by: Antonin Bas <[email protected]>
30c98b0
to
f24fea7
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.
LGTM
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
This is a partial revert of antrea-io#6378. We cannot easily support live updates to recordContents.podLabels, as it requires re-creating the IPFIXExporter, so that a new IPFIX template set can be sent. Signed-off-by: Antonin Bas <[email protected]>
Prior to this change, only updates to the configuration of exporters (sinks) were handled gracefully, without requiring a FlowAggregator restart.
After this change, we also support updating recordContents.podLabels at runtime.
For all other unsupported config changes, we print an error log, asking users to restart the FlowAggregator.