Skip to content

Commit

Permalink
[ctrl] fix disabling vni gen for non spine leaf
Browse files Browse the repository at this point in the history
  • Loading branch information
Frostman committed Dec 14, 2023
1 parent dd44f1a commit 1860dda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ctrl/agent/agent_ctrl.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func (r *AgentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl

vnis := map[string]uint32{}

if r.Cfg.FabricMode == config.FabricModeCollapsedCore {
if r.Cfg.FabricMode == config.FabricModeSpineLeaf {
for _, vpc := range vpcList.Items {
if _, exists := vpcs[vpc.Name]; !exists {
continue
Expand Down
4 changes: 4 additions & 0 deletions pkg/ctrl/vpc/vpc_ctrl.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ func (r *VPCReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.R
}

func (r *VPCReconciler) ensureVNIs(ctx context.Context, vpc *vpcapi.VPC) error {
if r.Cfg.FabricMode != config.FabricModeSpineLeaf {
return nil
}

l := log.FromContext(ctx)

if vpc.Status.VNI == 0 {
Expand Down

0 comments on commit 1860dda

Please sign in to comment.