Add e2e test: NetworkPolicy default-deny blocks LoadBalancer Local externalTrafficPolicy ingress - #141764
Add e2e test: NetworkPolicy default-deny blocks LoadBalancer Local externalTrafficPolicy ingress#141764sanyamk23 wants to merge 1 commit into
Conversation
|
|
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 DetailsInstructions 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. |
|
Hi @sanyamk23. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sanyamk23 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
7de6fab to
f796ce5
Compare
Adds a test that validates a default-deny ingress NetworkPolicy blocks external ingress even when a LoadBalancer service has externalTrafficPolicy=Local (which preserves client source IP). Follows the pattern of existing netpol tests: creates a LoadBalancer via framework.NewTestJig/CreateOnlyLocalLoadBalancerService, applies a default-deny ingress policy, then verifies internal cluster connectivity is unaffected while external ingress is blocked by the NetworkPolicy. Fixes kubernetes#114369
f796ce5 to
245e938
Compare
|
Invalid commit message issues detected Invalid commit messagesKeywords which can automatically close issues and hashtag(#) mentions are not allowed.
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. |
Add e2e test: NetworkPolicy default-deny blocks LoadBalancer Local externalTrafficPolicy ingress
Summary
Adds an e2e test that validates a default-deny ingress NetworkPolicy blocks
external ingress traffic even when a LoadBalancer service has
externalTrafficPolicy=Local(which preserves client source IP).What this tests
externalTrafficPolicy=Localusing the existing TestJig helpery/acan reachx/a)Why this matters
When
externalTrafficPolicy=Localis set on a LoadBalancer, traffic from theexternal client arrives at the node-local endpoint without SNAT. Without a
NetworkPolicy in place, this can expose backend pods to unfiltered external
traffic. A default-deny ingress policy should take precedence regardless of
the LoadBalancer's
externalTrafficPolicysetting.Fixes #114369
Release note