From e2b30db6ae9c5acfed49788509f3c6a15bd0e371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20B=C3=B6schen?= Date: Sun, 15 May 2022 09:24:44 +0200 Subject: [PATCH] Making error messages lowercase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philipp Böschen --- controllers/keda/scaledjob_controller.go | 4 ++-- controllers/keda/scaledobject_controller.go | 4 ++-- pkg/scaling/executor/scale_jobs.go | 4 ++-- pkg/scaling/executor/scale_scaledobjects.go | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/controllers/keda/scaledjob_controller.go b/controllers/keda/scaledjob_controller.go index 7ed1a36b6a5..5c534841da5 100644 --- a/controllers/keda/scaledjob_controller.go +++ b/controllers/keda/scaledjob_controller.go @@ -102,7 +102,7 @@ func (r *ScaledJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( if !scaledJob.Status.Conditions.AreInitialized() { conditions := kedav1alpha1.GetInitializedConditions() if err := util.SetStatusConditions(ctx, r.Client, scaledJob, conditions); err != nil { - reqLogger.Error(err, "Failed to patch Objects Status with Conditions") + reqLogger.Error(err, "failed to patch Objects Status with Conditions") return ctrl.Result{}, err } } @@ -131,7 +131,7 @@ func (r *ScaledJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( } if err := util.SetStatusConditions(ctx, r.Client, scaledJob, &conditions); err != nil { - reqLogger.Error(err, "Failed to patch Objects Status with Conditions") + reqLogger.Error(err, "failed to patch Objects Status with Conditions") return ctrl.Result{}, err } return ctrl.Result{}, err diff --git a/controllers/keda/scaledobject_controller.go b/controllers/keda/scaledobject_controller.go index 55c0ffd85f3..c19954b5ed5 100644 --- a/controllers/keda/scaledobject_controller.go +++ b/controllers/keda/scaledobject_controller.go @@ -174,7 +174,7 @@ func (r *ScaledObjectReconciler) Reconcile(ctx context.Context, req ctrl.Request if !scaledObject.Status.Conditions.AreInitialized() { conditions := kedav1alpha1.GetInitializedConditions() if err := kedautil.SetStatusConditions(ctx, r.Client, scaledObject, conditions); err != nil { - reqLogger.Error(err, "Failed to patch Objects Status with Conditions") + reqLogger.Error(err, "failed to patch Objects Status with Conditions") return ctrl.Result{}, err } } @@ -197,7 +197,7 @@ func (r *ScaledObjectReconciler) Reconcile(ctx context.Context, req ctrl.Request } if err := kedautil.SetStatusConditions(ctx, r.Client, scaledObject, &conditions); err != nil { - reqLogger.Error(err, "Failed to patch Objects Status with Conditions") + reqLogger.Error(err, "failed to patch Objects Status with Conditions") return ctrl.Result{}, err } diff --git a/pkg/scaling/executor/scale_jobs.go b/pkg/scaling/executor/scale_jobs.go index a2812fe3b24..7007408468a 100644 --- a/pkg/scaling/executor/scale_jobs.go +++ b/pkg/scaling/executor/scale_jobs.go @@ -69,12 +69,12 @@ func (e *scaleExecutor) RequestJobScale(ctx context.Context, scaledJob *kedav1al if condition.IsUnknown() || condition.IsTrue() != isActive { if isActive { if err := e.setActiveCondition(ctx, scaledJob, metav1.ConditionTrue, "ScalerActive", "Scaling is performed because triggers are active"); err != nil { - logger.Error(err, "Error setting active condition when triggers are active") + logger.Error(err, "error setting active condition when triggers are active") return } } else { if err := e.setActiveCondition(ctx, scaledJob, metav1.ConditionFalse, "ScalerNotActive", "Scaling is not performed because triggers are not active"); err != nil { - logger.Error(err, "Error setting active condition when triggers are not active") + logger.Error(err, "error setting active condition when triggers are not active") return } } diff --git a/pkg/scaling/executor/scale_scaledobjects.go b/pkg/scaling/executor/scale_scaledobjects.go index f00235f59e3..077c227785c 100644 --- a/pkg/scaling/executor/scale_scaledobjects.go +++ b/pkg/scaling/executor/scale_scaledobjects.go @@ -218,12 +218,12 @@ func (e *scaleExecutor) RequestScale(ctx context.Context, scaledObject *kedav1al if condition.IsUnknown() || condition.IsTrue() != isActive { if isActive { if err := e.setActiveCondition(ctx, scaledObject, metav1.ConditionTrue, "ScalerActive", "Scaling is performed because triggers are active"); err != nil { - logger.Error(err, "Error setting active condition when triggers are active") + logger.Error(err, "error setting active condition when triggers are active") return } } else { if err := e.setActiveCondition(ctx, scaledObject, metav1.ConditionFalse, "ScalerNotActive", "Scaling is not performed because triggers are not active"); err != nil { - logger.Error(err, "Error setting active condition when triggers are not active") + logger.Error(err, "error setting active condition when triggers are not active") return } } @@ -238,7 +238,7 @@ func (e *scaleExecutor) doFallbackScaling(ctx context.Context, scaledObject *ked "New Replicas Count", scaledObject.Spec.Fallback.Replicas) } if e := e.setFallbackCondition(ctx, scaledObject, metav1.ConditionTrue, "FallbackExists", "At least one trigger is falling back on this scaled object"); e != nil { - logger.Error(e, "Error setting fallback condition") + logger.Error(e, "error setting fallback condition") } } @@ -274,7 +274,7 @@ func (e *scaleExecutor) scaleToZeroOrIdle(ctx context.Context, logger logr.Logge e.recorder.Eventf(scaledObject, corev1.EventTypeNormal, eventreason.KEDAScaleTargetDeactivated, "Deactivated %s %s/%s from %d to %d", scaledObject.Status.ScaleTargetKind, scaledObject.Namespace, scaledObject.Spec.ScaleTargetRef.Name, currentReplicas, scaleToReplicas) if err := e.setActiveCondition(ctx, scaledObject, metav1.ConditionFalse, "ScalerNotActive", "Scaling is not performed because triggers are not active"); err != nil { - logger.Error(err, "Error in setting active condition") + logger.Error(err, "error in setting active condition") return } } else { @@ -289,7 +289,7 @@ func (e *scaleExecutor) scaleToZeroOrIdle(ctx context.Context, logger logr.Logge activeCondition := scaledObject.Status.Conditions.GetActiveCondition() if !activeCondition.IsFalse() || activeCondition.Reason != "ScalerCooldown" { if err := e.setActiveCondition(ctx, scaledObject, metav1.ConditionFalse, "ScalerCooldown", "Scaler cooling down because triggers are not active"); err != nil { - logger.Error(err, "Error in setting active condition") + logger.Error(err, "error in setting active condition") return } }