Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
komer3 committed Dec 9, 2024
1 parent fa59d6a commit 79a81d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions internal/controller/linodecluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func (r *LinodeClusterReconciler) reconcilePreflightLinodeFirewallCheck(ctx cont
if reconciler.HasStaleCondition(clusterScope.LinodeCluster,
ConditionPreflightLinodeNBFirewallReady,
reconciler.DefaultTimeout(r.ReconcileTimeout, reconciler.DefaultClusterControllerReconcileTimeout)) {
conditions.MarkFalse(clusterScope.LinodeCluster, ConditionPreflightLinodeNBFirewallReady, string(cerrs.CreateClusterError), "", err.Error())
conditions.MarkFalse(clusterScope.LinodeCluster, ConditionPreflightLinodeNBFirewallReady, string(cerrs.CreateClusterError), "", "%s", err.Error())
return ctrl.Result{}, err
}
return ctrl.Result{RequeueAfter: reconciler.DefaultClusterControllerReconcileDelay}, nil
Expand Down Expand Up @@ -284,7 +284,7 @@ func (r *LinodeClusterReconciler) reconcilePreflightLinodeVPCCheck(ctx context.C
if reconciler.HasStaleCondition(clusterScope.LinodeCluster,
ConditionPreflightLinodeVPCReady,
reconciler.DefaultTimeout(r.ReconcileTimeout, reconciler.DefaultClusterControllerReconcileTimeout)) {
conditions.MarkFalse(clusterScope.LinodeCluster, ConditionPreflightLinodeVPCReady, string(cerrs.CreateClusterError), "", err.Error())
conditions.MarkFalse(clusterScope.LinodeCluster, ConditionPreflightLinodeVPCReady, string(cerrs.CreateClusterError), "", "%s", err.Error())
return ctrl.Result{}, err
}
return ctrl.Result{RequeueAfter: reconciler.DefaultClusterControllerReconcileDelay}, nil
Expand All @@ -300,7 +300,7 @@ func setFailureReason(clusterScope *scope.ClusterScope, failureReason cerrs.Clus
clusterScope.LinodeCluster.Status.FailureReason = util.Pointer(failureReason)
clusterScope.LinodeCluster.Status.FailureMessage = util.Pointer(err.Error())

conditions.MarkFalse(clusterScope.LinodeCluster, clusterv1.ReadyCondition, string(failureReason), "", err.Error())
conditions.MarkFalse(clusterScope.LinodeCluster, clusterv1.ReadyCondition, string(failureReason), "", "%s", err.Error())

lcr.Recorder.Event(clusterScope.LinodeCluster, corev1.EventTypeWarning, string(failureReason), err.Error())
}
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/linodefirewall_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,15 @@ func (r *LinodeFirewallReconciler) reconcile(
failureReason = infrav1alpha2.CreateFirewallError
if err = fwScope.AddCredentialsRefFinalizer(ctx); err != nil {
logger.Error(err, "failed to update credentials secret")
conditions.MarkFalse(fwScope.LinodeFirewall, clusterv1.ReadyCondition, string(failureReason), "", err.Error())
conditions.MarkFalse(fwScope.LinodeFirewall, clusterv1.ReadyCondition, string(failureReason), "", "%s", err.Error())
r.Recorder.Event(fwScope.LinodeFirewall, corev1.EventTypeWarning, string(failureReason), err.Error())

return ctrl.Result{}, nil
}
}
if err = reconcileFirewall(ctx, r.Client, fwScope, logger); err != nil {
logger.Error(err, fmt.Sprintf("failed to %s Firewall", action))
conditions.MarkFalse(fwScope.LinodeFirewall, clusterv1.ReadyCondition, string(failureReason), "", err.Error())
conditions.MarkFalse(fwScope.LinodeFirewall, clusterv1.ReadyCondition, string(failureReason), "", "%s", err.Error())
r.Recorder.Event(fwScope.LinodeFirewall, corev1.EventTypeWarning, string(failureReason), err.Error())

switch {
Expand Down

0 comments on commit 79a81d4

Please sign in to comment.