-
Notifications
You must be signed in to change notification settings - Fork 40.3k
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
[PodSecurity] Expand unit test coverage and fix error cases #106017
Conversation
@tallclair: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tallclair 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 |
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.
a few nits, lgtm overall
staging/src/k8s.io/pod-security-admission/admission/admission_test.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/pod-security-admission/admission/admission.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/pod-security-admission/admission/admission.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/pod-security-admission/admission/admission.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/pod-security-admission/admission/admission.go
Outdated
Show resolved
Hide resolved
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.
Feedback addressed. Also refactored error response helpers a bit (including moving to admission/response.go
)
staging/src/k8s.io/pod-security-admission/admission/admission_test.go
Outdated
Show resolved
Hide resolved
This will need to be rebased once #105898 merges. Feel free to hold off on further review until I've had a chance to resolve that. |
0005929
to
3897ea8
Compare
Rebased, and added additional coverage for error & exemption metrics. Also added a shared response for the privileged short-circuit case that includes the |
/retest |
sigh... one last rebase needed |
rebased |
/lgtm |
What type of PR is this?
/kind bug
What this PR does / why we need it:
ValidatePod
, exercising all possible response paths.ValidatePodController
testserror
audit annotation when an error prevented normal policy evaluation.Special notes for your reviewer:
This PR has overlap with several in-flight PRs, so conflicts will need to be resolved depending on which merges first.
Does this PR introduce a user-facing change?
/sig auth
/assign @liggitt
/milestone v1.23