@@ -59,30 +59,28 @@ const NIMServiceFinalizer = "finalizer.nimservice.apps.nvidia.com"
5959// NIMServiceReconciler reconciles a NIMService object.
6060type NIMServiceReconciler struct {
6161 client.Client
62- scheme * runtime.Scheme
63- log logr.Logger
64- updater conditions.Updater
65- discoveryClient discovery.DiscoveryInterface
66- renderer render.Renderer
67- Config * rest.Config
68- InferencePlatformFactory * platform.Factory
69- orchestratorType k8sutil.OrchestratorType
70- recorder record.EventRecorder
62+ scheme * runtime.Scheme
63+ log logr.Logger
64+ updater conditions.Updater
65+ discoveryClient discovery.DiscoveryInterface
66+ renderer render.Renderer
67+ Config * rest.Config
68+ orchestratorType k8sutil.OrchestratorType
69+ recorder record.EventRecorder
7170}
7271
7372// Ensure NIMServiceReconciler implements the Reconciler interface.
7473var _ shared.Reconciler = & NIMServiceReconciler {}
7574
7675// NewNIMServiceReconciler creates a new reconciler for NIMService with the given platform factory.
77- func NewNIMServiceReconciler (client client.Client , scheme * runtime.Scheme , updater conditions.Updater , discoveryClient discovery.DiscoveryInterface , renderer render.Renderer , log logr.Logger , platformFactory * platform. Factory ) * NIMServiceReconciler {
76+ func NewNIMServiceReconciler (client client.Client , scheme * runtime.Scheme , updater conditions.Updater , discoveryClient discovery.DiscoveryInterface , renderer render.Renderer , log logr.Logger ) * NIMServiceReconciler {
7877 return & NIMServiceReconciler {
79- Client : client ,
80- scheme : scheme ,
81- updater : updater ,
82- discoveryClient : discoveryClient ,
83- renderer : renderer ,
84- log : log ,
85- InferencePlatformFactory : platformFactory ,
78+ Client : client ,
79+ scheme : scheme ,
80+ updater : updater ,
81+ discoveryClient : discoveryClient ,
82+ renderer : renderer ,
83+ log : log ,
8684 }
8785}
8886
@@ -134,7 +132,7 @@ func (r *NIMServiceReconciler) Reconcile(ctx context.Context, req ctrl.Request)
134132 logger .Info ("Reconciling" , "NIMService" , nimService .Name )
135133
136134 // Get platform implementation based on NIMService's platform field
137- platformImpl , err := r . InferencePlatformFactory .GetInferencePlatform (nimService .Spec .InferencePlatform )
135+ platformImpl , err := platform .GetInferencePlatform (nimService .Spec .InferencePlatform )
138136 if err != nil {
139137 logger .Error (err , "failed to get platform implementation" , "platform" , nimService .Spec .InferencePlatform )
140138 return ctrl.Result {}, err
0 commit comments