Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interface: update traffic manager APIs to support splitting weight behind serviceImport #233

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zhiying-lin
Copy link
Contributor

What type of PR is this?

/kind feature
/kind api-change

What this PR does / why we need it:

  • add resource id in the status of endpoint and profile
  • update weight to follow gateway api. Default to 1 and allow for 0.
  • display the original weight from the cluster in the endpoint
  • add weight on the serviceExport

Which issue(s) this PR fixes:

Fixes #

Requirements:

How has this code been tested

Special notes for your reviewer

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 12 changed files in this pull request and generated 2 comments.

Files not reviewed (7)
  • api/v1alpha1/internalserviceexport_types.go: Evaluated as low risk
  • api/v1alpha1/serviceexport_types.go: Evaluated as low risk
  • api/v1alpha1/trafficmanagerbackend_types.go: Evaluated as low risk
  • api/v1alpha1/trafficmanagerprofile_types.go: Evaluated as low risk
  • api/v1alpha1/zz_generated.deepcopy.go: Evaluated as low risk
  • config/crd/bases/networking.fleet.azure.com_internalserviceexports.yaml: Evaluated as low risk
  • config/crd/bases/networking.fleet.azure.com_serviceexports.yaml: Evaluated as low risk
Comments suppressed due to low confidence (2)

pkg/controllers/hub/trafficmanagerbackend/controller_integration_test.go:761

  • Ensure that the new 'From' field and weight calculations are covered by integration tests.
Endpoints: []fleetnetv1alpha1.TrafficManagerEndpointStatus{

pkg/controllers/hub/trafficmanagerbackend/controller.go:516

  • Changing the parameter type from a pointer to a struct might cause unintended side effects. Ensure that this change is intentional and doesn't lead to performance issues or unexpected behavior.
func buildAcceptedEndpointStatus(endpoint *armtrafficmanager.Endpoint, cluster fleetnetv1alpha1.ClusterStatus) fleetnetv1alpha1.TrafficManagerEndpointStatus {

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 79.88%. Comparing base (5465567) to head (47ddf4c).

Files with missing lines Patch % Lines
...ontrollers/hub/trafficmanagerbackend/controller.go 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #233      +/-   ##
==========================================
+ Coverage   79.66%   79.88%   +0.21%     
==========================================
  Files          27       27              
  Lines        3840     3842       +2     
==========================================
+ Hits         3059     3069      +10     
+ Misses        625      618       -7     
+ Partials      156      155       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

2 participants