Skip to content

Commit

Permalink
feat(finetune-experiment-controller): add finetune-controller
Browse files Browse the repository at this point in the history
1. add finetune-controller code to this resp
  • Loading branch information
lvyanru8200 committed Jan 23, 2024
1 parent 0f74971 commit 0a6eb84
Show file tree
Hide file tree
Showing 16 changed files with 3,138 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cmd/controller-manager/app/controller_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/client-go/kubernetes"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
_ "k8s.io/client-go/plugin/pkg/client/auth"
ctrl "sigs.k8s.io/controller-runtime"
Expand Down Expand Up @@ -149,6 +150,16 @@ func NewControllerManager() (manager.Manager, error) {
logging.ZLogger.Errorf("Unable to create FinetuneJob controller, %v", err)
return nil, err
}
if err = (&finetune.FinetuneReconciler{
Log: logging.ZLogger,
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Clientset: kubernetes.NewForConfigOrDie(ctrl.GetConfigOrDie()),
Config: ctrl.GetConfigOrDie(),
}).SetupWithManager(mgr); err != nil {
logging.ZLogger.Errorf("Unable to create Finetune controller, %v", err)
return nil, err
}
//+kubebuilder:scaffold:builder

if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
Expand Down
Loading

0 comments on commit 0a6eb84

Please sign in to comment.