Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
Signed-off-by: Carlo Lobrano <[email protected]>
  • Loading branch information
clobrano committed Nov 24, 2023
1 parent 6c806dc commit 8e82aa7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions controllers/fenceagentsremediation_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,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
Expand Down Expand Up @@ -261,7 +261,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 {
Expand All @@ -275,7 +275,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
Expand Down
4 changes: 2 additions & 2 deletions controllers/fenceagentsremediation_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 8e82aa7

Please sign in to comment.