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: remove HTTP ports from discovery config #5043

Merged
merged 2 commits into from
Nov 2, 2023
Merged

Conversation

rainest
Copy link
Contributor

@rainest rainest commented Oct 31, 2023

What this PR does / why we need it:

Remove the HTTP port names from the default list of accepted Service ports for discovery.

Which issue this PR fixes:

Discovery is hard-coded to support HTTPS only, and would unsuccessfully attempt to use HTTP ports when available. The client generator code builds clients for all admissable port names and has no filters by protocol.

In DB mode this could prevent the controller from talking to Kong at all if it chose an HTTP port from the list, as it only selects a single client from the list (at least as of the current draft in #4828).

Special notes for your reviewer:

AFAIK there should not be any reason to add HTTP support for discovery. I had only been using it to simplify manual requests in a debugging session.

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@rainest rainest requested a review from a team as a code owner October 31, 2023 19:16
Remove the HTTP port names from the default list of accepted Service
ports for discovery. Discovery is hard-coded to support HTTPS only, and
would unsuccessfully attempt to use HTTP ports when available. In DB
mode this could prevent the controller from talking to Kong at all if it
chose an HTTP port from the list.
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0e71283) 75.4% compared to head (6f25a2b) 75.6%.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #5043     +/-   ##
=======================================
+ Coverage   75.4%   75.6%   +0.1%     
=======================================
  Files        167     167             
  Lines      18881   18881             
=======================================
+ Hits       14253   14276     +23     
+ Misses      3796    3781     -15     
+ Partials     832     824      -8     
Files Coverage Δ
internal/manager/config.go 93.3% <100.0%> (ø)

... and 4 files with indirect coverage changes

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

Copy link
Contributor

@pangruoran pangruoran left a comment

Choose a reason for hiding this comment

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

It makes sense, since this is the port for communication between components, it is okay to just keep HTTPS

@rainest rainest enabled auto-merge (squash) November 1, 2023 20:28
@rainest rainest merged commit 34b5268 into main Nov 2, 2023
45 checks passed
@rainest rainest deleted the chore/admin-svc-names branch November 2, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants