diff --git a/controllers/fenceagentsremediation_controller.go b/controllers/fenceagentsremediation_controller.go index 820162bb..9b568eda 100644 --- a/controllers/fenceagentsremediation_controller.go +++ b/controllers/fenceagentsremediation_controller.go @@ -179,7 +179,7 @@ func (r *FenceAgentsRemediationReconciler) Reconcile(ctx context.Context, req ct if meta.IsStatusConditionTrue(far.Status.Conditions, commonConditions.ProcessingType) && !meta.IsStatusConditionTrue(far.Status.Conditions, utils.FenceAgentActionSucceededType) { - // The remeditation has already been processed, thus we can begin with exuecting the FA for the node + // The remeditation has already been processed, thus we can begin with executing the FA for the node if r.Executor.Exists(far.GetUID()) { r.Log.Info("A Fence Agent is already running", "Fence Agent", far.Spec.Agent, "Node Name", req.Name, "FAR uid", far.GetUID()) @@ -227,7 +227,7 @@ func isTimedOutByNHC(far *v1alpha1.FenceAgentsRemediation) bool { // updateStatus updates the CR status, and returns an error if it fails func (r *FenceAgentsRemediationReconciler) updateStatus(ctx context.Context, far *v1alpha1.FenceAgentsRemediation) error { - // When CR doesn't include a finalizer and the CR deletionTimestamp exsists + // When CR doesn't include a finalizer and the CR deletionTimestamp exists // then we can skip update, since it will be removed soon. if !controllerutil.ContainsFinalizer(far, v1alpha1.FARFinalizer) && !far.ObjectMeta.DeletionTimestamp.IsZero() { return nil @@ -259,7 +259,7 @@ func (r *FenceAgentsRemediationReconciler) updateStatus(ctx context.Context, far } // buildFenceAgentParams collects the FAR's parameters for the node based on FAR CR, and if the CR is missing parameters -// or the CR's name don't match nodeParamter name or it has an action which is different than reboot, then return an error +// or the CR's name don't match nodeParameter name or it has an action which is different than reboot, then return an error func buildFenceAgentParams(far *v1alpha1.FenceAgentsRemediation) ([]string, error) { logger := ctrl.Log.WithName("build-fa-parameters") if far.Spec.NodeParameters == nil || far.Spec.SharedParameters == nil { @@ -273,7 +273,7 @@ func buildFenceAgentParams(far *v1alpha1.FenceAgentsRemediation) ([]string, erro if paramName != parameterActionName { fenceAgentParams = appendParamToSlice(fenceAgentParams, paramName, paramVal) } else if paramVal != parameterActionValue { - // --action attribute was selected but it is differemt than reboot + // --action attribute was selected but it is different than reboot err := errors.New("FAR doesn't support any other action than reboot") logger.Error(err, "can't build CR with this action attribute", "action", paramVal) return nil, err diff --git a/controllers/fenceagentsremediation_controller_test.go b/controllers/fenceagentsremediation_controller_test.go index 6b0b74ae..cc71e0da 100644 --- a/controllers/fenceagentsremediation_controller_test.go +++ b/controllers/fenceagentsremediation_controller_test.go @@ -170,7 +170,7 @@ var _ = Describe("FAR Controller", func() { By("Not having any test pod") checkPodIsNotFound(testPodName, true) - By("Verifying correct conditions for successfull remediation") + By("Verifying correct conditions for successful remediation") Expect(underTestFAR.Status.LastUpdateTime).ToNot(BeNil()) verifyStatusCondition(workerNode, commonConditions.ProcessingType, conditionStatusPointer(metav1.ConditionFalse)) verifyStatusCondition(workerNode, utils.FenceAgentActionSucceededType, conditionStatusPointer(metav1.ConditionTrue)) @@ -201,7 +201,7 @@ var _ = Describe("FAR Controller", func() { By("Still having one test pod") checkPodIsNotFound(testPodName, false) - By("Verifying correct conditions for unsuccessfull remediation") + By("Verifying correct conditions for unsuccessful remediation") Expect(underTestFAR.Status.LastUpdateTime).ToNot(BeNil()) verifyStatusCondition(dummyNode, commonConditions.ProcessingType, conditionStatusPointer(metav1.ConditionFalse)) verifyStatusCondition(dummyNode, utils.FenceAgentActionSucceededType, conditionStatusPointer(metav1.ConditionFalse)) diff --git a/pkg/utils/conditions.go b/pkg/utils/conditions.go index f12236eb..2b02ba97 100644 --- a/pkg/utils/conditions.go +++ b/pkg/utils/conditions.go @@ -28,7 +28,7 @@ const ( type ConditionsChangeReason string const ( - // RemediationFinishedNodeNotFound - CR was found but its name doesn't matche a node + // RemediationFinishedNodeNotFound - CR was found but its name doesn't match any node RemediationFinishedNodeNotFound ConditionsChangeReason = "RemediationFinishedNodeNotFound" // RemediationInterruptedByNHC - Remediation was interrupted by NHC timeout annotation RemediationInterruptedByNHC ConditionsChangeReason = "RemediationInterruptedByNHC"