Skip to content

Commit

Permalink
fix docs and test typo (#1824)
Browse files Browse the repository at this point in the history
Signed-off-by: 守辰 <[email protected]>
  • Loading branch information
furykerry authored Nov 13, 2024
1 parent 9924a62 commit 5ce62c9
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/proposals/20210826-ephemeraljob.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/proposals/20230323-imagelistpulljob.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
6 changes: 3 additions & 3 deletions docs/proposals/20240626-asts-volume-resize.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/daemonset/daemonset_event_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/daemonset/daemonset_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions test/e2e/apps/ephemeraljob.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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
Expand All @@ -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))
Expand Down

0 comments on commit 5ce62c9

Please sign in to comment.