|
Ran
|
Jobs
1
|
Files
48
|
Run time
1min
|
Badge
README BADGES
|
travis-pro
Add named port support for NetworkPolicy service augmentation The controller previously did not handle named target ports when applying NetworkPolicy egress rules with service augmentation. This caused egress policies to fail for services using named ports, as the controller could not match named ports specified in NetworkPolicy rules against actual service endpoints. This commit adds tracking and resolution of named target ports and enforces stricter all-or-nothing port coverage semantics for service augmentation. Key changes: - Add namedPortServiceIndex for empty egress 'To' rules (no peer selectors) to track and resolve services with named target ports - For rules with peer selectors, resolve named ports directly from EndpointSlices during NetworkPolicy port processing - Change targetPort.ports from []int to map[int]bool to efficiently verify all endpoint IPs are covered by allowed ports - Enforce exclusion of services with incomplete endpoint coverage (previously not properly enforced) - Fix ruleCounter to generate unique HPP rule names when multiple named ports exist in same rule (prevents duplicate identifiers) - Support port range specifications that involve named ports Service augmentation now correctly handles named ports and ensures services are only augmented when all endpoint ports are covered. (cherry picked from commit e143c7d28)
125 of 265 new or added lines in 3 files covered. (47.17%)
5 existing lines in 3 files now uncovered.13420 of 21363 relevant lines covered (62.82%)
0.72 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 4 |
61.13 |
-0.65% | pkg/controller/pods.go |
| 55 |
57.62 |
-1.03% | pkg/controller/services.go |
| 81 |
77.32 |
-2.23% | pkg/controller/network_policy.go |
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 1 |
57.62 |
-1.03% | pkg/controller/services.go |
| 2 |
64.29 |
-0.15% | pkg/apicapi/apicapi.go |
| 2 |
77.32 |
-2.23% | pkg/controller/network_policy.go |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 11564.1 (DEFAULT_BRANCH=master GOPROXY=https://proxy.golang.org,https://goproxy.io,direct) | 48 |
62.82 |
Travis Job 11564.1 |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|