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

feat: Gateway Discovery produce DNS names instead of IP addresses #4044

Merged
merged 1 commit into from
May 22, 2023

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented May 19, 2023

What this PR does / why we need it:

This changes the implementation Gateway Discovery in a way that it now produces DNS names instead of IP address of Kong's pods.

There are 2 formats that this implementation can use:

  • pod-ip-address.service-name.my-namespace.svc - when a Kong's EndpointSlice that we're trying to convert into an address (that will be used for sending the configuration) contains an owner reference of type Service then we use that reference to build the DNS name
  • pod-ip-address.my-namespace.pod when that Service owner reference is missing

Ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/

Which issue this PR fixes:

Closes: #3934

Special notes for your reviewer:

This will be required for Kong Gateway Operator to use TLS verification.

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

@pmalek pmalek added the area/feature New feature or request label May 19, 2023
@pmalek pmalek added this to the KIC v2.10.0 milestone May 19, 2023
@pmalek pmalek self-assigned this May 19, 2023
@pmalek pmalek force-pushed the gateway-discovery-dns-names-instead-of-ips branch from 254bf5b to 7fe7100 Compare May 19, 2023 12:13
@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Patch coverage: 100.0% and no project coverage change.

Comparison is base (6fdf307) 59.9% compared to head (7fe7100) 59.9%.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #4044   +/-   ##
=====================================
  Coverage   59.9%   59.9%           
=====================================
  Files        149     149           
  Lines      16462   16481   +19     
=====================================
+ Hits        9863    9882   +19     
- Misses      5971    5972    +1     
+ Partials     628     627    -1     
Impacted Files Coverage Δ
internal/adminapi/endpoints.go 90.1% <100.0%> (+3.0%) ⬆️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pmalek pmalek marked this pull request as ready for review May 19, 2023 14:52
@pmalek pmalek requested a review from a team as a code owner May 19, 2023 14:52
@pmalek pmalek added the ci/run-e2e Trigger e2e test run from PR label May 19, 2023
@team-k8s-bot
Copy link
Collaborator

E2E (targeted) tests were started at https://github.com/Kong/kubernetes-ingress-controller/actions/runs/5025607446

@team-k8s-bot team-k8s-bot removed the ci/run-e2e Trigger e2e test run from PR label May 19, 2023
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 19, 2023 15:35 — with GitHub Actions Inactive
@randmonkey randmonkey merged commit 523abce into main May 22, 2023
193 checks passed
@randmonkey randmonkey deleted the gateway-discovery-dns-names-instead-of-ips branch May 22, 2023 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/feature New feature or request size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gateway Discovery producing IPs, not domain names hence making TLS impossible without skipping verification
3 participants