feat(common): Release version 1.2.0 (#92)

* fix(common): fix incorrect route default values (#91)
* fix(common): make `sectionName` optional for route parentRefs
* fix(common): name primary route correctly
* feat(common): add controller.type of cronjob (#87)
* fix(common): Fix invalid persistence type message (#85)
* feat(common): Allow setting container restartPolicy

Co-authored-by: András Maróy <andras@maroy.hu>
Co-authored-by: loeken <loeken@internetz.me>
Co-authored-by: Han Cen <hi@chamburr.com>
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2022-12-05 14:36:41 +01:00 committed by GitHub
parent 8f2a1ba9b4
commit 72670526a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 351 additions and 66 deletions

View file

@ -0,0 +1,67 @@
suite: cronjob configuration
templates:
- common.yaml
tests:
- it: default cronjob configuration should pass
set:
controller:
type: cronjob
asserts:
- documentIndex: &ControllerDoc 0
isKind:
of: CronJob
- documentIndex: *ControllerDoc
equal:
path: spec.schedule
value: "*/20 * * * *"
- documentIndex: *ControllerDoc
equal:
path: spec.concurrencyPolicy
value: Forbid
- documentIndex: *ControllerDoc
equal:
path: spec.successfulJobsHistoryLimit
value: 1
- documentIndex: *ControllerDoc
equal:
path: spec.failedJobsHistoryLimit
value: 1
- documentIndex: *ControllerDoc
equal:
path: spec.jobTemplate.spec.template.spec.restartPolicy
value: Never
- it: custom cronjob configuration should pass
set:
controller:
type: cronjob
restartPolicy: OnFailure
cronjob:
schedule: &CronJobSchedule "0 3 * * *"
concurrencyPolicy: &CronJobConcurrencyPolicy "Test"
failedJobsHistory: &CronJobFailedJobsHistory 2
successfulJobsHistory: &CronJobSuccessfulJobsHistory 3
asserts:
- documentIndex: &ControllerDoc 0
isKind:
of: CronJob
- documentIndex: *ControllerDoc
equal:
path: spec.schedule
value: *CronJobSchedule
- documentIndex: *ControllerDoc
equal:
path: spec.concurrencyPolicy
value: *CronJobConcurrencyPolicy
- documentIndex: *ControllerDoc
equal:
path: spec.successfulJobsHistoryLimit
value: *CronJobSuccessfulJobsHistory
- documentIndex: *ControllerDoc
equal:
path: spec.failedJobsHistoryLimit
value: *CronJobFailedJobsHistory
- documentIndex: *ControllerDoc
equal:
path: spec.jobTemplate.spec.template.spec.restartPolicy
value: OnFailure