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

KEP-127: Add UserNamespacesPodSecurityStandards e2e test #121606

Merged

Conversation

saschagrunert
Copy link
Member

@saschagrunert saschagrunert commented Oct 30, 2023

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Adding a e2e test for the functionality added in #118760.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

cc @mrunalp @rata @giuseppe

Does this PR introduce a user-facing change?

None

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

None

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/test sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 30, 2023
@saschagrunert
Copy link
Member Author

/test pull-kubernetes-node-kubelet-serial-containerd

Copy link
Member

@rata rata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the tests are not testing the functionality we are adding. Don't we want to test that you can run as root, with the PSS restricted and the feature gate enabled?

Am I missing something?

test/e2e_node/user_namespaces_test.go Outdated Show resolved Hide resolved
test/e2e_node/user_namespaces_test.go Outdated Show resolved Hide resolved
test/e2e_node/user_namespaces_test.go Outdated Show resolved Hide resolved
@saschagrunert saschagrunert changed the title KEP-127: Add UserNamespacesPodSecurityStandards serial test WIP: KEP-127: Add UserNamespacesPodSecurityStandards serial test Oct 30, 2023
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 30, 2023
@saschagrunert saschagrunert force-pushed the user-namespaces-serial-test branch 3 times, most recently from 388883a to ffef6ec Compare October 30, 2023 12:25
@saschagrunert
Copy link
Member Author

/retest

@saschagrunert saschagrunert changed the title WIP: KEP-127: Add UserNamespacesPodSecurityStandards serial test KEP-127: Add UserNamespacesPodSecurityStandards serial test Oct 30, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 30, 2023
test/e2e/feature/feature.go Outdated Show resolved Hide resolved
@saschagrunert saschagrunert changed the title KEP-127: Add UserNamespacesPodSecurityStandards serial test KEP-127: Add UserNamespacesPodSecurityStandards e2e test Nov 1, 2023
@saschagrunert saschagrunert force-pushed the user-namespaces-serial-test branch 2 times, most recently from ac23fbe to 59570a2 Compare November 1, 2023 08:54
Copy link
Member

@rata rata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@SergeyKanzhelev
Copy link
Member

/assign

@bart0sh bart0sh moved this from Triage to Needs Reviewer in SIG Node PR Triage Nov 8, 2023
@@ -633,6 +634,39 @@ var _ = SIGDescribe("Security Context", func() {
})
})

var _ = SIGDescribe("User Namespaces for Pod Security Standards [Feature:UserNamespacesSupport] [Feature:UserNamespacesPodSecurityStandards] [LinuxOnly]", func() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should you use the newly added valid feature variable here (UserNamespacesPodSecurityStandards)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only [Feature:UserNamespacesPodSecurityStandards]? I was assuming that we use [Feature:UserNamespacesSupport] as well because other tests are referring to it, too.

Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 7, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 2d56b2d94bfd621ffd565d43d27765c0d3e0355d

Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@SergeyKanzhelev
Copy link
Member

/lgtm /approve

I thought this #123183 is already merged. But no, we need somebody from sig testing to approve this PR.

CC: @pohly @BenTheElder

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 15, 2024
@saschagrunert
Copy link
Member Author

Had to rebase on top of the latest master branch.

@saschagrunert
Copy link
Member Author

/retest

@pohly
Copy link
Contributor

pohly commented Feb 16, 2024

@saschagrunert: please fix these errors:

k8s.io/kubernetes/test/e2e/common/node/security_context.go:639: [Feature:UserNamespacesPodSecurityStandards] in plain text is deprecated and must be added through WithFeature(UserNamespacesPodSecurityStandards) instead
k8s.io/kubernetes/test/e2e/common/node/security_context.go:639: [Feature:UserNamespacesSupport] in plain text is deprecated and must be added through WithFeature(UserNamespacesSupport) instead 

You can check locally with hack/verify-e2e-suites.sh.

@@ -328,6 +328,9 @@ var (
// TODO: document the feature (owning SIG, when to use this feature for a test)
UserNamespacesSupport = framework.WithFeature(framework.ValidFeatures.Add("UserNamespacesSupport"))

// TODO: document the feature (owning SIG, when to use this feature for a test)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add documentation together the new feature.

@SergeyKanzhelev: would you have pointed out the same thing if I hadn't gotten involved?

I'm not sure how to ensure that developers do this without being reminded. Suggestions welcome 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SergeyKanzhelev: would you have pointed out the same thing if I hadn't gotten involved?

Yes, after the PR with TODO:s was merged.

Adding a e2e test for the functionality added in
kubernetes#118760.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@saschagrunert
Copy link
Member Author

@saschagrunert: please fix these errors:

k8s.io/kubernetes/test/e2e/common/node/security_context.go:639: [Feature:UserNamespacesPodSecurityStandards] in plain text is deprecated and must be added through WithFeature(UserNamespacesPodSecurityStandards) instead
k8s.io/kubernetes/test/e2e/common/node/security_context.go:639: [Feature:UserNamespacesSupport] in plain text is deprecated and must be added through WithFeature(UserNamespacesSupport) instead 

You can check locally with hack/verify-e2e-suites.sh.

Thank you for the hint, fixed as suggested

Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 28, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: bd7058dfccfdae42874f2be0cf2801851d327534

@SergeyKanzhelev SergeyKanzhelev moved this from PRs - Needs Approver to Done in SIG Node CI/Test Board Feb 28, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rata, saschagrunert, SergeyKanzhelev

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 28, 2024
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Feb 28, 2024

@saschagrunert: 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
pull-kubernetes-node-kubelet-serial-containerd e5829b0f7897eb941e5159409225361ff13d8f5a link false /test pull-kubernetes-node-kubelet-serial-containerd

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@rata
Copy link
Member

rata commented Feb 28, 2024

/retest

@k8s-ci-robot k8s-ci-robot merged commit 7ec1e1a into kubernetes:master Feb 28, 2024
16 checks passed
SIG Node PR Triage automation moved this from Needs Reviewer to Done Feb 28, 2024
@k8s-ci-robot k8s-ci-robot added this to the v1.30 milestone Feb 28, 2024
@saschagrunert saschagrunert deleted the user-namespaces-serial-test branch February 29, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Development

Successfully merging this pull request may close these issues.

None yet

6 participants