kmesh-net / kmesh-net/kmesh

Improve CNI installer

Open
#730 1 comment 0 reactions 0 assignees View on GitHub
kind/enhancement
Dominant language
Go
Stars
757
Forks
276
Avg merge
5d 20h
Merged PRs (30d)
2

Description

**What would you like to be added**:

Currently cni installer is within the kmesh daemon, however when the daemon panic unexpected, the cni does not have a chance to uninstall all the cni configs.

If the kubeconfig kmesh-cni using is not out of date, then after kmesh-daemon updated, it can start up successfully.
However if the kubeconfig's token is out dated, the the above procedure would fail.

Several solutions come up to my mind:

1. Do clean up the cni config at the end of https://github.com/kmesh-net/kmesh/blob/main/build/docker/start_kmesh.sh#L54
2. Add a go routine in cni installer, watch the token file, update the kubeconfig when token modified. This would make sure the kubeconfig can not expire easily.
3. Make kmesh-cni `CmdAdd` never fail, even it failed, we return success. And depend on manage controller to manage workload eventually.

**Why is this needed**:

Contributor guide

Open the contributing guide

Research direction

Read build/docker/start_kmesh.sh at line 54 and locate the CNI installer and kmesh-cni CmdAdd path. Compare the three proposed approaches around daemon panic cleanup, kubeconfig token refresh, and CmdAdd failure handling; clarify which behavior is intended and define completion checks for that choice.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, shell
Domain
infrastructure, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.