-
Notifications
You must be signed in to change notification settings - Fork 13
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
e2e: verify NROP machineconfigs are removed #1073
base: main
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rbaturov The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test all |
Starting in version 4.18, NROP MachineConfigs containing the custom SELinux policy are expected to be removed unless a specific annotation is set in the NUMAResourcesOperator CR to enforce the use of the custom (legacy) SELinux policy. To ensure this behavior, we added a test that verifies MachineConfigs are removed when the annotation is absent in the CR. Signed-off-by: Ronny Baturov <[email protected]>
b569a7e
to
2e0b4df
Compare
/retest-required |
@rbaturov: The following test 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. |
@@ -143,6 +144,21 @@ var _ = Describe("[Install] continuousIntegration", func() { | |||
rteContainer, err := findContainerByName(*ds, containerNameRTE) | |||
Expect(err).ToNot(HaveOccurred()) | |||
Expect(rteContainer.SecurityContext.SELinuxOptions.Type).To(Equal(selinux.RTEContextType), "container %s is running with wrong selinux context", rteContainer.Name) | |||
|
|||
By("checking numaresources machineconfigs removed when no SELinux policy annotation is present") |
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 test deserves to be running on a suite of its own which will be targeted for the an upgrade lane: openshift/release#58457
@ffromani WDYT?
Name: objectnames.GetMachineConfigName(updatedNROObj.Name, mcp.Name), | ||
} | ||
err := e2eclient.Client.Get(context.TODO(), mcKey, mc) | ||
Expect(errors.IsNotFound(err)).To(BeTrue(), "MachineConfig %s is expected to not be found", mcKey.String()) |
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.
we are looking to find err !=nil too:
Expect(err).To(HaveOccurred())
let's also print out the error we got instead if it is other than NotFound
Starting in version 4.18, NROP MachineConfigs containing the custom SELinux policy are expected to be removed unless a specific annotation is set in the NUMAResourcesOperator CR to enforce the use of the custom (legacy) SELinux policy. To ensure this behavior, we added a test that verifies MachineConfigs are removed when the annotation is absent in the CR.