[WIP] Feat/label driven yurtnode conversion#2533
[WIP] Feat/label driven yurtnode conversion#2533Vacant-lot07734 wants to merge 19 commits intoopenyurtio:masterfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2533 +/- ##
==========================================
+ Coverage 43.95% 45.24% +1.28%
==========================================
Files 400 404 +4
Lines 26541 27413 +872
==========================================
+ Hits 11666 12402 +736
- Misses 13809 13850 +41
- Partials 1066 1161 +95
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| if o.ConcurrentYurtNodeConversionWorkers <= 0 { | ||
| errs = append(errs, fmt.Errorf("concurrent-yurtnodeconversion-workers(%d) is invalid, should greater than 0", o.ConcurrentYurtNodeConversionWorkers)) | ||
| } | ||
| if len(o.YurthubBinaryURL) == 0 && len(o.YurthubVersion) == 0 { |
There was a problem hiding this comment.
Can YurthubBinaryURL and YurthubVersion be configured simultaneously?
pkg/node-servant/convert/options.go
Outdated
| kubeadmConfPaths: strings.Join(components.GetDefaultKubeadmConfPath(), ","), | ||
| openyurtDir: constants.OpenyurtDir, | ||
| kubeadmConfPaths: strings.Join(components.GetDefaultKubeadmConfPath(), ","), | ||
| namespace: constants.YurthubNamespace, |
There was a problem hiding this comment.
What is the purpose of a namespace?
pkg/node-servant/job.go
Outdated
| "convert", | ||
| fmt.Sprintf("--%s=%s", constants.NodeName, nodeName), | ||
| fmt.Sprintf("--%s=%s", constants.Namespace, valueOrDefault(tmplCtx["namespace"], DefaultConversionJobNamespace)), | ||
| fmt.Sprintf("--%s=%s", workingModeFlag, valueOrDefault(tmplCtx["workingMode"], defaultWorkingMode)), |
There was a problem hiding this comment.
Does it still support working mode?
| "k8s.io/klog/v2" | ||
| "sigs.k8s.io/controller-runtime/pkg/client" | ||
| ) | ||
|
|
There was a problem hiding this comment.
You can directly use crictl to delete the containers on the node.
| // for inspection instead of recreating the Job indefinitely | ||
| if isJobFailed(job) { | ||
| klog.Info(Format("node(%s) observed failed %s job %s", node.Name, currentJobAction, job.Name)) | ||
| if err := r.ensureNodeUnschedulable(ctx, node.Name, false); err != nil { |
There was a problem hiding this comment.
This needs to be considered: after a failure, scheduling may not still be possible.
df0fe21 to
d19f131
Compare
…r yurthub systemd deployment
…ersion and revert
…hub conversion and revert" This reverts commit 94cef5a.
… yurthub lifecycle
…ct is-edge-worker label
cab2339 to
12d4cdb
Compare
|



What type of PR is this?
What this PR does / why we need it:
#2530
This is still a draft PR. It already contains the main production changes for the new label-driven YurtHub conversion flow, while the e2e migration is still in progress in the same PR.
This PR currently covers seven key parts:
node-servant convert/revertfrom the old static-pod-based path to the newsystemd + host binarypath.node-servantJob contract so that convert and revert can be driven by the controller through one unified Job model.YurtNodeConversionControllertoyurt-managerto watch Node label changes and conversion Jobs, then orchestrate convert/revert rounds.openyurt.io/is-edge-workeras a controller-managed label and only allowapps.openyurt.io/nodepoolto be added or removed, not modified in place.Special notes for your reviewer:
Does this PR introduce a user-facing change?
other Note