From 5ce62c948a6bef9cb079a10fb40e9045b5d74e09 Mon Sep 17 00:00:00 2001 From: Zhen Zhang Date: Wed, 13 Nov 2024 09:36:39 +0800 Subject: [PATCH] fix docs and test typo (#1824) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 守辰 --- docs/proposals/20210826-ephemeraljob.md | 2 +- docs/proposals/20230323-imagelistpulljob.md | 2 +- docs/proposals/20240626-asts-volume-resize.md | 6 +++--- .../daemonset/daemonset_event_handler_test.go | 2 +- pkg/controller/daemonset/daemonset_update.go | 2 +- test/e2e/apps/ephemeraljob.go | 10 +++++----- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/proposals/20210826-ephemeraljob.md b/docs/proposals/20210826-ephemeraljob.md index c155a0edf1..0de843a436 100644 --- a/docs/proposals/20210826-ephemeraljob.md +++ b/docs/proposals/20210826-ephemeraljob.md @@ -99,7 +99,7 @@ spec: the number of creating ephemeralcontainer will not exceed replicas. -1. parallelism means parallel running ephemeral containeres. +1. parallelism means parallel running ephemeral containers. the value of parallelism cannot exceed 10. diff --git a/docs/proposals/20230323-imagelistpulljob.md b/docs/proposals/20230323-imagelistpulljob.md index bb21b6cf4c..786efe6afc 100644 --- a/docs/proposals/20230323-imagelistpulljob.md +++ b/docs/proposals/20230323-imagelistpulljob.md @@ -190,7 +190,7 @@ Add webhooks for ImageListPullJob, validating-webhook and mutating-webhook. The `ImageListPullJob` will be deleted , when the condition is: `CompletionPolicy.Type=Always && CompletionPolicy.TTLSecondsAfterFinished>0`. -Calculate the latest status of the `ImageListPullJob` from all `ImagePullJob`s which is ownerd by the `ImageListPullJob`. +Calculate the latest status of the `ImageListPullJob` from all `ImagePullJob`s which is owned by the `ImageListPullJob`. 1),Create an `ImagePullJob` based on `ImageListPullJob.Spec.Image`. diff --git a/docs/proposals/20240626-asts-volume-resize.md b/docs/proposals/20240626-asts-volume-resize.md index ad5b3a3187..dbae10611e 100644 --- a/docs/proposals/20240626-asts-volume-resize.md +++ b/docs/proposals/20240626-asts-volume-resize.md @@ -156,13 +156,13 @@ status: updatedReplicas: 3 volumeClaimTemplates: # new field - finishedReconciliationGeneration: 2 - updatedReadyReplics: 1 # resize 状态成功的副本数 + updatedReadyReplicas: 1 # resize 状态成功的副本数 updatedReplicas: 2 # 下发 resize 的副本数 templateName: vol1 - # 当 updatedReadyReplics == spec.replicas时, + # 当 updatedReadyReplicas == spec.replicas时, # 调整 finishedReconciliationGeneration 为 sts 的 generation - finishedReconciliationGeneration: 3 - updatedReadyReplics: 3 + updatedReadyReplicas: 3 updatedReplicas: 3 templateName: vol2 ``` diff --git a/pkg/controller/daemonset/daemonset_event_handler_test.go b/pkg/controller/daemonset/daemonset_event_handler_test.go index 9e9e8ceabf..e21e4ba5d6 100644 --- a/pkg/controller/daemonset/daemonset_event_handler_test.go +++ b/pkg/controller/daemonset/daemonset_event_handler_test.go @@ -678,7 +678,7 @@ func TestEnqueueRequestForNodeCreate(t *testing.T) { expectedQueueLen int }{ { - name: "add one ummatched node", + name: "add one unmatched node", dss: []*appsv1alpha1.DaemonSet{ { ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/controller/daemonset/daemonset_update.go b/pkg/controller/daemonset/daemonset_update.go index e6dc4efbfc..40192944a8 100644 --- a/pkg/controller/daemonset/daemonset_update.go +++ b/pkg/controller/daemonset/daemonset_update.go @@ -125,7 +125,7 @@ func (dsc *ReconcileDaemonSet) rollingUpdate(ctx context.Context, ds *appsv1alph } } - // use any of the candidates we can, including the allowedReplacemnntPods + // use any of the candidates we can, including the allowedReplacementPods klog.V(5).InfoS("DaemonSet allowing replacements, including some new unavailable and candidate pods, up to maxUnavailable", "daemonSet", klog.KObj(ds), "allowedReplacementPodCount", len(allowedReplacementPods), "maxUnavailable", maxUnavailable, "numUnavailable", numUnavailable, "candidatePodsToDeleteCount", len(candidatePodsToDelete)) remainingUnavailable := maxUnavailable - numUnavailable diff --git a/test/e2e/apps/ephemeraljob.go b/test/e2e/apps/ephemeraljob.go index b2fd82087b..fb699c621a 100644 --- a/test/e2e/apps/ephemeraljob.go +++ b/test/e2e/apps/ephemeraljob.go @@ -549,7 +549,7 @@ var _ = SIGDescribe("EphemeralJob", func() { oldEphemeralContainers := pods[0].Status.EphemeralContainerStatuses[0] { - resetartContainerTester := framework.NewContainerRecreateTester(c, kc, ns) + restartContainerTester := framework.NewContainerRecreateTester(c, kc, ns) ginkgo.By("Create CRR for pods[0], recreate container: app") pod := pods[0] crr := &appsv1alpha1.ContainerRecreateRequest{ @@ -563,7 +563,7 @@ var _ = SIGDescribe("EphemeralJob", func() { TTLSecondsAfterFinished: utilpointer.Int32Ptr(99999), }, } - crr, err = resetartContainerTester.CreateCRR(crr) + crr, err = restartContainerTester.CreateCRR(crr) gomega.Expect(err).NotTo(gomega.HaveOccurred()) // wait webhook @@ -577,20 +577,20 @@ var _ = SIGDescribe("EphemeralJob", func() { gomega.Expect(crr.Spec.Containers[0].StatusContext.ContainerID).Should(gomega.Equal(pod.Status.ContainerStatuses[0].ContainerID)) ginkgo.By("Wait CRR recreate completion") gomega.Eventually(func() appsv1alpha1.ContainerRecreateRequestPhase { - crr, err = resetartContainerTester.GetCRR(crr.Name) + crr, err = restartContainerTester.GetCRR(crr.Name) gomega.Expect(err).NotTo(gomega.HaveOccurred()) return crr.Status.Phase }, 70*time.Second, time.Second).Should(gomega.Equal(appsv1alpha1.ContainerRecreateRequestCompleted)) gomega.Expect(crr.Status.CompletionTime).ShouldNot(gomega.BeNil()) gomega.Eventually(func() string { - crr, err = resetartContainerTester.GetCRR(crr.Name) + crr, err = restartContainerTester.GetCRR(crr.Name) gomega.Expect(err).NotTo(gomega.HaveOccurred()) return crr.Labels[appsv1alpha1.ContainerRecreateRequestActiveKey] }, 5*time.Second, 1*time.Second).Should(gomega.Equal("")) gomega.Expect(crr.Status.ContainerRecreateStates).Should(gomega.Equal([]appsv1alpha1.ContainerRecreateRequestContainerRecreateState{{Name: "nginx", Phase: appsv1alpha1.ContainerRecreateRequestSucceeded, IsKilled: true}})) ginkgo.By("Check Pod containers recreated and started for minStartedSeconds") - pod, err = resetartContainerTester.GetPod(pod.Name) + pod, err = restartContainerTester.GetPod(pod.Name) gomega.Expect(err).NotTo(gomega.HaveOccurred()) gomega.Expect(podutil.IsPodReady(pod)).Should(gomega.Equal(true)) gomega.Expect(pod.Status.ContainerStatuses[0].ContainerID).ShouldNot(gomega.Equal(crr.Spec.Containers[0].StatusContext.ContainerID))