Skip to content

Commit

Permalink
reorder peer resource
Browse files Browse the repository at this point in the history
  • Loading branch information
defo89 committed Feb 8, 2024
1 parent 021fe7d commit 0fde901
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/controller/calico/calicobgp_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ func (r *CalicoBgpReconciler) Reconcile(ctx context.Context, req ctrl.Request) (

var bgpPeerDiscovery = new(bgpv1alpha1.BgpPeerDiscovery)
var nsName types.NamespacedName
var calicoBgpPeer v3.BGPPeer

err := r.Get(ctx, req.NamespacedName, bgpPeerDiscovery)
if err != nil {
Expand All @@ -76,6 +75,7 @@ func (r *CalicoBgpReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
}
if len(bgpPeerDiscovery.Status.DiscoveredPeers) > 0 {
for _, v := range bgpPeerDiscovery.Status.DiscoveredPeers {
var calicoBgpPeer v3.BGPPeer
nsName.Name = "bgp-peer-" + req.Name + "-" + v
nsName.Namespace = config.Cfg.Namespace
spec := v3.BGPPeerSpec{
Expand Down

0 comments on commit 0fde901

Please sign in to comment.