Skip to content

Commit

Permalink
chore: removes unused client parameter (opendatahub-io#1073)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2993707)
  • Loading branch information
bartoszmajsak authored and VaishnaviHire committed Jul 24, 2024
1 parent 3c1d676 commit 9844c93
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/kserve/kserve.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (k *Kserve) ReconcileComponent(ctx context.Context, cli client.Client,
}
} else {
// Configure dependencies
if err := k.configureServerless(cli, dscispec); err != nil {
if err := k.configureServerless(dscispec); err != nil {
return err
}
if k.DevFlags != nil {
Expand Down
2 changes: 1 addition & 1 deletion components/kserve/kserve_config_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (k *Kserve) setDefaultDeploymentMode(ctx context.Context, cli client.Client
return nil
}

func (k *Kserve) configureServerless(cli client.Client, instance *dsciv1.DSCInitializationSpec) error {
func (k *Kserve) configureServerless(instance *dsciv1.DSCInitializationSpec) error {
switch k.Serving.ManagementState {
case operatorv1.Unmanaged: // Bring your own CR
fmt.Println("Serverless CR is not configured by the operator, we won't do anything")
Expand Down
6 changes: 3 additions & 3 deletions components/kserve/servicemesh_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ import (
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/feature/servicemesh"
)

func (k *Kserve) configureServiceMesh(c client.Client, dscispec *dsciv1.DSCInitializationSpec) error {
func (k *Kserve) configureServiceMesh(cli client.Client, dscispec *dsciv1.DSCInitializationSpec) error {
if dscispec.ServiceMesh != nil {
if dscispec.ServiceMesh.ManagementState == operatorv1.Managed && k.GetManagementState() == operatorv1.Managed {
serviceMeshInitializer := feature.ComponentFeaturesHandler(k.GetComponentName(), dscispec, k.defineServiceMeshFeatures(c))
serviceMeshInitializer := feature.ComponentFeaturesHandler(k.GetComponentName(), dscispec, k.defineServiceMeshFeatures(cli))
return serviceMeshInitializer.Apply()
}
if dscispec.ServiceMesh.ManagementState == operatorv1.Unmanaged && k.GetManagementState() == operatorv1.Managed {
return nil
}
}

return k.removeServiceMeshConfigurations(c, dscispec)
return k.removeServiceMeshConfigurations(cli, dscispec)
}

func (k *Kserve) removeServiceMeshConfigurations(cli client.Client, dscispec *dsciv1.DSCInitializationSpec) error {
Expand Down

0 comments on commit 9844c93

Please sign in to comment.