From a83c4dbd19c8a4409adeffe2a7e6090d1f3dfb39 Mon Sep 17 00:00:00 2001 From: tanshanshan Date: Tue, 28 Aug 2018 17:09:07 +0800 Subject: [PATCH] fix spelling mistakes --- pkg/apis/core/validation/validation.go | 2 +- pkg/controller/cloud/pvlcontroller.go | 2 +- .../pkg/admission/storage/persistentvolume/label/admission.go | 2 +- test/e2e/apps/statefulset.go | 2 +- test/e2e/common/init_container.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/apis/core/validation/validation.go b/pkg/apis/core/validation/validation.go index 7291977822..ca99f15532 100644 --- a/pkg/apis/core/validation/validation.go +++ b/pkg/apis/core/validation/validation.go @@ -4855,7 +4855,7 @@ func validateScopedResourceSelectorRequirement(resourceQuotaSpec *core.ResourceQ case core.ScopeSelectorOpIn, core.ScopeSelectorOpNotIn: if len(req.Values) == 0 { allErrs = append(allErrs, field.Required(fldPath.Child("values"), - "must be atleast one value when `operator` is 'In' or 'NotIn' for scope selector")) + "must be at least one value when `operator` is 'In' or 'NotIn' for scope selector")) } case core.ScopeSelectorOpExists, core.ScopeSelectorOpDoesNotExist: if len(req.Values) != 0 { diff --git a/pkg/controller/cloud/pvlcontroller.go b/pkg/controller/cloud/pvlcontroller.go index ed1a0d674f..335a5cc017 100644 --- a/pkg/controller/cloud/pvlcontroller.go +++ b/pkg/controller/cloud/pvlcontroller.go @@ -239,7 +239,7 @@ func (pvlc *PersistentVolumeLabelController) createPatch(vol *v1.PersistentVolum newVolume.Spec.NodeAffinity.Required = new(v1.NodeSelector) } if len(newVolume.Spec.NodeAffinity.Required.NodeSelectorTerms) == 0 { - // Need atleast one term pre-allocated whose MatchExpressions can be appended to + // Need at least one term pre-allocated whose MatchExpressions can be appended to newVolume.Spec.NodeAffinity.Required.NodeSelectorTerms = make([]v1.NodeSelectorTerm, 1) } // Populate NodeAffinity with requirements if there are no conflicting keys found diff --git a/plugin/pkg/admission/storage/persistentvolume/label/admission.go b/plugin/pkg/admission/storage/persistentvolume/label/admission.go index 4bbd16fee9..4adc121c4f 100644 --- a/plugin/pkg/admission/storage/persistentvolume/label/admission.go +++ b/plugin/pkg/admission/storage/persistentvolume/label/admission.go @@ -166,7 +166,7 @@ func (l *persistentVolumeLabel) Admit(a admission.Attributes) (err error) { volume.Spec.NodeAffinity.Required = new(api.NodeSelector) } if len(volume.Spec.NodeAffinity.Required.NodeSelectorTerms) == 0 { - // Need atleast one term pre-allocated whose MatchExpressions can be appended to + // Need at least one term pre-allocated whose MatchExpressions can be appended to volume.Spec.NodeAffinity.Required.NodeSelectorTerms = make([]api.NodeSelectorTerm, 1) } if nodeSelectorRequirementKeysExistInNodeSelectorTerms(requirements, volume.Spec.NodeAffinity.Required.NodeSelectorTerms) { diff --git a/test/e2e/apps/statefulset.go b/test/e2e/apps/statefulset.go index cc5b58d974..c2254d47cf 100644 --- a/test/e2e/apps/statefulset.go +++ b/test/e2e/apps/statefulset.go @@ -744,7 +744,7 @@ var _ = SIGDescribe("StatefulSet", func() { framework.ExpectNoError(err) ctx, cancel := watchtools.ContextWithOptionalTimeout(context.Background(), framework.StatefulPodTimeout) defer cancel() - // we need to get UID from pod in any state and wait until stateful set controller will remove pod atleast once + // we need to get UID from pod in any state and wait until stateful set controller will remove pod at least once _, err = watchtools.UntilWithoutRetry(ctx, w, func(event watch.Event) (bool, error) { pod := event.Object.(*v1.Pod) switch event.Type { diff --git a/test/e2e/common/init_container.go b/test/e2e/common/init_container.go index 04d753f9ee..a94b2d3499 100644 --- a/test/e2e/common/init_container.go +++ b/test/e2e/common/init_container.go @@ -304,7 +304,7 @@ var _ = framework.KubeDescribe("InitContainer [NodeConformance]", func() { Release: v1.12 Testname: init-container-fails-stops-app-restartnever-pod Description: Ensure that app container is not started - when atleast one InitContainer fails to start and Pod has restart policy as RestartNever. + when at least one InitContainer fails to start and Pod has restart policy as RestartNever. */ framework.ConformanceIt("should not start app containers and fail the pod if init containers fail on a RestartNever pod", func() { By("creating the pod")