Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix panic error from windows agent if no cni is deployed. #6768

Closed
wants to merge 10 commits into from
1 change: 0 additions & 1 deletion charts/chart_versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ charts:
- version: v4.1.001
filename: /charts/rke2-multus.yaml
bootstrap: true
- version: v0.25.601
filename: /charts/rke2-flannel.yaml
bootstrap: true
- version: 1.9.000
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ replace (
k8s.io/kubectl => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.31.0-k3s3
k8s.io/kubelet => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.31.0-k3s3
k8s.io/kubernetes => github.com/k3s-io/kubernetes v1.31.0-k3s3

k8s.io/legacy-cloud-providers => github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.30.4-k3s1 // upstream stopped producing tags
k8s.io/metrics => github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.31.0-k3s3
k8s.io/mount-utils => github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.31.0-k3s3
k8s.io/node-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/node-api v1.31.0-k3s3
Expand Down
6 changes: 4 additions & 2 deletions pkg/pebinaryexecutor/pebinary.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ func (p *PEBinaryConfig) Bootstrap(ctx context.Context, nodeConfig *config.Node,
logrus.Fatal("Unsupported CNI: ", p.CNIName)
}

if err := p.CNIPlugin.Setup(ctx, nodeConfig, restConfig, p.DataDir); err != nil {
return err
if p.CNIPlugin != nil {
if err := p.CNIPlugin.Setup(ctx, nodeConfig, restConfig, p.DataDir); err != nil {
return err
}
}

// required to initialize KubeProxy
Expand Down