-
Notifications
You must be signed in to change notification settings - Fork 750
CMP-3580: Implement checks for unsupported API server configs #13969
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
Conversation
|
/test 4.18-e2e-aws-ocp4-cis |
| rules: [] | ||
| rules: | ||
| - api_server_no_unsupported_config_overrides | ||
| - api_server_kube_no_unsupported_config_overrides |
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.
Strange - these didn't get picked up in the OCP4 cis testing.
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.
Adding in the platform.
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.
The rule still didn't show up in the test's artifacts.
Could it be that it is still not using the PR sources to build? Although I see the following in the logs:
2025/10/02 14:00:23 Using content image: registry.build09.ci.openshift.org/ci-op-pcld3z78/pipeline@sha256:4e75e0a42dd7be2834916360232767bee51f2b9d5af9f06b7e492c31c1ba0502
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.
The rule is getting build and put in the datastream, but it still doesn't seem to run in CI.
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.
Looks like we're passing the content image from the PR correctly - https://github.com/openshift/release/blob/master/ci-operator/config/ComplianceAsCode/content/ComplianceAsCode-content-master__4.18.yaml#L225
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.
@rhmdnd component doesn't seem to be used anywhere. Regardless, --content-image=$CONTENT_IMAGE seems correct.
From the logs:
+ go test . '-run=^TestPlatformCompliance$' -test-type=platform -content-image=registry.build11.ci.openshift.org/ci-op-mv6gph1y/pipeline@sha256:01d6114df7283f8cb722b017747c4de25eb5f42baa6d761eb34b6de17d0793f8 -content-directory=/go/src/github.com/ComplianceAsCode/content
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.
This PR looks good to me, @rhmdnd
But would you like to use this PR as testing grounds to understand why it doesn't show up in the tests?
|
/test 4.18-e2e-aws-ocp4-cis |
|
@rhmdnd On an OCP 4.20 the rule is falling. When I probe manually I get this: So the key seems to exist, its value is |
|
I get the same |
|
This is what I get in the logs: |
applications/openshift/api-server/api_server_kube_no_unsupported_config_overrides/rule.yml
Outdated
Show resolved
Hide resolved
applications/openshift/api-server/api_server_no_unsupported_config_overrides/rule.yml
Outdated
Show resolved
Hide resolved
CIS has guidance that recommends checking Kubernetes and OpenShift API servers for any unsupported configuration options (control 1.2.33 in newer versions and 1.2.31 in recent versions). This commit adds two new rules to check the API servers for unsupported configs so that users have some automated way of checking this control, even though OpenShift doesn't use this feature by default.
|
/test 4.18-e2e-aws-ocp4-cis |
|
@rhmdnd: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
Rules are passing when tested manually. |
CIS has guidance that recommends checking Kubernetes and OpenShift API
servers for any unsupported configuration options (control 1.2.33 in
newer versions and 1.2.31 in recent versions). This commit adds two new
rules to check the API servers for unsupported configs so that users
have some automated way of checking this control, even though OpenShift
doesn't use this feature by default.