Skip to content

Commit

Permalink
Merge pull request #500 from stuggi/check_err
Browse files Browse the repository at this point in the history
Do not ignore err on GetSecret()
  • Loading branch information
openshift-merge-bot[bot] authored Oct 9, 2024
2 parents a9bf21a + b392b0a commit 0fd60c8
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions controllers/ceilometer_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,15 @@ func (r *CeilometerReconciler) generateServiceConfig(
return err
}

transportURLSecret, _, _ := secret.GetSecret(ctx, h, instance.CeilometerStatus.TransportURLSecret, instance.Namespace)
ceilometerPasswordSecret, _, _ := secret.GetSecret(ctx, h, instance.Spec.Secret, instance.Namespace)
transportURLSecret, _, err := secret.GetSecret(ctx, h, instance.CeilometerStatus.TransportURLSecret, instance.Namespace)
if err != nil {
return err
}

ceilometerPasswordSecret, _, err := secret.GetSecret(ctx, h, instance.Spec.Secret, instance.Namespace)
if err != nil {
return err
}

templateParameters := map[string]interface{}{
"KeystoneInternalURL": keystoneInternalURL,
Expand Down Expand Up @@ -891,8 +898,15 @@ func (r *CeilometerReconciler) generateComputeServiceConfig(
return err
}

transportURLSecret, _, _ := secret.GetSecret(ctx, h, instance.CeilometerStatus.TransportURLSecret, instance.Namespace)
ceilometerPasswordSecret, _, _ := secret.GetSecret(ctx, h, instance.Spec.Secret, instance.Namespace)
transportURLSecret, _, err := secret.GetSecret(ctx, h, instance.CeilometerStatus.TransportURLSecret, instance.Namespace)
if err != nil {
return err
}

ceilometerPasswordSecret, _, err := secret.GetSecret(ctx, h, instance.Spec.Secret, instance.Namespace)
if err != nil {
return err
}

templateParameters := map[string]interface{}{
"KeystoneInternalURL": keystoneInternalURL,
Expand Down

0 comments on commit 0fd60c8

Please sign in to comment.