Skip to content

Commit

Permalink
Use global clusterset IP enabled flag on join
Browse files Browse the repository at this point in the history
Use the enabled flag return from clustersetip.AllocateCIDRFromConfigMap
to set the Submariner.ClustersetIPEnabled flag.

Signed-off-by: Tom Pantelis <[email protected]>
  • Loading branch information
tpantelis committed Sep 30, 2024
1 parent 3c28b2e commit 9be1523
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/submariner-io/lighthouse v0.19.0-m3.0.20240925124717-3989a7b0bc55
github.com/submariner-io/shipyard v0.19.0-m3
github.com/submariner-io/submariner v0.19.0-m3.0.20240917155703-5a6c358065a2
github.com/submariner-io/submariner-operator v0.19.0-m3.0.20240923150922-268a9960c6b7
github.com/submariner-io/submariner-operator v0.19.0-m3.0.20240930101644-70b24123471c
github.com/uw-labs/lichen v0.1.7
golang.org/x/net v0.29.0
golang.org/x/oauth2 v0.23.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,8 @@ github.com/submariner-io/shipyard v0.19.0-m3 h1:NliwAktRPF4OsLj1TDgpaOJD/bmmZW/F
github.com/submariner-io/shipyard v0.19.0-m3/go.mod h1:BY1ceSnPz1/hN5F9uljcSzy5n5qgAOENsIvZpJ+XPOU=
github.com/submariner-io/submariner v0.19.0-m3.0.20240917155703-5a6c358065a2 h1:SffTAy7zUR6fOr41EIGccVZHRNuExA78b7lLr84qizg=
github.com/submariner-io/submariner v0.19.0-m3.0.20240917155703-5a6c358065a2/go.mod h1:hKbs5L9QPDslJ6n4k3fsPRbr7JbpT5AVr58YgWQQCKQ=
github.com/submariner-io/submariner-operator v0.19.0-m3.0.20240923150922-268a9960c6b7 h1:grcgOt7T/fStYdOOK/E+cmAm/dm59KNxOm5kc0fpYrQ=
github.com/submariner-io/submariner-operator v0.19.0-m3.0.20240923150922-268a9960c6b7/go.mod h1:OAbOn8vkkVtrGKTQ92aT7HNtAxCH5wHhPjb2t/8qKVM=
github.com/submariner-io/submariner-operator v0.19.0-m3.0.20240930101644-70b24123471c h1:KDAbom91VmgVKYJM8OiTl9aKXxaDFqx5SkPIkZUZ3VI=
github.com/submariner-io/submariner-operator v0.19.0-m3.0.20240930101644-70b24123471c/go.mod h1:OAbOn8vkkVtrGKTQ92aT7HNtAxCH5wHhPjb2t/8qKVM=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
Expand Down
6 changes: 5 additions & 1 deletion pkg/join/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,15 @@ func ClusterToBroker(ctx context.Context, brokerInfo *broker.Info, options *Opti
}

if brokerInfo.IsServiceDiscoveryEnabled() {
err = clustersetip.AllocateCIDRFromConfigMap(ctx, brokerClientProducer.ForGeneral(), brokerNamespace,
enabled, err := clustersetip.AllocateCIDRFromConfigMap(ctx, brokerClientProducer.ForGeneral(), brokerNamespace,
&clustersetConfig, status)
if err != nil {
return errors.Wrap(err, "unable to determine the clusterset IP CIDR")
}

if enabled {
options.EnableClustersetIP = enabled
}
}

status.Start("Deploying the Submariner operator")
Expand Down

0 comments on commit 9be1523

Please sign in to comment.