Skip to content
Merged
Show file tree
Hide file tree
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
Next Next commit
fix lint issues
Signed-off-by: Daniel Fan <[email protected]>
  • Loading branch information
Daniel-Fan committed Aug 26, 2024
commit ae58ff35f95149f8e8dcc48d9f3b3aaebeab8216
2 changes: 1 addition & 1 deletion controllers/operandregistry/operandregistry_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Re
}

// Summarize instance status
if instance.Status.OperatorsStatus == nil || len(instance.Status.OperatorsStatus) == 0 {
if len(instance.Status.OperatorsStatus) == 0 {
instance.UpdateRegistryPhase(operatorv1alpha1.RegistryReady)
} else {
instance.UpdateRegistryPhase(operatorv1alpha1.RegistryRunning)
Expand Down
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 " + 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 " + 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 " + 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 " + 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 " + serviceName)
}
var k8sResNs string
if res.Namespace == "" {
Expand Down