-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test for k8s version recency (#288) #318
Conversation
The things we also might want to think about here:
Some improvements I also thought about:
|
Please add more/other reviewers if required! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this implementation does get the job done, and I also think that a lot of important research went into it (for finding the right endpoints for the Kubernetes releases and CVE data). Nevertheless, from my point of view, it needs a bit of polish here and there.
- the naming of the functions should better reflect what they do
- the functions also seem to mix levels of abstraction and concerns that I would prefer to see separated
- async should be capitalized on more
- some of the logic seems bit convoluted
One thing that I forgot: This PR should also replace the TBD in the standard by just one paragraph explaining the name of the script and how to invoke it properly (this wouldn't warrant a dedicated issue in my opinion). |
996ed5b
to
928be2a
Compare
eb6028f
to
0d4929e
Compare
fab867e
to
007b023
Compare
As per suggestion of @jschoone, I looked into Trivy. The only two problems I see is that If someone else has opinions on this, I'm open for discussions/suggestions/etc. |
I think, I fixed/changed most of the problems/things found, please provide more feedback if anymore problems arise. Thank you for your contribution. |
Approved by mistake. Mostly LGTM. |
* add initial test script * check k8s release for releases * check cluster with kubeconfig for version * check version against each other * if not matching, check for cadence time Signed-off-by: Hannes Baum <[email protected]>
* updates to test after reviews from @chess-knight and @fdobrovolny * changed math for weeks and months, since they were faulty in the previous implementation * changed way how the k8s versions are compared to a simpler loop which also causes less problems Signed-off-by: Hannes Baum <[email protected]>
This PR adds a test for the K8s version recency standard.
A user can execute the test script and provide his Kubernetes Cluster config file in order to check if the cluster version
is still in line with the versions demanded by the standard.
The following requirements are set:
This PR also adds a configuration file for the test script, which allows setting different logging parameters as well as the Github Token required to access the latest K8s release information in a readable format.
Closes #288