Skip to content

Commit

Permalink
Update services.go to address nil pointer bug and also do not enable …
Browse files Browse the repository at this point in the history
…inference deployment automatically
  • Loading branch information
AmartC committed Nov 28, 2022
1 parent 8660527 commit 20d11f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/resources/opnicluster/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ func deploymentState(enabled *bool) reconciler.DesiredState {
}

func deploymentStateDisabled(enabled *bool) reconciler.DesiredState {
if enabled != nil || *enabled {
if lo.FromPtrOr(enabled, false) {
return reconciler.StatePresent
}
return reconciler.StateAbsent
Expand Down Expand Up @@ -733,7 +733,7 @@ func (r *Reconciler) inferenceDeployment() (runtime.Object, reconciler.DesiredSt
})

insertHyperparametersVolume(deployment, "nulog")
return deployment, deploymentState(r.spec.Services.Inference.Enabled), nil
return deployment, deploymentStateDisabled(r.spec.Services.Inference.Enabled), nil
}

func (r *Reconciler) drainDeployment() (runtime.Object, reconciler.DesiredState, error) {
Expand Down

0 comments on commit 20d11f5

Please sign in to comment.