feat: add TCP and UDP support to remoteProtocol on Allow entries#2641
feat: add TCP and UDP support to remoteProtocol on Allow entries#2641chance-coleman merged 13 commits intomainfrom
Conversation
There was a problem hiding this comment.
Lula Compliance Overview
Please review the changes to ensure they meet compliance standards.
Reviewed Changes
Lula reviewed 18 files changed that affect compliance.
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/policies.ts |
51–324 |
src/pepr/operator/controllers/network/policies.ts |
50–325 |
src/pepr/operator/controllers/network/policies.ts |
49–326 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: 11127d467e257783c8df0b08dd743301f6a3f58a6a3b1c023d7434cd004a684b
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: 9bbbc9e58756dd0a683ef57ca9ed27f283173b57ae421351c47f93e01bd3e863
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: 6dc956a141c2e89fad454bf40d89114c9094a8eaa1b55a50a37f72f753c495b6
Tip: Customize your compliance reviews with Lula.
Superseded by a new Lula compliance review.
There was a problem hiding this comment.
Lula Compliance Overview
Please review the changes to ensure they meet compliance standards.
Reviewed Changes
Lula reviewed 19 files changed that affect compliance.
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/policies.ts |
51–326 |
src/pepr/operator/controllers/network/policies.ts |
50–327 |
src/pepr/operator/controllers/network/policies.ts |
49–328 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: 2fa9c2bb37e7214fb810536d08c23a9623b0278b1a83ba3ff0f35a37733435a4
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: d57629b263d33bdc4bafc295133cb6d2b29da6e8a1eac3597f6ecbc007694c73
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: adb86ee538a40632650126eb8fc37a8720a881256840013d549067dfbbd30bdf
Tip: Customize your compliance reviews with Lula.
Greptile SummaryThis PR extends Confidence Score: 4/5Safe to merge; all findings are P2 quality-of-life issues with no functional defects in the changed paths. No P0 or P1 issues found. Three P2 issues: a placeholder TODO issue reference, a missing UDP+CloudMetadata validator test, and a timing-sensitive e2e test that retry:2 partially mitigates. Core logic in the validator, generator, and policy injector is sound and well-covered by unit tests. test/vitest/network.spec.ts (UDP timing), src/pepr/operator/crd/validators/package-validator.spec.ts (CloudMetadata gap), src/pepr/operator/crd/sources/package/v1alpha1.ts (TODO placeholder). Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Allow entry with remoteProtocol] --> B{Validator}
B -->|UDP + remoteHost| C[DENY]
B -->|UDP + KubeAPI/KubeNodes/CloudMetadata| D[DENY]
B -->|TCP/UDP + no port| E[DENY]
B -->|TLS/HTTP + no remoteHost| F[DENY]
B -->|remoteHost/TLS/HTTP + Ingress| G[DENY]
B -->|valid| H[generate.ts]
H --> I{remoteProtocol?}
I -->|TCP| J[ports with protocol: TCP]
I -->|UDP| K[ports with protocol: UDP]
I -->|TLS/HTTP/undefined| L[ports without protocol field]
J --> M[policies.ts]
K --> M
L --> M
M --> N{all ports UDP?}
N -->|yes| O[skip 15008 injection]
N -->|no| P[inject port 15008 with protocol: TCP]
H --> Q{remoteHost set?}
Q -->|yes + TLS/HTTP/TCP| R[egress-ports.ts → Istio ServiceEntry]
Q -->|no| S[NetworkPolicy only]
|
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Superseded by a new Lula compliance review.
There was a problem hiding this comment.
Lula Compliance Overview
Please review the changes to ensure they meet compliance standards.
Reviewed Changes
Lula reviewed 19 files changed that affect compliance.
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/policies.ts |
51–326 |
src/pepr/operator/controllers/network/policies.ts |
50–327 |
src/pepr/operator/controllers/network/policies.ts |
49–328 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: 2fa9c2bb37e7214fb810536d08c23a9623b0278b1a83ba3ff0f35a37733435a4
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: d57629b263d33bdc4bafc295133cb6d2b29da6e8a1eac3597f6ecbc007694c73
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: adb86ee538a40632650126eb8fc37a8720a881256840013d549067dfbbd30bdf
Tip: Customize your compliance reviews with Lula.
Superseded by a new Lula compliance review.
There was a problem hiding this comment.
Lula Compliance Overview
Please review the changes to ensure they meet compliance standards.
Reviewed Changes
Lula reviewed 19 files changed that affect compliance.
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/policies.ts |
51–326 |
src/pepr/operator/controllers/network/policies.ts |
50–327 |
src/pepr/operator/controllers/network/policies.ts |
49–328 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: 2fa9c2bb37e7214fb810536d08c23a9623b0278b1a83ba3ff0f35a37733435a4
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: d57629b263d33bdc4bafc295133cb6d2b29da6e8a1eac3597f6ecbc007694c73
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: adb86ee538a40632650126eb8fc37a8720a881256840013d549067dfbbd30bdf
Tip: Customize your compliance reviews with Lula.
Superseded by a new Lula compliance review.
There was a problem hiding this comment.
Lula Compliance Overview
Please review the changes to ensure they meet compliance standards.
Reviewed Changes
Lula reviewed 20 files changed that affect compliance.
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/policies.ts |
51–326 |
src/pepr/operator/controllers/network/policies.ts |
50–327 |
src/pepr/operator/controllers/network/policies.ts |
49–328 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: 2fa9c2bb37e7214fb810536d08c23a9623b0278b1a83ba3ff0f35a37733435a4
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: d57629b263d33bdc4bafc295133cb6d2b29da6e8a1eac3597f6ecbc007694c73
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: adb86ee538a40632650126eb8fc37a8720a881256840013d549067dfbbd30bdf
Tip: Customize your compliance reviews with Lula.
Superseded by a new Lula compliance review.
There was a problem hiding this comment.
Lula Compliance Overview
Please review the changes to ensure they meet compliance standards.
Reviewed Changes
Lula reviewed 21 files changed that affect compliance.
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/policies.ts |
51–326 |
src/pepr/operator/controllers/network/policies.ts |
50–327 |
src/pepr/operator/controllers/network/policies.ts |
49–328 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: 2fa9c2bb37e7214fb810536d08c23a9623b0278b1a83ba3ff0f35a37733435a4
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: d57629b263d33bdc4bafc295133cb6d2b29da6e8a1eac3597f6ecbc007694c73
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: adb86ee538a40632650126eb8fc37a8720a881256840013d549067dfbbd30bdf
Tip: Customize your compliance reviews with Lula.
joelmccoy
left a comment
There was a problem hiding this comment.
Mostly looking good! I found possibly two bugs we want to address? And a couple other small comments for consideration.
Superseded by a new Lula compliance review.
There was a problem hiding this comment.
Lula Compliance Overview
Please review the changes to ensure they meet compliance standards.
Reviewed Changes
Lula reviewed 22 files changed that affect compliance.
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/policies.ts |
51–326 |
src/pepr/operator/controllers/network/policies.ts |
50–327 |
src/pepr/operator/controllers/network/policies.ts |
49–328 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: 2fa9c2bb37e7214fb810536d08c23a9623b0278b1a83ba3ff0f35a37733435a4
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: d57629b263d33bdc4bafc295133cb6d2b29da6e8a1eac3597f6ecbc007694c73
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: adb86ee538a40632650126eb8fc37a8720a881256840013d549067dfbbd30bdf
Tip: Customize your compliance reviews with Lula.
Superseded by a new Lula compliance review.
There was a problem hiding this comment.
Lula Compliance Overview
Please review the changes to ensure they meet compliance standards.
Reviewed Changes
Lula reviewed 22 files changed that affect compliance.
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/policies.ts |
51–326 |
src/pepr/operator/controllers/network/policies.ts |
50–327 |
src/pepr/operator/controllers/network/policies.ts |
49–328 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: 2fa9c2bb37e7214fb810536d08c23a9623b0278b1a83ba3ff0f35a37733435a4
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: d57629b263d33bdc4bafc295133cb6d2b29da6e8a1eac3597f6ecbc007694c73
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: adb86ee538a40632650126eb8fc37a8720a881256840013d549067dfbbd30bdf
Tip: Customize your compliance reviews with Lula.
mjnagel
left a comment
There was a problem hiding this comment.
Two edge cases I identified while testing a variety of packages - still iterating a bit locally but in both of these cases we are provisioning resources we don't need to for UDP (since authpols are TCP handling only).
Superseded by a new Lula compliance review.
There was a problem hiding this comment.
Lula Compliance Overview
Please review the changes to ensure they meet compliance standards.
Reviewed Changes
Lula reviewed 22 files changed that affect compliance.
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/policies.ts |
51–326 |
src/pepr/operator/controllers/network/policies.ts |
50–327 |
src/pepr/operator/controllers/network/policies.ts |
49–328 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: 2fa9c2bb37e7214fb810536d08c23a9623b0278b1a83ba3ff0f35a37733435a4
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: d57629b263d33bdc4bafc295133cb6d2b29da6e8a1eac3597f6ecbc007694c73
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: adb86ee538a40632650126eb8fc37a8720a881256840013d549067dfbbd30bdf
Tip: Customize your compliance reviews with Lula.
Superseded by a new Lula compliance review.
There was a problem hiding this comment.
Lula Compliance Overview
Please review the changes to ensure they meet compliance standards.
Reviewed Changes
Lula reviewed 25 files changed that affect compliance.
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/authorizationPolicies.ts |
253–466 |
src/pepr/operator/controllers/network/authorizationPolicies.ts |
252–467 |
src/pepr/operator/controllers/network/authorizationPolicies.ts |
251–468 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: e9ab1d7eb328f280c2c0df94e25df2f42ecafd32adfe36c7d591f7325f9966d6
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: d5828c8768776057a92f6a65601324c0f252baeacbcaa0da0bb5141f6c9a0794
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: 719d280387251fd6ae4210d6c33fa49998567db0e5f6982dfe1cd56e8c97b003
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/policies.ts |
51–326 |
src/pepr/operator/controllers/network/policies.ts |
50–327 |
src/pepr/operator/controllers/network/policies.ts |
49–328 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: 2fa9c2bb37e7214fb810536d08c23a9623b0278b1a83ba3ff0f35a37733435a4
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: d57629b263d33bdc4bafc295133cb6d2b29da6e8a1eac3597f6ecbc007694c73
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: adb86ee538a40632650126eb8fc37a8720a881256840013d549067dfbbd30bdf
Tip: Customize your compliance reviews with Lula.
…remoteProtocol description guidance
Superseded by a new Lula compliance review.
There was a problem hiding this comment.
Lula Compliance Overview
Please review the changes to ensure they meet compliance standards.
Reviewed Changes
Lula reviewed 25 files changed that affect compliance.
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/authorizationPolicies.ts |
253–466 |
src/pepr/operator/controllers/network/authorizationPolicies.ts |
252–467 |
src/pepr/operator/controllers/network/authorizationPolicies.ts |
251–468 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: e9ab1d7eb328f280c2c0df94e25df2f42ecafd32adfe36c7d591f7325f9966d6
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: d5828c8768776057a92f6a65601324c0f252baeacbcaa0da0bb5141f6c9a0794
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: 719d280387251fd6ae4210d6c33fa49998567db0e5f6982dfe1cd56e8c97b003
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/policies.ts |
51–326 |
src/pepr/operator/controllers/network/policies.ts |
50–327 |
src/pepr/operator/controllers/network/policies.ts |
49–328 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: 2fa9c2bb37e7214fb810536d08c23a9623b0278b1a83ba3ff0f35a37733435a4
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: d57629b263d33bdc4bafc295133cb6d2b29da6e8a1eac3597f6ecbc007694c73
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: adb86ee538a40632650126eb8fc37a8720a881256840013d549067dfbbd30bdf
Tip: Customize your compliance reviews with Lula.
Superseded by a new Lula compliance review.
There was a problem hiding this comment.
Lula Compliance Overview
Please review the changes to ensure they meet compliance standards.
Reviewed Changes
Lula reviewed 25 files changed that affect compliance.
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/authorizationPolicies.ts |
253–466 |
src/pepr/operator/controllers/network/authorizationPolicies.ts |
252–467 |
src/pepr/operator/controllers/network/authorizationPolicies.ts |
251–468 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: e9ab1d7eb328f280c2c0df94e25df2f42ecafd32adfe36c7d591f7325f9966d6
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: d5828c8768776057a92f6a65601324c0f252baeacbcaa0da0bb5141f6c9a0794
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: 719d280387251fd6ae4210d6c33fa49998567db0e5f6982dfe1cd56e8c97b003
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/policies.ts |
51–326 |
src/pepr/operator/controllers/network/policies.ts |
50–327 |
src/pepr/operator/controllers/network/policies.ts |
49–328 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: 2fa9c2bb37e7214fb810536d08c23a9623b0278b1a83ba3ff0f35a37733435a4
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: d57629b263d33bdc4bafc295133cb6d2b29da6e8a1eac3597f6ecbc007694c73
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: adb86ee538a40632650126eb8fc37a8720a881256840013d549067dfbbd30bdf
Tip: Customize your compliance reviews with Lula.
mjnagel
left a comment
There was a problem hiding this comment.
LGTM overall - I had a few final nits reviewing the diffs but everything seemed to function as expected in testing.
…rk policy generation
Superseded by a new Lula compliance review.
There was a problem hiding this comment.
Lula Compliance Overview
Please review the changes to ensure they meet compliance standards.
Reviewed Changes
Lula reviewed 25 files changed that affect compliance.
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/authorizationPolicies.ts |
253–466 |
src/pepr/operator/controllers/network/authorizationPolicies.ts |
252–467 |
src/pepr/operator/controllers/network/authorizationPolicies.ts |
251–468 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: e2bce28b251739d908189693e42467e04a0eb7fc45a9915520e4010cf1302206
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: 4b591059c53d90625c0db79a89836f5826920b9f9abd991c2d8eeda0d88f5370
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: 1b073b3c295aa5c3d104627fe8af24f6f1986adb797e4b6a778607c046b634c8
| File | Lines Changed |
|---|---|
src/pepr/operator/controllers/network/policies.ts |
51–324 |
src/pepr/operator/controllers/network/policies.ts |
50–325 |
src/pepr/operator/controllers/network/policies.ts |
49–326 |
UUID: a9d420a8-1ad2-479f-a438-aa4ca0f57473
sha256: cc965b2b6a25d8f9685b9de987bf95b24963454ca342f92810e06147d590cd35
UUID: cd540e07-153b-424c-90e0-c0daec56b18f
sha256: 482082adba4f947f8440c61f2f89de991e8ca850e52e318de6522b02b9edc4cd
UUID: cd540e07-153b-424c-90e0-c0daec56b16a
sha256: 36ecc66c56480f9387d67030ebb23a8f27e77cc24f4833b2edffe949538b1e32
Tip: Customize your compliance reviews with Lula.
joelmccoy
left a comment
There was a problem hiding this comment.
LGTM - validated the edge cases we identified locally and things seem to working great
unrelated to lula compliance
Description
Extends the remoteProtocol field on the Allow type to accept TCP and UDP
alongside the existing TLS and HTTP values.
ports; TLS and HTTP remain Istio ServiceEntry concerns only
remoteHost, TCP/UDP without a port, UDP with KubeAPI/KubeNodes/CloudMetadata)
Related Issue
Fixes Core-481
Type of change
Steps to Validate
npx vitest runuds run -f tasks/test.yaml e2e-testsThis deploys the test resources (including the new UDP echo server/client pods), runs the full vitest E2E suite, then removes test resources. The two new tests to watch are:
Checklist before merging