Some basic agent startup

This commit is contained in:
2026-03-30 21:50:04 +08:00
parent fcf7371e9e
commit bdbc29649c
11 changed files with 98 additions and 48 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"k8s.io/klog/v2"
monov1alpha1 "undecided.project/monok8s/pkg/apis/monok8s/v1alpha1"
"undecided.project/monok8s/pkg/node"
"undecided.project/monok8s/pkg/system"
@@ -131,6 +132,11 @@ func NewRunner(cfg *monov1alpha1.MonoKSConfig) *Runner {
Name: "Apply node metadata",
Desc: "Apply labels/annotations to the local node if API server is reachable",
},
{
RegKey: "StartControlAgent",
Name: "Starts the Control Agent",
Desc: "Handles OSUpgrade resources polling",
},
},
}
}
@@ -153,6 +159,7 @@ func (r *Runner) Init(ctx context.Context) error {
return fmt.Errorf("step %d (%s): %w", i+1, step.Name, err)
}
}
klog.Info("All steps completed successfully")
return nil
}