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 25, 2024
1 parent 909d20d commit b471acf
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 b471acf

Please sign in to comment.