From be685c838e5aaa6d8bfc4e7feb18458e8c7b1a72 Mon Sep 17 00:00:00 2001 From: Michal Wozniak Date: Tue, 22 Oct 2024 17:00:37 +0200 Subject: [PATCH] Promote the Job pod failure policy to Conformance --- test/conformance/testdata/conformance.yaml | 23 ++++++++++++++++++++++ test/e2e/apps/job.go | 6 ++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/test/conformance/testdata/conformance.yaml b/test/conformance/testdata/conformance.yaml index 5a6be27c8c8..34af43c7c45 100755 --- a/test/conformance/testdata/conformance.yaml +++ b/test/conformance/testdata/conformance.yaml @@ -1055,6 +1055,29 @@ pod. Modify the labels of one of the Job's Pods. The Job MUST release the Pod. release: v1.16 file: test/e2e/apps/job.go +- testname: Ensure pod failure policy allows to ignore failure matching on the DisruptionTarget + condition + codename: '[sig-apps] Job should allow to use a pod failure policy to ignore failure + matching on DisruptionTarget condition [Conformance]' + description: This test is using an indexed job. The pod corresponding to each index + creates a marker file on the host and runs 'forever' until evicted. Once the marker + file is created the pod succeeds seeing it on restart. Thus, we trigger one failure + per index due to eviction (DisruptionTarget condition is added in the process). + The Job would be marked as failed, if not for the ignore rule matching on exit + codes. + release: v1.32 + file: test/e2e/apps/job.go +- testname: Ensure pod failure policy allows to ignore failure matching on the exit + code + codename: '[sig-apps] Job should allow to use a pod failure policy to ignore failure + matching on exit code [Conformance]' + description: This test is using an indexed job. The pod corresponding to each index + creates a marker file on the host and runs 'forever' until evicted. Once the marker + file is created the pod succeeds seeing it on restart. Thus, we trigger one failure + per index due to eviction, so the Job would be marked as failed, if not for the + ignore rule matching on exit codes. + release: v1.32 + file: test/e2e/apps/job.go - testname: Verify Pod Failure policy allows to fail job early on exit code. codename: '[sig-apps] Job should allow to use the pod failure policy on exit code to fail the job early [Conformance]' diff --git a/test/e2e/apps/job.go b/test/e2e/apps/job.go index 4d356bc9cc7..968c868d989 100644 --- a/test/e2e/apps/job.go +++ b/test/e2e/apps/job.go @@ -143,6 +143,7 @@ var _ = SIGDescribe("Job", func() { }) /* + Release: v1.32 Testname: Ensure pod failure policy allows to ignore failure matching on the exit code Description: This test is using an indexed job. The pod corresponding to each index creates a marker file on the host and runs 'forever' until evicted. Once @@ -150,7 +151,7 @@ var _ = SIGDescribe("Job", func() { we trigger one failure per index due to eviction, so the Job would be marked as failed, if not for the ignore rule matching on exit codes. */ - ginkgo.It("should allow to use a pod failure policy to ignore failure matching on exit code", func(ctx context.Context) { + framework.ConformanceIt("should allow to use a pod failure policy to ignore failure matching on exit code", func(ctx context.Context) { // We set the backoffLimit = numPods-1 so that we can tolerate random // failures (like OutOfPods from kubelet). Yet, the Job would fail if the // pod failures were not be ignored. @@ -217,6 +218,7 @@ var _ = SIGDescribe("Job", func() { }) /* + Release: v1.32 Testname: Ensure pod failure policy allows to ignore failure matching on the DisruptionTarget condition Description: This test is using an indexed job. The pod corresponding to each index creates a marker file on the host and runs 'forever' until evicted. Once @@ -225,7 +227,7 @@ var _ = SIGDescribe("Job", func() { condition is added in the process). The Job would be marked as failed, if not for the ignore rule matching on exit codes. */ - ginkgo.It("should allow to use a pod failure policy to ignore failure matching on DisruptionTarget condition", func(ctx context.Context) { + framework.ConformanceIt("should allow to use a pod failure policy to ignore failure matching on DisruptionTarget condition", func(ctx context.Context) { // We set the backoffLimit = numPods-1 so that we can tolerate random // failures (like OutOfPods from kubelet). Yet, the Job would fail if the // pod failures were not be ignored.