-
Notifications
You must be signed in to change notification settings - Fork 185
feat: add support for batch v1 cronjob #522
base: main
Are you sure you want to change the base?
Conversation
ca900e8
to
7308fe2
Compare
Thanks for the quick fix!
Testing is documented here. You will likely want the
|
7308fe2
to
effff78
Compare
So I figured out why the test is failing. Kind of. Since my PR would support both beta and v1, there is a mismatch in the resource count here and here. First error ends with I haven't figured out how to teach it, that there are more resources now. |
So for resources in a cluster, the kubernetes API returns all of the resources in the same version, regardless of what version the resource was originally created as. This is why we don't test for multiple versions of the same resource (kubeaudit can't tell them apart once the versions get normalized). So instead of adding a version in the test, I think we just want to replace the old one. |
I can remove the beta one from the test. But it would be still better to keep the actual thing around so that both versions are supported right? Maybe we can find a way to have the tests work with multiple versions. |
effff78
to
99830dc
Compare
Signed-off-by: Nico Braun <rainbowstack@gmail.com>
99830dc
to
9060186
Compare
I guess this is failing now because the test is still using 1.20 for the kind image. But batch v1 cronjob was only released in 1.21. Given that kubernetes supports the last 3 versions officially, I think we should use 1.24 as kind image. |
I tested locally to bump the version. Now there is the next problem. It throws deprecated errors for the beta cronjob. So those tests need be adjusted as well, if we want to bump the version. |
We indeed only support the latest Kubernetes version. If you are bumping the Kind version, here is a reference PR of the last time it was bumped. Unfortunately the test suite is not set up to support backwards compatibility with older Kubernetes versions. |
Sorry, I think I misread your comment. I have also removed the fixture containg the beta job but it still errors. Here is one of the errors. They are all from
|
Sorry I was out of office last week, will take a look this week |
Yeah. I didn't find time to look further into this either. I am also not entirely sure how to proceed. |
Signed-off-by: Nico Braun rainbowstack@gmail.com
Description
Add support for batch/v1 CronJob
Fixes #520
Type of change
How Has This Been Tested?
The test has failed on me.
But building the project and testing it via curl has worked.
I didn't really understand the test suite. Maybe someone can give me a hint.
Checklist: