-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
--enable-optional-test for container-memory-requests-equal-limits does not enable test #582
Comments
It seems to me, the issue was introduced in kube-score 1.15.0. With 1.14.0, the test was working:
With 1.15.0, it does no longer:
I'm no go programmer, but as far as I understand, the logic in https://github.com/zegl/kube-score/blob/master/scorecard/enabled.go#L9 could be flawed since it only checks for annotations. It was introduced in #489. Also see the comment on line 40: // Optional checks are disabled unless explicitly allowed above
if check.Optional {
return false
} |
Thank you for investigating and a great bug report, I'll debug and fix the bug. |
Which version of kube-score are you using?
What did you do?
I would like to enable the optional
container-memory-requests-equal-limits
test, but it seems that the test isSKIPPED
nonetheless.For demonstration, I created the following Pod descriptor. Note that the memory limits/requests differ:
pod.yaml
What did you expect to see?
Validation should yield an error when enabling the optional test with
--enable-optional-test container-memory-requests-equal-limits
. Output should be something like:What did you see instead?
Validation does not fail and it even reports the test as skipped with
[SKIPPED] pod-test-1/testspace v1/Pod: Skipped because container-memory-requests-equal-limits is ignored
:Did I miss something or is this a bug in kube-score 1.17.0?
The text was updated successfully, but these errors were encountered: