-
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
Always include Pod labels in FlowAggregator IPFIX template #6418
Always include Pod labels in FlowAggregator IPFIX template #6418
Conversation
We always include the Pod labels IEs (for source and destination Pods), regardless of the value of the recordContents.podLabels configuration parameter. This simplifies the logic and the IPFIXExporter no longer needs to be aware of this configuration. There will be a minor size increase to the IPFIX records exported by the FlowAggregator when recordContents.podLabels is false, as we will need to include empty strings in the records for the 2 IEs. We use an empty string when recordContents.podLabels is false, or when the endpoint is not a Pod. We use an empty JSON dictionary ("{}"), when the Pod has no labels. Fixes antrea-io#6386 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
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
/test-all |
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, just one nit
err := fa.sendFlowKeyRecord(tc.flowKey, tc.flowRecord) | ||
assert.NoError(t, err, "Error in sending flow key record: %v, key: %v, record: %v", err, tc.flowKey, tc.flowRecord) | ||
err := fa.sendFlowKeyRecord(tc.flowKey, flowRecord) | ||
assert.NoError(t, err, "Error in sending flow key record: %v, key: %v, record: %v", err, tc.flowKey, flowRecord) |
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.
assert.NoError(t, err, "Error in sending flow key record: %v, key: %v, record: %v", err, tc.flowKey, flowRecord) | |
assert.NoError(t, err, "Error when sending flow key record: %v, key: %v, record: %v", err, tc.flowKey, flowRecord) |
Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
/test-all |
We always include the Pod labels IEs (for source and destination Pods), regardless of the value of the recordContents.podLabels configuration parameter. This simplifies the logic and the IPFIXExporter no longer needs to be aware of this configuration. There will be a minor size increase to the IPFIX records exported by the FlowAggregator when recordContents.podLabels is false, as we will need to include empty strings in the records for the 2 IEs.
We use an empty string when recordContents.podLabels is false, or when the endpoint is not a Pod. We use an empty JSON dictionary ("{}"), when the Pod has no labels.
Fixes #6386