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: deprecate --gateway-discovery-dns-strategy - make discovery always work #7033

Merged
merged 4 commits into from
Jan 29, 2025

Conversation

programmer04
Copy link
Member

@programmer04 programmer04 commented Jan 24, 2025

What this PR does / why we need it:

Streamline usage of KIC by deprecating --gateway-discovery-dns-strategy. Do not rely on DNS that is in a cluster, but use IP addresses directly to connect to Pods with Kong Gateway and leverage TLSServerName for certificate verification. With such a setup, it works out of the box in any environment. The problematic one was Standard GKE, which uses kube-dns, see the respective issue kubernetes/dns#633 the proposed solution works on such an environment. The flag is left and marked as deprecated to not break existing deployments, but the passed option is meaningless.

Which issue this PR fixes:

Part of Kong/gateway-operator#179 actual fix for KGO will be when it starts using KIC v3.5.x

Special notes for your reviewer:

Testing

  • The image build from this branch is available here: europe-docker.pkg.dev/k8s-team-playground/skaffold/kic:v3.4.0-91-g38279e778 (ARM64 and AMD64 in a public registry.

In internal/manager/config.go:345 sentence this setting is deprecated... starts lowercase on purpose, because it will be concatenated with Flag --gateway-discovery-dns-strategy has been deprecated, automatically.

Some e2e tests fail, but it's something different than touched in this PR.

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

@programmer04 programmer04 added the area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. label Jan 24, 2025
@programmer04 programmer04 added this to the KIC v3.5.x milestone Jan 24, 2025
@programmer04 programmer04 self-assigned this Jan 24, 2025
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 95.31250% with 3 lines in your changes missing coverage. Please review.

Project coverage is 76.7%. Comparing base (d4d18a4) to head (1ceee05).
Report is 50 commits behind head on main.

Files with missing lines Patch % Lines
internal/adminapi/kong.go 70.0% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #7033     +/-   ##
=======================================
- Coverage   76.9%   76.7%   -0.2%     
=======================================
  Files        214     213      -1     
  Lines      25169   25004    -165     
=======================================
- Hits       19356   19181    -175     
- Misses      4794    4817     +23     
+ Partials    1019    1006     -13     

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

@programmer04 programmer04 changed the title feat: deprecate --gateway-discovery-dns-strategy make resolution always work feat: deprecate --gateway-discovery-dns-strategy - make resolution always work Jan 24, 2025
@programmer04 programmer04 added the ci/run-e2e Trigger e2e test run from PR label Jan 24, 2025
@team-k8s-bot team-k8s-bot removed the ci/run-e2e Trigger e2e test run from PR label Jan 24, 2025
@Kong Kong deleted a comment from team-k8s-bot Jan 27, 2025
@programmer04 programmer04 added the ci/run-e2e Trigger e2e test run from PR label Jan 27, 2025
@team-k8s-bot team-k8s-bot removed the ci/run-e2e Trigger e2e test run from PR label Jan 27, 2025
@programmer04 programmer04 force-pushed the resolve-to branch 3 times, most recently from 385ef00 to 612ec54 Compare January 28, 2025 13:23
@Kong Kong deleted a comment from team-k8s-bot Jan 28, 2025
@programmer04 programmer04 added the ci/run-e2e Trigger e2e test run from PR label Jan 28, 2025
@team-k8s-bot
Copy link
Collaborator

E2E (targeted) tests with KIND-based clusters were started at https://github.com/Kong/kubernetes-ingress-controller/actions/runs/13011710622

@team-k8s-bot team-k8s-bot removed the ci/run-e2e Trigger e2e test run from PR label Jan 28, 2025
@programmer04 programmer04 changed the title feat: deprecate --gateway-discovery-dns-strategy - make resolution always work feat: deprecate --gateway-discovery-dns-strategy - make discovery always work Jan 28, 2025
@programmer04 programmer04 marked this pull request as ready for review January 28, 2025 15:31
@programmer04 programmer04 requested a review from a team as a code owner January 28, 2025 15:31
@programmer04 programmer04 enabled auto-merge (squash) January 28, 2025 15:31
@programmer04 programmer04 force-pushed the resolve-to branch 2 times, most recently from e5286d0 to bbb18a6 Compare January 29, 2025 08:53
@programmer04 programmer04 requested a review from pmalek January 29, 2025 08:57
Copy link
Contributor

@czeslavo czeslavo left a comment

Choose a reason for hiding this comment

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

Looks legit to me. 👍 Nice improvement.

internal/adminapi/endpoints.go Outdated Show resolved Hide resolved
pmalek
pmalek previously approved these changes Jan 29, 2025
internal/manager/config.go Outdated Show resolved Hide resolved
internal/adminapi/kong.go Show resolved Hide resolved
programmer04 and others added 2 commits January 29, 2025 18:24
Co-authored-by: Patryk Małek <patryk.malek@konghq.com>
@programmer04 programmer04 merged commit eb3059b into main Jan 29, 2025
43 checks passed
@programmer04 programmer04 deleted the resolve-to branch January 29, 2025 21:19
czeslavo added a commit that referenced this pull request Jan 30, 2025
* chore(deps): bump github.com/docker/docker (#7054)

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 27.4.1+incompatible to 27.5.1+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](moby/moby@v27.4.1...v27.5.1)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump google.golang.org/api from 0.217.0 to 0.218.0 (#7025)

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.217.0 to 0.218.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.217.0...v0.218.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/Kong/sdk-konnect-go from 0.1.24 to 0.1.28 (#7056)

Bumps [github.com/Kong/sdk-konnect-go](https://github.com/Kong/sdk-konnect-go) from 0.1.24 to 0.1.28.
- [Release notes](https://github.com/Kong/sdk-konnect-go/releases)
- [Changelog](https://github.com/Kong/sdk-konnect-go/blob/main/RELEASE.md)
- [Commits](Kong/sdk-konnect-go@v0.1.24...v0.1.28)

---
updated-dependencies:
- dependency-name: github.com/Kong/sdk-konnect-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/evanphx/json-patch/v5 from 5.9.0 to 5.9.11 (#7057)

Bumps [github.com/evanphx/json-patch/v5](https://github.com/evanphx/json-patch) from 5.9.0 to 5.9.11.
- [Release notes](https://github.com/evanphx/json-patch/releases)
- [Commits](evanphx/json-patch@v5.9.0...v5.9.11)

---
updated-dependencies:
- dependency-name: github.com/evanphx/json-patch/v5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump google.golang.org/grpc from 1.69.4 to 1.70.0 (#7047)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.69.4 to 1.70.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.69.4...v1.70.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump sigs.k8s.io/controller-runtime from 0.20.0 to 0.20.1 (#7061)

Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.20.0 to 0.20.1.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](kubernetes-sigs/controller-runtime@v0.20.0...v0.20.1)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/samber/lo from 1.47.0 to 1.49.1 (#7062)

Bumps [github.com/samber/lo](https://github.com/samber/lo) from 1.47.0 to 1.49.1.
- [Release notes](https://github.com/samber/lo/releases)
- [Commits](samber/lo@v1.47.0...v1.49.1)

---
updated-dependencies:
- dependency-name: github.com/samber/lo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/goccy/go-json from 0.10.4 to 0.10.5 (#7063)

Bumps [github.com/goccy/go-json](https://github.com/goccy/go-json) from 0.10.4 to 0.10.5.
- [Release notes](https://github.com/goccy/go-json/releases)
- [Changelog](https://github.com/goccy/go-json/blob/master/CHANGELOG.md)
- [Commits](goccy/go-json@v0.10.4...v0.10.5)

---
updated-dependencies:
- dependency-name: github.com/goccy/go-json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: deprecate `--gateway-discovery-dns-strategy` - make discovery always work (#7033)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jakub Warczarek <jakub.warczarek@konghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants