Skip to content

Commit

Permalink
chore: unifies receiver names
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszmajsak committed Sep 14, 2023
1 parent 1738790 commit 3069c74
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 22 deletions.
14 changes: 7 additions & 7 deletions components/codeflare/codeflare.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ func (c *CodeFlare) GetComponentName() string {
// Verifies that CodeFlare implements ComponentInterface
var _ components.ComponentInterface = (*CodeFlare)(nil)

func (d *CodeFlare) ReconcileComponent(cli client.Client, owner metav1.Object, dscispec *dsci.DSCInitializationSpec) error {
enabled := d.GetManagementState() == operatorv1.Managed
func (c *CodeFlare) ReconcileComponent(cli client.Client, owner metav1.Object, dscispec *dsci.DSCInitializationSpec) error {
enabled := c.GetManagementState() == operatorv1.Managed

if enabled {
// check if the CodeFlare operator is installed
Expand Down Expand Up @@ -73,7 +73,7 @@ func (d *CodeFlare) ReconcileComponent(cli client.Client, owner metav1.Object, d
}

// Special handling to delete MCAD InstaScale ImageStream resources
if d.GetManagementState() == operatorv1.Removed {
if c.GetManagementState() == operatorv1.Removed {
// Fetch the MCAD resource based on the request
mcad := &codeflarev1alpha1.MCAD{}
err := cli.Get(context.TODO(), client.ObjectKey{
Expand Down Expand Up @@ -112,7 +112,7 @@ func (d *CodeFlare) ReconcileComponent(cli client.Client, owner metav1.Object, d
}

// Deploy Codeflare
err := deploy.DeployManifestsFromPath(owner, cli, d.GetComponentName(),
err := deploy.DeployManifestsFromPath(owner, cli, c.GetComponentName(),
CodeflarePath,
dscispec.ApplicationsNamespace,
cli.Scheme(), enabled)
Expand All @@ -121,7 +121,7 @@ func (d *CodeFlare) ReconcileComponent(cli client.Client, owner metav1.Object, d

}

func (in *CodeFlare) DeepCopyInto(out *CodeFlare) {
*out = *in
out.Component = in.Component
func (c *CodeFlare) DeepCopyInto(target *CodeFlare) {
*target = *c
target.Component = c.Component
}
1 change: 1 addition & 0 deletions components/dashboard/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package dashboard
import (
"fmt"
operatorv1 "github.com/openshift/api/operator/v1"
"github.com/pkg/errors"

"context"
"strings"
Expand Down
6 changes: 3 additions & 3 deletions components/datasciencepipelines/datasciencepipelines.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (d *DataSciencePipelines) ReconcileComponent(cli client.Client, owner metav
return err
}

func (in *DataSciencePipelines) DeepCopyInto(out *DataSciencePipelines) {
*out = *in
out.Component = in.Component
func (d *DataSciencePipelines) DeepCopyInto(target *DataSciencePipelines) {
*target = *d
target.Component = d.Component
}
6 changes: 3 additions & 3 deletions components/kserve/kserve.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (k *Kserve) ReconcileComponent(cli client.Client, owner metav1.Object, dsci
return nil
}

func (in *Kserve) DeepCopyInto(out *Kserve) {
*out = *in
out.Component = in.Component
func (k *Kserve) DeepCopyInto(target *Kserve) {
*target = *k
target.Component = k.Component
}
6 changes: 3 additions & 3 deletions components/modelmeshserving/modelmeshserving.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (m *ModelMeshServing) ReconcileComponent(cli client.Client, owner metav1.Ob
return err
}

func (in *ModelMeshServing) DeepCopyInto(out *ModelMeshServing) {
*out = *in
out.Component = in.Component
func (m *ModelMeshServing) DeepCopyInto(target *ModelMeshServing) {
*target = *m
target.Component = m.Component
}
6 changes: 3 additions & 3 deletions components/ray/ray.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (r *Ray) ReconcileComponent(cli client.Client, owner metav1.Object, dscispe

}

func (in *Ray) DeepCopyInto(out *Ray) {
*out = *in
out.Component = in.Component
func (r *Ray) DeepCopyInto(target *Ray) {
*target = *r
target.Component = r.Component
}
6 changes: 3 additions & 3 deletions components/workbenches/workbenches.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (w *Workbenches) ReconcileComponent(cli client.Client, owner metav1.Object,

}

func (in *Workbenches) DeepCopyInto(out *Workbenches) {
*out = *in
out.Component = in.Component
func (w *Workbenches) DeepCopyInto(target *Workbenches) {
*target = *w
target.Component = w.Component
}

0 comments on commit 3069c74

Please sign in to comment.