diff --git a/components/codeflare/codeflare.go b/components/codeflare/codeflare.go index 7b3d0776250..cc4719764ea 100644 --- a/components/codeflare/codeflare.go +++ b/components/codeflare/codeflare.go @@ -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 @@ -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{ @@ -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) @@ -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 } diff --git a/components/dashboard/dashboard.go b/components/dashboard/dashboard.go index fef7e13c088..ccabcc78016 100644 --- a/components/dashboard/dashboard.go +++ b/components/dashboard/dashboard.go @@ -4,6 +4,7 @@ package dashboard import ( "fmt" operatorv1 "github.com/openshift/api/operator/v1" + "github.com/pkg/errors" "context" "strings" diff --git a/components/datasciencepipelines/datasciencepipelines.go b/components/datasciencepipelines/datasciencepipelines.go index b6c5efbc47c..3b7a735ec2f 100644 --- a/components/datasciencepipelines/datasciencepipelines.go +++ b/components/datasciencepipelines/datasciencepipelines.go @@ -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 } diff --git a/components/kserve/kserve.go b/components/kserve/kserve.go index b88af41b718..c804c1e4625 100644 --- a/components/kserve/kserve.go +++ b/components/kserve/kserve.go @@ -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 } diff --git a/components/modelmeshserving/modelmeshserving.go b/components/modelmeshserving/modelmeshserving.go index f4a3609091d..c63b92aa7d4 100644 --- a/components/modelmeshserving/modelmeshserving.go +++ b/components/modelmeshserving/modelmeshserving.go @@ -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 } diff --git a/components/ray/ray.go b/components/ray/ray.go index ab60f1423cb..5e6ccc79dbf 100644 --- a/components/ray/ray.go +++ b/components/ray/ray.go @@ -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 } diff --git a/components/workbenches/workbenches.go b/components/workbenches/workbenches.go index 8def7be1c49..a7715b2b3ec 100644 --- a/components/workbenches/workbenches.go +++ b/components/workbenches/workbenches.go @@ -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 }