feat: RunnerSets

RunnerSet is basically ReplicaSet for Runners.

It is responsible for maintaining number of runners to match the desired one. That is, it creates missing runners from `.Spec.Template` and deletes redundant runners.

Similar to ReplicaSet, this does not support rolling update of runners on its own. We might want to later add `RunnerDeployment` for that. But that's another story.
This commit is contained in:
Yusuke Kuoka
2020-02-21 03:01:52 +09:00
parent 7dd3ab43d7
commit d8d829b734
8 changed files with 711 additions and 2 deletions

11
main.go
View File

@@ -110,6 +110,17 @@ func main() {
setupLog.Error(err, "unable to create controller", "controller", "Runner")
os.Exit(1)
}
runnerSetReconciler := &controllers.RunnerSetReconciler{
Client: mgr.GetClient(),
Log: ctrl.Log.WithName("controllers").WithName("RunnerSet"),
Scheme: mgr.GetScheme(),
}
if err = runnerSetReconciler.SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "RunnerSet")
os.Exit(1)
}
// +kubebuilder:scaffold:builder
setupLog.Info("starting manager")