diff --git a/resource_customizations/batch/CronJob/actions/create-job/action.lua b/resource_customizations/batch/CronJob/actions/create-job/action.lua index 4b1583086991a7..8753144d404e7f 100644 --- a/resource_customizations/batch/CronJob/actions/create-job/action.lua +++ b/resource_customizations/batch/CronJob/actions/create-job/action.lua @@ -47,11 +47,7 @@ ownerRef.uid = obj.metadata.uid job.metadata.ownerReferences = {} job.metadata.ownerReferences[1] = ownerRef -job.spec = {} -job.spec.suspend = false -job.spec.template = {} -job.spec.template.metadata = deepCopy(obj.spec.jobTemplate.spec.template.metadata) -job.spec.template.spec = deepCopy(obj.spec.jobTemplate.spec.template.spec) +job.spec = deepCopy(obj.spec.jobTemplate.spec) local impactedResource = {} impactedResource.operation = "create" diff --git a/resource_customizations/batch/CronJob/actions/testdata/cronjob.yaml b/resource_customizations/batch/CronJob/actions/testdata/cronjob.yaml index d422c82da393ae..2c45c5eae1f386 100644 --- a/resource_customizations/batch/CronJob/actions/testdata/cronjob.yaml +++ b/resource_customizations/batch/CronJob/actions/testdata/cronjob.yaml @@ -13,6 +13,7 @@ spec: annotations: my: annotation spec: + ttlSecondsAfterFinished: 100 template: metadata: labels: diff --git a/resource_customizations/batch/CronJob/actions/testdata/job.yaml b/resource_customizations/batch/CronJob/actions/testdata/job.yaml index 16d4e4960b0dc1..1ef281afdcdb4e 100644 --- a/resource_customizations/batch/CronJob/actions/testdata/job.yaml +++ b/resource_customizations/batch/CronJob/actions/testdata/job.yaml @@ -10,6 +10,7 @@ annotations: my: annotation spec: + ttlSecondsAfterFinished: 100 template: metadata: labels: