Skip to content
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

Remove warning from kubelet rule #11243

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

montaguethomas
Copy link
Contributor

Description:

#10464 did a major refactor of the kubelet rules to move them from running as "Platform" checkType to "Node". This rule was missed to remove the warnings flag, as this causes CO to consider the rule as a Platform checkType.

CO Rule parsing logic:

Rationale:

While trying to tailor out the rule in Compliance Operator, it's impossible to do so as the rule is run as a Node scan but is imported as a Platform checkType.

ComplianceAsCode#10464 did a major refactor of the kubelet rules to move them from running as "Platform" checkType to "Node". This rule was missed to remove the `warnings` flag, as this causes CO to consider the rule as a Platform checkType.
@openshift-ci openshift-ci bot added the needs-ok-to-test Used by openshift-ci bot. label Nov 2, 2023
Copy link

openshift-ci bot commented Nov 2, 2023

Hi @montaguethomas. Thanks for your PR.

I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

Copy link

github-actions bot commented Nov 2, 2023

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@Vincent056
Copy link
Contributor

that's a good catch, thanks for fixing it!

@Vincent056
Copy link
Contributor

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Used by openshift-ci bot. and removed needs-ok-to-test Used by openshift-ci bot. labels Nov 3, 2023
@Vincent056
Copy link
Contributor

/test

Copy link

openshift-ci bot commented Nov 3, 2023

@Vincent056: The /test command needs one or more targets.
The following commands are available to trigger required jobs:

  • /test e2e-aws-ocp4-cis
  • /test e2e-aws-ocp4-cis-node
  • /test e2e-aws-ocp4-e8
  • /test e2e-aws-ocp4-high
  • /test e2e-aws-ocp4-high-node
  • /test e2e-aws-ocp4-moderate
  • /test e2e-aws-ocp4-moderate-node
  • /test e2e-aws-ocp4-pci-dss
  • /test e2e-aws-ocp4-pci-dss-node
  • /test e2e-aws-ocp4-stig
  • /test e2e-aws-ocp4-stig-node
  • /test e2e-aws-rhcos4-e8
  • /test e2e-aws-rhcos4-high
  • /test e2e-aws-rhcos4-moderate
  • /test e2e-aws-rhcos4-stig
  • /test images

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-ComplianceAsCode-content-master-images

In response to this:

/test

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/test-infra repository.

@Vincent056
Copy link
Contributor

/test e2e-aws-ocp4-high
/test e2e-aws-ocp4-high-node

Copy link

openshift-ci bot commented Nov 3, 2023

@montaguethomas: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ocp4-high-node 8705fe9 link true /test e2e-aws-ocp4-high-node

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/test-infra repository. I understand the commands that are listed here.

@jan-cerny jan-cerny changed the title Remove warning from kubelet rule. Remove warning from kubelet rule Nov 3, 2023
@marcusburghardt marcusburghardt added the OpenShift OpenShift product related. label Nov 8, 2023
@vojtapolasek vojtapolasek added this to the 0.1.72 milestone Nov 29, 2023
@yuumasato
Copy link
Member

yuumasato commented Dec 5, 2023

@montaguethomas Hi, thanks for the patch.

Could you rebase on top of latest master?
There is a new required test that needs to be run, this will also re-trigger the prow test, that apparently failed to setup.

@Vincent056
Copy link
Contributor

/lgtm

Copy link

codeclimate bot commented Jan 11, 2024

Code Climate has analyzed commit 5b7260e and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 58.5% (0.0% change).

View more on Code Climate.

@xiaojiey
Copy link
Collaborator

verification passed.

Without the PR, the node type is Platform
$ oc get rule ocp4-kubelet-configure-tls-min-version -o=jsonpath={.checkType}
Platform
With the PR, the node type is Node:
$ oc get rule upstream-ocp4-kubelet-configure-tls-min-version -o=jsonpath={.checkType}
Node
$ oc get ccr | grep kubelet-configure-tls-min-version
upstream-ocp4-high-node-master-kubelet-configure-tls-min-version                        PASS     medium
upstream-ocp4-high-node-worker-kubelet-configure-tls-min-version                        PASS     medium

@Vincent056 Vincent056 merged commit 9c97ffb into ComplianceAsCode:master Jan 11, 2024
38 checks passed
@Mab879 Mab879 added the Update Rule Issues or pull requests related to Rules updates. label Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Used by openshift-ci bot. OpenShift OpenShift product related. Update Rule Issues or pull requests related to Rules updates.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants