Skip to content

Conversation

@andrefrco
Copy link
Contributor

Description:

Add TrafficDistribution field to OpenTelemetryCommonFields which is inherited by OpenTelemetryCollector and TargetAllocator. This field allows setting the traffic distribution policy for Kubernetes Services created by these resources.

Link to tracking Issue(s):

Testing:

  • Added unit tests for TrafficDistribution field in Service generation.
  • Manual tests creating OpenTelemetryCollector and TargetAllocator locally.
  • Should we create an e2e test specifically for TrafficDistribution functionality?

Documentation:

  • Added TrafficDistribution field to OpenTelemetryCollector and TargetAllocator

@andrefrco andrefrco requested a review from a team as a code owner August 25, 2025 02:19
@swiatekm
Copy link
Contributor

@andrefrco you can add this to one of the existing E2E tests, it doesn't merit its own full tests. Could you also rebase on main and run make update to remove conflicts with the generated manifests? Otherwise, your change looks good to me.

@frzifus frzifus requested a review from swiatekm September 3, 2025 21:04
@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

E2E Test Results

 34 files  ±0  221 suites  ±0   2h 0m 35s ⏱️ - 6m 26s
 88 tests ±0   88 ✅ ±0  0 💤 ±0  0 ❌ ±0 
225 runs  ±0  225 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit a394a0e. ± Comparison against base commit a61af39.

♻️ This comment has been updated with latest results.

@swiatekm
Copy link
Contributor

swiatekm commented Sep 8, 2025

@andrefrco the e2e test fails on K8s 1.25, which I suspect means that TrafficDistribution isn't supported on that version. You'll need to check the K8s version in the test to account for this. This is done in a few other E2E tests, if you're not sure how to do it in chainsaw.

@andrefrco andrefrco force-pushed the feat/traffic-distribution-support branch from 9ef1428 to ab87977 Compare September 10, 2025 23:23
@andrefrco andrefrco force-pushed the feat/traffic-distribution-support branch from 643bc55 to 1e3b3c3 Compare September 11, 2025 13:40
…TargetAllocator Services

Add TrafficDistribution field to OpenTelemetryCommonFields which is inherited by OpenTelemetryCollector and TargetAllocator. This field allows setting the traffic distribution policy for Kubernetes Services created by these resources.

Signed-off-by: andrefrco <[email protected]>
@andrefrco andrefrco force-pushed the feat/traffic-distribution-support branch from 1e3b3c3 to a394a0e Compare September 11, 2025 13:45
@andrefrco
Copy link
Contributor Author

andrefrco commented Sep 11, 2025

@andrefrco the e2e test fails on K8s 1.25, which I suspect means that TrafficDistribution isn't supported on that version. You'll need to check the K8s version in the test to account for this. This is done in a few other E2E tests, if you're not sure how to do it in chainsaw.

I've updated the test to conditionally check TrafficDistribution based on k8s version. Should be good to go now, thanks for your patience.

Quick question: we don't need to check if the field exists in the k8s version, do we? It just gets ignored if it's not supported.

Copy link
Contributor

@swiatekm swiatekm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @andrefrco if you can regenerate the manifests again by running make update, we should be good to merge.

@frzifus frzifus enabled auto-merge (squash) September 14, 2025 22:03
@frzifus frzifus merged commit 4542450 into open-telemetry:main Sep 14, 2025
48 checks passed
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.

Support TrafficDistribution for OpenTelemetryCollector Services

4 participants