File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
pkg/controller.v1beta1/trial Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -276,13 +276,14 @@ func TestReconcileBatchJob(t *testing.T) {
276
276
batchJobCompleteReason := "BatchJob completed test reason"
277
277
g .Eventually (func (g gomega.Gomega ) {
278
278
g .Expect (c .Get (ctx , succeededBatchJobKey , batchJob )).Should (gomega .Succeed ())
279
- // TODO(Electronic-Waste): Remove this condition when K8s 1 .30 is no longer supported.
279
+ // TODO(Electronic-Waste): Remove this condition when K8s v1.29 & v1 .30 is no longer supported.
280
280
// SuccessPolicy is available in K8s 1.31 and later. If we set it in K8s 1.30, it will be ignored.
281
281
// And when we set the status with `SuccessCriteriaMet`, it will report error:
282
282
// "Invalid value: cannot set SuccessCriteriaMet=True for Job without SuccessPolicy".
283
283
// Ref: https://kubernetes.io/docs/concepts/workloads/controllers/job/#success-policy.
284
- isK8sVersion130 := strings .Contains (os .Getenv ("KUBEBUILDER_ASSETS" ), "1.30" )
285
- if isK8sVersion130 {
284
+ isK8sVersionUnder130 := strings .Contains (os .Getenv ("KUBEBUILDER_ASSETS" ), "1.30" ) ||
285
+ strings .Contains (os .Getenv ("KUBEBUILDER_ASSETS" ), "1.29" )
286
+ if isK8sVersionUnder130 {
286
287
batchJob .Status = batchv1.JobStatus {
287
288
Conditions : []batchv1.JobCondition {
288
289
{
You can’t perform that action at this time.
0 commit comments