Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix lint issue
Signed-off-by: Daniel Fan <[email protected]>
  • Loading branch information
Daniel-Fan committed Aug 26, 2024
commit 2ae7c9d0d8f1effd7de2b90ea6ed86fd77e08e4c
10 changes: 5 additions & 5 deletions controllers/operandrequest/reconcile_operand.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,11 @@ func (r *Reconciler) reconcileCRwithRequest(ctx context.Context, requestInstance
var crFromRequest unstructured.Unstructured

if operand.APIVersion == "" {
return fmt.Errorf("the APIVersion of operand is empty for operator " + operand.Name)
return fmt.Errorf("the APIVersion of operand is empty for operator %s", operand.Name)
}

if operand.Kind == "" {
return fmt.Errorf("the Kind of operand is empty for operator " + operand.Name)
return fmt.Errorf("the Kind of operand is empty for operator %s", operand.Name)
}

var name string
Expand Down Expand Up @@ -509,14 +509,14 @@ func (r *Reconciler) reconcileK8sResourceWithRetries(ctx context.Context, res op

func (r *Reconciler) reconcileK8sResource(ctx context.Context, res operatorv1alpha1.ConfigResource, serviceName, opConfigName, opConfigNs string) error {
if res.APIVersion == "" {
return fmt.Errorf("the APIVersion of k8s resource is empty for operator " + serviceName)
return fmt.Errorf("the APIVersion of k8s resource is empty for operator %s", serviceName)
}

if res.Kind == "" {
return fmt.Errorf("the Kind of k8s resource is empty for operator " + serviceName)
return fmt.Errorf("the Kind of k8s resource is empty for operator %s", serviceName)
}
if res.Name == "" {
return fmt.Errorf("the Name of k8s resource is empty for operator " + serviceName)
return fmt.Errorf("the Name of k8s resource is empty for operator %s", serviceName)
}
var k8sResNs string
if res.Namespace == "" {
Expand Down