-
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] Implement host ports check #103314
Conversation
/triage accepted |
staging/src/k8s.io/pod-security-admission/test/fixtures_hostPorts.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/pod-security-admission/policy/check_hostPorts.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/pod-security-admission/policy/check_hostPorts.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/pod-security-admission/test/fixtures_hostPorts.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/pod-security-admission/test/fixtures_hostPorts.go
Outdated
Show resolved
Hide resolved
thanks for the quick turnaround! |
staging/src/k8s.io/pod-security-admission/test/fixtures_hostPorts.go
Outdated
Show resolved
Hide resolved
once the test fixtures get trimmed down, looks like this also needs |
9d34e59
to
9047048
Compare
Applies to baseline policy. Since host ports is a niche feature, usage of any host ports is forbidden for either app container or init container Refactored two fixtures into one for non-host ports in app container and init container Fixes based on PR feedback - remove no-op if check, - use correct Int32 list for hostPort - remove ensureHostPorts func Removed redundant fixtures as per PR feedback Removed minimal valid pod Updates after gofmt
@liggitt Trimmed the fixtures, ran gofmt, regenerated fixtures, ran tests again (passing), squashed and rebased to single commit. Waiting for CI jobs now to pass |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, PushkarJ 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 |
/priority important-soon |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Applies to baseline policy. Since host ports is a niche feature, usage of any host ports is forbidden for either app container or init container
Which issue(s) this PR fixes:
Fixes #103199
Special notes for your reviewer:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
/sig auth security