Skip to content

Commit

Permalink
modify CreateDeploymentWithTemplate function in objectsearch and feat…
Browse files Browse the repository at this point in the history
…ureextraction for gm to build

Signed-off-by: SherlockShemol <[email protected]>
  • Loading branch information
SherlockShemol committed Oct 19, 2024
1 parent bd6e744 commit e225c3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (c *Controller) addDeployment(obj interface{}) {
c.enqueueByDeployment(deployment)
}

//deleteDeployment enqueues the FeatureExtractionService obj When a deleteDeployment is deleted
// deleteDeployment enqueues the FeatureExtractionService obj When a deleteDeployment is deleted
func (c *Controller) deleteDeployment(obj interface{}) {
deployment, ok := obj.(*appsv1.Deployment)

Expand Down Expand Up @@ -513,7 +513,7 @@ func (c *Controller) createFeatureExtractionWorker(service *sednav1.FeatureExtra
}

// Create FE deployment AND related pods (as part of the deployment creation)
_, err = runtime.CreateDeploymentWithTemplate(c.kubeClient, service, &service.Spec.DeploymentSpec, &workerParam, FEPort)
_, err = runtime.CreateDeploymentWithTemplate(c.kubeClient, service, &service.Spec.DeploymentSpec, &workerParam)
if err != nil {
return fmt.Errorf("failed to create feature extraction deployment: %w", err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ func (c *Controller) createWorkers(service *sednav1.ObjectSearchService) (active
// create reid worker deployment
var reidWorkerParam runtime.WorkerParam
reidWorkerParam.WorkerType = objectSearchReidWorker
_, err = runtime.CreateDeploymentWithTemplate(c.kubeClient, service, &service.Spec.ReidWorkers.DeploymentSpec, &reidWorkerParam, reidServicePort)
_, err = runtime.CreateDeploymentWithTemplate(c.kubeClient, service, &service.Spec.ReidWorkers.DeploymentSpec, &reidWorkerParam)
if err != nil {
return activePods, activeDeployments, fmt.Errorf("failed to create reid worker deployment: %w", err)
}
Expand All @@ -528,7 +528,7 @@ func (c *Controller) createWorkers(service *sednav1.ObjectSearchService) (active
"SERVICE_NAME": service.Name,
"WORKER_NAME": "userworker-" + utilrand.String(5),
}
_, err = runtime.CreateDeploymentWithTemplate(c.kubeClient, service, userWorkerDeployment, &userWorkerParam, userWorkerPort)
_, err = runtime.CreateDeploymentWithTemplate(c.kubeClient, service, userWorkerDeployment, &userWorkerParam)

if err != nil {
return activePods, activeDeployments, fmt.Errorf("failed to create user worker: %w", err)
Expand Down

0 comments on commit e225c3f

Please sign in to comment.