Repository navigation
fix(job, cronjob): move startingDeadlineSeconds to CronJob spec - #664
Open
RaphaelFakhri wants to merge 1 commit into
Open
RaphaelFakhri wants to merge 1 commit into
RaphaelFakhri wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
startingDeadlineSecondsis aCronJobSpecfield, but the chart renders it in theJobSpec:cronjob.yamlrenders it underspec.jobTemplate.spec. Strict schema validation rejects the CronJob. Otherwise the API server drops the field and the deadline has no effect.job.yamlrenders it under the Jobspec. The Job API has no such field, so the result is the same.This change:
startingDeadlineSecondsunder the CronJobspec, next toschedule, and keeps support for0.values.yaml.Fixes #663
Testing
helm-unittest -f tests/cronjob_test.yaml -f tests/job_test.yaml applicationreports 3 failed, 68 passed.mise run testreports 398 passed.mise run lintpasses, andREADME.mdandvalues.schema.jsondon't change when regenerated.kubeconform -strict(Kubernetes 1.31.0) rejects the rendered CronJob (/spec/jobTemplate/spec: additional properties 'startingDeadlineSeconds' not allowed) and Job (/spec). After the change, both resources pass validation.