-
Notifications
You must be signed in to change notification settings - Fork 363
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
[IPv6] Support flow exporter #1444
Closed
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
ebe5846
Enable verbose logging through generate-manifest.sh (#1142)
srikartati fa0bf49
Bug in PR#1142 (#1248)
srikartati 2d946bf
[IPv6] Consume Node.Spec.CIDRs to support dual-stack configuration (#…
wenyingd 5be118f
[IPv6] Change openflow pipeline for L2 Pod networking (#1040)
mengdie-song 2430d73
[IPv6] Change host-local IPAM configuration for IPv6 (#1039)
mengdie-song 3d52b88
[IPv6] Use separate fields for IPv4 and IPv6 in GatewayConfig (#1111)
mengdie-song 3888bb4
[IPv6] Implement L3 connectivity for IPv6 traffic (#1011)
wenyingd b4a1742
[IPv6] Handle Spec.PodCIDR with IPv6 CIDR (#1151)
mengdie-song 11d1a49
[IPv6] Add support for IPv6 address in antctl and agent's apiserver (…
wenyingd 6aaafef
[IPv6] Support IPv6 in e2e (#1129)
lzhecheng 2379d4b
[IPv6] Display dual stack NodeSubnet in antrea-octant-plugin (#1156)
mengdie-song 57ff58c
[IPv6] Handle dual stack NodeSubnet for monitoring CRD (#1182)
mengdie-song f193bd7
[IPv6][e2e] Fix testDeletePod (#1193)
lzhecheng c508ede
[IPv6] Collect service CIDR in e2e
lzhecheng aee23d6
[IPv6] Add support for dual-stack when using kube-proxy for Service (…
wenyingd 8f8da4c
[IPv6] Extend e2e tests for dual-stack (#1192)
wenyingd 4431323
[IPv6] E2e bug fixes (#1311)
lzhecheng f560a84
[IPv6] Fix TestReconcileGatewayRoutesOnStartup failure (#1313)
lzhecheng 2ff0937
[IPv6] adjust MTU for IPv6 overhead (#1305)
lzhecheng d498c3f
[IPv6] Fix MTU config (#1317)
lzhecheng bb71b21
[IPv6] Skip IPsec e2e test (#1373)
lzhecheng 7694932
[IPv6] Add 2 Network Policy tests (#1399)
lzhecheng b3aa933
Skip 2 Network Policy testcases before Network Policy IPv6 is support…
lzhecheng 3c3ec42
[IPv6] Fix issues
lzhecheng c03a22f
[IPv6] Support flow exporter
lzhecheng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ package connections | |
|
||
import ( | ||
"fmt" | ||
"net" | ||
"sync" | ||
"time" | ||
|
||
|
@@ -39,16 +40,18 @@ type ConnectionStore struct { | |
connections map[flowexporter.ConnectionKey]flowexporter.Connection | ||
connDumper ConnTrackDumper | ||
ifaceStore interfacestore.InterfaceStore | ||
serviceCIDR *net.IPNet | ||
antreaProxier proxy.Proxier | ||
pollInterval time.Duration | ||
mutex sync.Mutex | ||
} | ||
|
||
func NewConnectionStore(connTrackDumper ConnTrackDumper, ifaceStore interfacestore.InterfaceStore, proxier proxy.Proxier, pollInterval time.Duration) *ConnectionStore { | ||
func NewConnectionStore(connTrackDumper ConnTrackDumper, ifaceStore interfacestore.InterfaceStore, serviceCIDR *net.IPNet, proxier proxy.Proxier, pollInterval time.Duration) *ConnectionStore { | ||
return &ConnectionStore{ | ||
connections: make(map[flowexporter.ConnectionKey]flowexporter.Connection), | ||
connDumper: connTrackDumper, | ||
ifaceStore: ifaceStore, | ||
serviceCIDR: serviceCIDR, | ||
antreaProxier: proxier, | ||
pollInterval: pollInterval, | ||
} | ||
|
@@ -189,7 +192,11 @@ func (cs *ConnectionStore) Poll() (int, error) { | |
// We do not expect any error as resetConn is not returning any error | ||
cs.ForAllConnectionsDo(resetConn) | ||
|
||
filteredConnsList, totalConns, err := cs.connDumper.DumpFlows(openflow.CtZone) | ||
var zone uint16 = openflow.CtZone | ||
if cs.serviceCIDR != nil && cs.serviceCIDR.IP.To4() == nil { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If ConnectionStore.serviceCIDR is used only here, we just need to pass and save a v4 or v6 flag in the ConnectionStore struct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make sense. Updated. |
||
zone = openflow.CtZoneV6 | ||
} | ||
filteredConnsList, totalConns, err := cs.connDumper.DumpFlows(zone) | ||
if err != nil { | ||
return 0, err | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Maybe add a comment in antrea-agent.conf about IPv6 is supported for flowCollectorAddr.
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.
Updated.