Skip to content

Commit

Permalink
Support allocating Egress IPs from ExternalIPPools
Browse files Browse the repository at this point in the history
If users don't specify EgressIP of an Egress, antrea-controller will
allocate one IP from the specified ExternalIPPool if it's available.

Signed-off-by: Quan Tian <qtian@vmware.com>
  • Loading branch information
tnqn committed Jun 16, 2021
1 parent 5953984 commit f9e95af
Show file tree
Hide file tree
Showing 5 changed files with 1,043 additions and 27 deletions.
3 changes: 2 additions & 1 deletion cmd/antrea-controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ func run(o *Options) error {
cgv1a2Informer := crdInformerFactory.Crd().V1alpha2().ClusterGroups()
cgInformer := crdInformerFactory.Crd().V1alpha3().ClusterGroups()
egressInformer := crdInformerFactory.Crd().V1alpha2().Egresses()
externalIPPoolInformer := crdInformerFactory.Crd().V1alpha2().ExternalIPPools()

clusterIdentityAllocator := clusteridentity.NewClusterIdentityAllocator(
env.GetAntreaNamespace(),
Expand Down Expand Up @@ -226,7 +227,7 @@ func run(o *Options) error {

var egressController *egress.EgressController
if features.DefaultFeatureGate.Enabled(features.Egress) {
egressController = egress.NewEgressController(groupEntityIndex, egressInformer, egressGroupStore)
egressController = egress.NewEgressController(crdClient, groupEntityIndex, egressInformer, externalIPPoolInformer, egressGroupStore)
}

var traceflowController *traceflow.Controller
Expand Down
Loading

0 comments on commit f9e95af

Please sign in to comment.