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

deploy: Define port_maps for Kong (OSS + Enterprise) #753

Merged
merged 1 commit into from
Jul 2, 2020

Conversation

mflendrich
Copy link
Contributor

@mflendrich mflendrich commented Jul 1, 2020

What this PR does / why we need it:
kong-ingress is a service exposing low ports tcp/80 and tcp/443. The implementation detail of deploy/ is that these get NAT'ed by kube-proxy to high container ports tcp/8000 and tcp/8443 of the proxy container. Without knowledge of the externally exposed low ports, Kong puts those high ports in X-Forwarded-Port request headers which end-users can consider surprising, incorrect and unnecessarily exposing the implementation details of the Kong deployment.

This PR sets KONG_PORT_MAPS to enable Kong's feature to perform a reverse address translation for the purpose of identifying the actual port a request was received on by the service.

This feature is present in Kong as of 2.1.0-beta.1, hence also an upgrade of Kong. edits per #753 (comment)

Which issue this PR fixes
closes #691

Special notes for your reviewer:

  • Does not touch Kong Enterprise
  • Updates kong from 2.0 to 2.1.0-beta.1 with an exception of wait-for-migrations where it updates from 1.3
  • Does not touch Helm charts (to be updated in a separate PR)
  • We probably want to shelve this PR until 2.1.0 gets released, and then update this PR to use 2.1.0 before merging.

@CLAassistant
Copy link

CLAassistant commented Jul 1, 2020

CLA assistant check
All committers have signed the CLA.

@mflendrich mflendrich changed the base branch from master to next July 1, 2020 10:35
@mflendrich mflendrich requested a review from rainest July 1, 2020 11:58
@hbagdi
Copy link
Member

hbagdi commented Jul 2, 2020

I'd recommend that we move forward with this change without waiting for 2.1 release in Kong.
Skip the version bump to beta, and limit the diff to only add the required setting. Also, we should this change for Enterprise manifests as well.
/cc @rainest

@mflendrich
Copy link
Contributor Author

mflendrich commented Jul 2, 2020

Please take a look again:

Skip the version bump to beta

done

limit the diff to only add the required setting

done (+ sorting env vars)

Also, we should this change for Enterprise manifests as well.

done

@mflendrich mflendrich changed the title deploy: Define port_maps for OSS Kong deploy: Define port_maps for Kong (OSS + Enterprise) Jul 2, 2020
@mflendrich mflendrich marked this pull request as ready for review July 2, 2020 21:12
Copy link
Contributor

@rainest rainest left a comment

Choose a reason for hiding this comment

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

LGTM on the assumption that this setting is just a noop for older versions, since nothing else depends on it, which appears to be the case.

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.

feature: use port mapping feature of Kong
4 participants