Skip to content

Conversation

@Horiodino
Copy link
Contributor

Description:
This Pr fixes the Target Allocator generated duplicated targets when DualStack (IPv4 and IPv6) EndpointSlices referencing for the same service.
This update added a logic to detect and skip duplicates based on a service & pod combination key, ensuring that each target is discovered only once per pod while preserving distinct targets across different pods or services.

Link to tracking Issue(s):

Testing:

  • Added unit tests , all existing e2e passes locally.

Documentation:

…nabled

Signed-off-by: Praful Khanduri <holiodin@gmail.com>
Signed-off-by: Praful Khanduri <holiodin@gmail.com>
Signed-off-by: Praful Khanduri <holiodin@gmail.com>
@Horiodino Horiodino requested a review from a team as a code owner November 12, 2025 12:45
@github-actions
Copy link
Contributor

github-actions bot commented Nov 12, 2025

E2E Test Results

 34 files  ±0  227 suites  ±0   1h 56m 59s ⏱️ - 4m 31s
 90 tests ±0   90 ✅ ±0  0 💤 ±0  0 ❌ ±0 
231 runs  ±0  231 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit a5f5396. ± Comparison against base commit 643592c.

♻️ This comment has been updated with latest results.

@Horiodino Horiodino marked this pull request as draft November 12, 2025 13:18
Signed-off-by: Praful Khanduri <holiodin@gmail.com>
Signed-off-by: Praful Khanduri <holiodin@gmail.com>
@Horiodino
Copy link
Contributor Author

cc @frzifus FYI, you can follow the discussion in the issue. I’ve paused this for now. If the proposed approach looks good, you can have some discussion with swiatekm ,then we will move ahead but the core problem still remains because Prometheus (via Prometheus Operator) defaults to the Endpoints role, while the Target Allocator currently uses EndpointSlice discovery (hard-coded).
This difference means TA will continue to surface dual-stack slices separately unless we explicitly handle it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Target Allocator Generate duplicated Target/Metrics when Service is Dual Stack

2 participants