Skip to content

Commit

Permalink
Fixed windows CNI setup in case cni none is configured
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Bonafiglia <[email protected]>
  • Loading branch information
rbrtbnfgl committed Sep 17, 2024
1 parent 0d05325 commit b8dfafa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/pebinaryexecutor/pebinary.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ func (p *PEBinaryConfig) Bootstrap(ctx context.Context, nodeConfig *config.Node,
return err
}

// required to initialize KubeProxy
p.KubeConfigKubeProxy = nodeConfig.AgentConfig.KubeConfigKubeProxy

switch p.CNIName {
case "", CNICalico:
logrus.Info("Setting up Calico CNI")
Expand All @@ -125,6 +128,7 @@ func (p *PEBinaryConfig) Bootstrap(ctx context.Context, nodeConfig *config.Node,
p.CNIPlugin = &win.Flannel{}
case CNINone:
logrus.Info("Skipping CNI setup")
return nil
default:
logrus.Fatal("Unsupported CNI: ", p.CNIName)
}
Expand All @@ -133,9 +137,6 @@ func (p *PEBinaryConfig) Bootstrap(ctx context.Context, nodeConfig *config.Node,
return err
}

// required to initialize KubeProxy
p.KubeConfigKubeProxy = nodeConfig.AgentConfig.KubeConfigKubeProxy

logrus.Infof("Windows bootstrap okay. Exiting setup.")
return nil
}
Expand Down

0 comments on commit b8dfafa

Please sign in to comment.