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

NO-JIRA: Enforce EnsurePSANotPrivileged for 4.19 and later #5362

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Evan-Reilly
Copy link
Contributor

OpenShiftPodSecurityAdmission feature gate is not enabled by default in 4.18. We need to stop EnsurePSANotPrivileged in 4.18.

https://github.com/openshift/api/blob/release-4.18/features/features.go

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 9, 2025
@openshift-ci-robot
Copy link

@Evan-Reilly: This pull request explicitly references no jira issue.

In response to this:

OpenShiftPodSecurityAdmission feature gate is not enabled by default in 4.18. We need to stop EnsurePSANotPrivileged in 4.18.

https://github.com/openshift/api/blob/release-4.18/features/features.go

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added do-not-merge/needs-area needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 9, 2025
Copy link
Contributor

openshift-ci bot commented Jan 9, 2025

Hi @Evan-Reilly. Thanks for your PR.

I'm waiting for a openshift 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-sigs/prow repository.

@openshift-ci openshift-ci bot requested review from enxebre and hasueki January 9, 2025 19:14
@openshift-ci openshift-ci bot added area/testing Indicates the PR includes changes for e2e testing and removed do-not-merge/needs-area labels Jan 9, 2025
@sjenning
Copy link
Contributor

sjenning commented Jan 9, 2025

/ok-to-test
/approve

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 9, 2025
@sjenning
Copy link
Contributor

sjenning commented Jan 9, 2025

Bumping openshift/api isn't strictly required for this but we should do it as matter of code maintenance and release level synchronization so 👍

@sjenning
Copy link
Contributor

sjenning commented Jan 9, 2025

Looks like bumping k8s beyond what controller-runtime caused a compile time break

# sigs.k8s.io/controller-runtime/pkg/client/fake
vendor/sigs.k8s.io/controller-runtime/pkg/client/fake/client.go:858:29: cannot use c.tracker (variable of type versionedTracker) as "k8s.io/client-go/testing".ObjectTracker value in argument to dryPatch: versionedTracker does not implement "k8s.io/client-go/testing".ObjectTracker (wrong type for method Create)
		have Create("k8s.io/apimachinery/pkg/runtime/schema".GroupVersionResource, "k8s.io/apimachinery/pkg/runtime".Object, string) error
		want Create("k8s.io/apimachinery/pkg/runtime/schema".GroupVersionResource, "k8s.io/apimachinery/pkg/runtime".Object, string, ..."k8s.io/apimachinery/pkg/apis/meta/v1".CreateOptions) error
vendor/sigs.k8s.io/controller-runtime/pkg/client/fake/client.go:[87](https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_hypershift/5362/pull-ci-openshift-hypershift-main-images/1877442437773791232#1:build-log.txt%3A87)2:37: cannot use c.tracker (variable of type versionedTracker) as "k8s.io/client-go/testing".ObjectTracker value in argument to testing.ObjectReaction: versionedTracker does not implement "k8s.io/client-go/testing".ObjectTracker (wrong type for method Create)
		have Create("k8s.io/apimachinery/pkg/runtime/schema".GroupVersionResource, "k8s.io/apimachinery/pkg/runtime".Object, string) error
		want Create("k8s.io/apimachinery/pkg/runtime/schema".GroupVersionResource, "k8s.io/apimachinery/pkg/runtime".Object, string, ..."k8s.io/apimachinery/pkg/apis/meta/v1".CreateOptions) error
# sigs.k8s.io/controller-runtime/pkg/webhook/admission
vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/webhook.go:158:9: not enough arguments in call to fn
	have (interface{})
	want (context.Context, interface{})
# sigs.k8s.io/controller-runtime/pkg/internal/controller
vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:103:9: not enough arguments in call to fn
	have (interface{})
	want (context.Context, interface{})

We should break this bump out into its own PR since it seems we will need to bump controller-runtime as well. In the meantime, it is not required for this change. Just drop the commit.

@Evan-Reilly Evan-Reilly force-pushed the ensurePSANotPrivileged-4.19-and-later branch from 9fe90ac to 1fb2d19 Compare January 9, 2025 20:35
Initial change to enable us to move back to enforcing privileged PSA by default in 4.18
@Evan-Reilly Evan-Reilly force-pushed the ensurePSANotPrivileged-4.19-and-later branch from 1fb2d19 to 5d743c3 Compare January 9, 2025 20:38
Copy link
Contributor

@rtheis rtheis left a comment

Choose a reason for hiding this comment

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

/lgtm
/approved

@rtheis
Copy link
Contributor

rtheis commented Jan 10, 2025

/retest-required

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 10, 2025
Copy link
Contributor

openshift-ci bot commented Jan 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Evan-Reilly, rtheis, sjenning

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

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD e08020b and 2 for PR HEAD 5d743c3 in total

1 similar comment
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD e08020b and 2 for PR HEAD 5d743c3 in total

@rtheis
Copy link
Contributor

rtheis commented Jan 10, 2025

/retest-required

1 similar comment
@rtheis
Copy link
Contributor

rtheis commented Jan 10, 2025

/retest-required

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 2877c7a and 1 for PR HEAD 5d743c3 in total

@rtheis
Copy link
Contributor

rtheis commented Jan 11, 2025

/retest-required

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD a39bf24 and 0 for PR HEAD 5d743c3 in total

@openshift-ci-robot
Copy link

/hold

Revision 5d743c3 was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 11, 2025
@rtheis
Copy link
Contributor

rtheis commented Jan 11, 2025

/retest-required

@rtheis
Copy link
Contributor

rtheis commented Jan 11, 2025

/remove-hold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 11, 2025
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD a39bf24 and 2 for PR HEAD 5d743c3 in total

@rtheis
Copy link
Contributor

rtheis commented Jan 11, 2025

/retest-required

@rtheis
Copy link
Contributor

rtheis commented Jan 11, 2025

@Evan-Reilly one more test retry then I need you to take a look at the failures.

Copy link
Contributor

openshift-ci bot commented Jan 11, 2025

@Evan-Reilly: The following tests 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 5d743c3 link true /test e2e-aws
ci/prow/e2e-aks 5d743c3 link true /test e2e-aks

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.

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/testing Indicates the PR includes changes for e2e testing jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants