From 0b849eb62fb268377a5ad1bc1f114b5c608160f8 Mon Sep 17 00:00:00 2001 From: Andreas Sommer Date: Wed, 9 Jul 2025 14:55:32 +0200 Subject: [PATCH] Fix format strings --- controllers/azurecluster_controller.go | 2 +- controllers/azuremanagedmachinepool_controller.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/azurecluster_controller.go b/controllers/azurecluster_controller.go index 8a477348578..81198a92f81 100644 --- a/controllers/azurecluster_controller.go +++ b/controllers/azurecluster_controller.go @@ -319,7 +319,7 @@ func (acr *AzureClusterReconciler) reconcileDelete(ctx context.Context, clusterS wrappedErr := errors.Wrapf(err, "error deleting AzureCluster %s/%s", azureCluster.Namespace, azureCluster.Name) acr.Recorder.Eventf(azureCluster, corev1.EventTypeWarning, "ClusterReconcilerDeleteFailed", wrappedErr.Error()) - conditions.MarkFalse(azureCluster, infrav1.NetworkInfrastructureReadyCondition, clusterv1.DeletionFailedReason, clusterv1.ConditionSeverityWarning, err.Error()) + conditions.MarkFalse(azureCluster, infrav1.NetworkInfrastructureReadyCondition, clusterv1.DeletionFailedReason, clusterv1.ConditionSeverityWarning, "%s", err.Error()) return reconcile.Result{}, wrappedErr } diff --git a/controllers/azuremanagedmachinepool_controller.go b/controllers/azuremanagedmachinepool_controller.go index a4c2abb7705..9be7f1d95bb 100644 --- a/controllers/azuremanagedmachinepool_controller.go +++ b/controllers/azuremanagedmachinepool_controller.go @@ -270,7 +270,7 @@ func (ammpr *AzureManagedMachinePoolReconciler) reconcileNormal(ctx context.Cont // Ensure the ready condition is false, but do not overwrite an existing // error condition which might provide more details. if conditions.IsTrue(scope.InfraMachinePool, infrav1.AgentPoolsReadyCondition) { - conditions.MarkFalse(scope.InfraMachinePool, infrav1.AgentPoolsReadyCondition, infrav1.FailedReason, clusterv1.ConditionSeverityError, err.Error()) + conditions.MarkFalse(scope.InfraMachinePool, infrav1.AgentPoolsReadyCondition, infrav1.FailedReason, clusterv1.ConditionSeverityError, "%s", err.Error()) } // Handle transient and terminal errors