Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #647 from mikenairn/fix_lint_errors
Browse files Browse the repository at this point in the history
Fix lint errors
  • Loading branch information
openshift-ci[bot] authored Nov 3, 2023
2 parents a75da13 + 4df7444 commit aa223ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
8 changes: 2 additions & 6 deletions pkg/controllers/dnspolicy/dnspolicy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,7 @@ func (r *DNSPolicyReconciler) reconcileResources(ctx context.Context, dnsPolicy
func (r *DNSPolicyReconciler) deleteResources(ctx context.Context, dnsPolicy *v1alpha1.DNSPolicy, targetNetworkObject client.Object) error {
// delete based on gateway diffs

gatewayDiffObj, err := r.ComputeGatewayDiffs(ctx, dnsPolicy, targetNetworkObject, &DNSPolicyRefsConfig{})
if err != nil {
return err
}
if err = r.deleteDNSRecords(ctx, dnsPolicy); err != nil {
if err := r.deleteDNSRecords(ctx, dnsPolicy); err != nil {
log.V(3).Info("error reconciling DNS records from delete, returning", "error", err)
return err
}
Expand All @@ -211,7 +207,7 @@ func (r *DNSPolicyReconciler) deleteResources(ctx context.Context, dnsPolicy *v1
}
}

gatewayDiffObj, err = r.ComputeGatewayDiffs(ctx, dnsPolicy, targetNetworkObject, &DNSPolicyRefsConfig{})
gatewayDiffObj, err := r.ComputeGatewayDiffs(ctx, dnsPolicy, targetNetworkObject, &DNSPolicyRefsConfig{})
if err != nil {
return err
}
Expand Down
19 changes: 0 additions & 19 deletions pkg/controllers/tlspolicy/tlspolicy_certmanager_certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package tlspolicy
import (
"context"
"fmt"
"reflect"

certmanv1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1"

Expand Down Expand Up @@ -190,21 +189,3 @@ func gatewayTLSCertificateLabels(gwKey client.ObjectKey) map[string]string {
"gateway": gwKey.Name,
}
}

func alwaysUpdateCertificate(existingObj, desiredObj client.Object) (bool, error) {
existing, ok := existingObj.(*certmanv1.Certificate)
if !ok {
return false, fmt.Errorf("%T is not a *certmanv1.Certificate", existingObj)
}
desired, ok := desiredObj.(*certmanv1.Certificate)
if !ok {
return false, fmt.Errorf("%T is not an *certmanv1.Certificate", desiredObj)
}

if reflect.DeepEqual(existing.Spec, desired.Spec) {
return false, nil
}
existing.Spec = desired.Spec

return true, nil
}

0 comments on commit aa223ed

Please sign in to comment.