Skip to content

Commit

Permalink
Support allocating Egress IPs from ExternalIPPools (#2237)
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 <[email protected]>
  • Loading branch information
tnqn committed Jun 24, 2021
1 parent 10ebf3d commit ef14ad1
Show file tree
Hide file tree
Showing 5 changed files with 1,068 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 ef14ad1

Please sign in to comment.