cocreators-ee / project-template

Project template for kick-starting your work the right way
Other
5 stars 7 forks source link

Add support for CronJob type of components #30

Closed victorv-sbp closed 4 years ago

victorv-sbp commented 4 years ago

If you have a CronJob type of component the release system will not make the necessary changes in the _patch_yaml_docsmethod. Meaning that things like image and tag will not be replaced.

Added logic to also include these type of files (as they have a different structure than Deployment) and also refactored a bit the existing _patch_* methods.

joakimnordling commented 4 years ago

I was actually still a bit wondering about the replicas for a CronJob, and especially why kubeval was not saying anything about that.

I just today realized that kubeval has a --strict flag that can be used to Disallow additional properties not in schema. Whit that flag and replicas set for the cronjob you'd get this output:

WARN - cronjob.yaml contains an invalid CronJob - replicas: Additional property replicas is not allowed
lietu commented 4 years ago

Should we then update the scripts to use that?

joakimnordling commented 4 years ago

Yes, I think it would make sense to add the --strict flag. Will submit a PR for that shortly.