Added join step

This commit is contained in:
2026-03-30 17:40:27 +08:00
parent 210fabdcc6
commit 0aa4065c26
7 changed files with 360 additions and 149 deletions

View File

@@ -24,6 +24,7 @@ func NewRegistry(ctx *node.NodeContext) *Registry {
steps: map[string]node.Step{
"AllowSingleNodeScheduling": node.AllowSingleNodeScheduling,
"ApplyLocalNodeMetadataIfPossible": node.ApplyLocalNodeMetadataIfPossible,
"CheckForVersionSkew": node.CheckForVersionSkew,
"CheckUpgradePrereqs": node.CheckUpgradePrereqs,
"ClassifyBootstrapAction": node.ClassifyBootstrapAction,
"ConfigureDNS": node.ConfigureDNS(netCfg),
@@ -32,7 +33,6 @@ func NewRegistry(ctx *node.NodeContext) *Registry {
"ConfigureMgmtInterface": node.ConfigureMgmtInterface(netCfg),
"DetectLocalClusterState": node.DetectLocalClusterState,
"EnsureIPForward": node.EnsureIPForward,
"GenerateKubeadmConfig": node.GenerateKubeadmConfig,
"PrintSummary": node.PrintSummary,
"ReconcileControlPlane": node.ReconcileControlPlane,
"ReconcileNode": node.ReconcileNode,

View File

@@ -86,6 +86,16 @@ func NewRunner(cfg *monov1alpha1.MonoKSConfig) *Runner {
Name: "Classify bootstrap action",
Desc: "Decide whether to init, join, upgrade, or reconcile based on local state and desired version",
},
{
RegKey: "CheckForVersionSkew",
Name: "Check for version skew",
Desc: "Validate wether version satisfy the requirements againts current cluster if any",
},
{
RegKey: "RunKubeadmInit",
Name: "Run kubeadm init",
Desc: "Initialize a new Kubernetes control plane using kubeadm",
},
{
RegKey: "WaitForExistingClusterIfNeeded",
Name: "Wait for existing cluster",
@@ -106,11 +116,6 @@ func NewRunner(cfg *monov1alpha1.MonoKSConfig) *Runner {
Name: "Run kubeadm upgrade apply",
Desc: "Upgrade control plane components using kubeadm",
},
{
RegKey: "RunKubeadmInit",
Name: "Run kubeadm init",
Desc: "Initialize a new Kubernetes control plane using kubeadm",
},
{
RegKey: "RunKubeadmJoin",
Name: "Run kubeadm join",