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

fix: when service type = clusterIP set the address to service.clusterIP #2582

Merged
merged 1 commit into from Feb 12, 2024

Conversation

ShyunnY
Copy link
Contributor

@ShyunnY ShyunnY commented Feb 9, 2024

What type of PR is this?
fix: when service type = clusterIP set the address to service.clusterIP

What this PR does / why we need it:

This commit solves the problem that when setting Service Type=ClusterIP and customizing the address for Gateway.spec.addresses, the address is incorrectly set to externalIPs.

I fixed it so that it can be correctly set to the ClusterIP

Which issue(s) this PR fixes:

Fixes #2166

@ShyunnY ShyunnY requested a review from a team as a code owner February 9, 2024 14:36
@ShyunnY ShyunnY changed the title fix: when service type = clusterIP set the address to service.clusterIP (#2166) fix: when service type = clusterIP set the address to service.clusterIP Feb 9, 2024
Copy link

codecov bot commented Feb 9, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (d44f4be) 64.11% compared to head (ddc8097) 64.03%.
Report is 2 commits behind head on main.

Files Patch % Lines
internal/status/gateway.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2582      +/-   ##
==========================================
- Coverage   64.11%   64.03%   -0.08%     
==========================================
  Files         119      119              
  Lines       18561    18640      +79     
==========================================
+ Hits        11901    11937      +36     
- Misses       5880     5918      +38     
- Partials      780      785       +5     

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

@arkodg
Copy link
Contributor

arkodg commented Feb 9, 2024

we'll also need to update the logic in

if len(gw.Spec.Addresses) > 0 {
to make sure that the ClusterIP is updated in the status
the if/else will need to be refactored a bit

@ShyunnY
Copy link
Contributor Author

ShyunnY commented Feb 10, 2024

we'll also need to update the logic in

if len(gw.Spec.Addresses) > 0 {

to make sure that the ClusterIP is updated in the status
the if/else will need to be refactored a bit

Yes, I've made changes

Copy link
Contributor

@shawnh2 shawnh2 left a comment

Choose a reason for hiding this comment

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

lgtm, thanks

one more thing, it's not recommended to merge code from your main branch, so next time please create a new branch, thanks

@shawnh2
Copy link
Contributor

shawnh2 commented Feb 11, 2024

/retest

@zirain zirain merged commit bb59484 into envoyproxy:main Feb 12, 2024
17 checks passed
vixns pushed a commit to vixns/gateway that referenced this pull request Feb 18, 2024
…IP (envoyproxy#2582)

when service type = clusterIP set the address to service.clusterIP (envoyproxy#2166)

Signed-off-by: ShyunnY <1147212064@qq.com>
Signed-off-by: Stéphane Cottin <stephane.cottin@vixns.com>
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.

If Service Type is ClusterIP set spec.addresses.value into ClusterIP
4 participants