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 5c8d8d8 commit e988abf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions controllers/fenceagentsremediation_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand All @@ -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
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
2 changes: 1 addition & 1 deletion pkg/utils/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit e988abf

Please sign in to comment.