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

Set "disable-gateway-port-translation" label on local gateway Service #636

Merged

Conversation

howardjohn
Copy link
Contributor

This was added to Istio in istio/istio#33021. It
will likely be available in 1.9.next and 1.10.next, but if the label is
present with an older Istio version its not a problem - it will just not
have any impact.

What this does is avoid the ambiguities we currently have with the
Gateway service selection. Currently, if the local gateway is created
before the external gateway, we will be broken because the "port 80"
Gateway will match the local gateway and get translated to port 8081,
when it should be translated to port 8080 of the external gateway.

What this label does is tell Istio that the local gateway service is not
eligible for this port translation; as a result, Gateways on port 80
will never be mapped to port 8081. Instead, we expect that port 8081
will be used explicitly in the Gateway, as we do here.

tl;dr:

  • Before: NACK if services created in wrong order
  • After: service order does not matter

Note: the "experimental" label may be a red flag - this was intended to
be a scary label to dissuade any other than Knative from using it. The
label was made specifically to support Knative.

Changes

/kind

Fixes #

Release Note


Docs


This was added to Istio in istio/istio#33021. It
will likely be available in 1.9.next and 1.10.next, but if the label is
present with an older Istio version its not a problem - it will just not
have any impact.

What this does is avoid the ambiguities we currently have with the
Gateway service selection. Currently, if the local gateway is created
before the external gateway, we will be broken because the "port 80"
Gateway will match the local gateway and get translated to port 8081,
when it should be translated to port 8080 of the external gateway.

What this label does is tell Istio that the local gateway service is not
eligible for this port translation; as a result, Gateways on port 80
will never be mapped to port 8081. Instead, we expect that port 8081
will be used explicitly in the Gateway, as we do here.

tl;dr:
* Before: NACK if services created in wrong order
* After: service order does not matter

Note: the "experimental" label may be a red flag - this was intended to
be a scary label to dissuade any *other* than Knative from using it. The
label was made specifically to support Knative.
@knative-prow-robot
Copy link
Contributor

@howardjohn: The label(s) kind/<kind> cannot be applied, because the repository doesn't have them.

In response to this:

This was added to Istio in istio/istio#33021. It
will likely be available in 1.9.next and 1.10.next, but if the label is
present with an older Istio version its not a problem - it will just not
have any impact.

What this does is avoid the ambiguities we currently have with the
Gateway service selection. Currently, if the local gateway is created
before the external gateway, we will be broken because the "port 80"
Gateway will match the local gateway and get translated to port 8081,
when it should be translated to port 8080 of the external gateway.

What this label does is tell Istio that the local gateway service is not
eligible for this port translation; as a result, Gateways on port 80
will never be mapped to port 8081. Instead, we expect that port 8081
will be used explicitly in the Gateway, as we do here.

tl;dr:

  • Before: NACK if services created in wrong order
  • After: service order does not matter

Note: the "experimental" label may be a red flag - this was intended to
be a scary label to dissuade any other than Knative from using it. The
label was made specifically to support Knative.

Changes

/kind

Fixes #

Release Note


Docs


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@howardjohn howardjohn requested review from a team as code owners May 24, 2021 18:14
@howardjohn howardjohn requested a review from a team May 24, 2021 18:14
@howardjohn howardjohn requested a review from a team as a code owner May 24, 2021 18:14
@howardjohn howardjohn requested a review from a user May 24, 2021 18:14
@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label May 24, 2021
@knative-prow-robot knative-prow-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 24, 2021
@knative-prow-robot
Copy link
Contributor

Hi @howardjohn. Thanks for your PR.

I'm waiting for a knative-sandbox member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot knative-prow-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 24, 2021
@codecov
Copy link

codecov bot commented May 24, 2021

Codecov Report

Merging #636 (fe51bf9) into main (ab9dfc8) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #636   +/-   ##
=======================================
  Coverage   80.19%   80.19%           
=======================================
  Files          18       18           
  Lines        1116     1116           
=======================================
  Hits          895      895           
  Misses        138      138           
  Partials       83       83           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab9dfc8...fe51bf9. Read the comment docs.

@nak3
Copy link
Contributor

nak3 commented May 24, 2021

/ok-to-test

@knative-prow-robot knative-prow-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 24, 2021
@nak3
Copy link
Contributor

nak3 commented May 24, 2021

/cc @arturenault @julz @dprotaso
Please let us know if there are any objections to add this label.

Copy link
Contributor

@arturenault arturenault left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label May 25, 2021
Copy link
Contributor

@julz julz 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 @howardjohn!

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: arturenault, howardjohn, nak3

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 26, 2021
@knative-prow-robot knative-prow-robot merged commit d2f1edc into knative-extensions:main May 26, 2021
@dprotaso
Copy link
Contributor

dprotaso commented Jun 3, 2021

@howardjohn when does the feature flag switch and we'll be able to drop this label?

@howardjohn
Copy link
Contributor Author

Its not so much a feature flag - the label is basically enabling a non-standard behavior specifically to support knative doing a non-standard thing because we don't want to break knative.

Once http://gateway-api.org/ is used this problem will go away entirely (see https://docs.google.com/document/d/1gDhj058q2PKKI9SWpxE23ExEXdOkLiueT8JA_oEJ8Mo/edit# for long context on why); the changes we are making there may be backported to the standard Istio Gateway API but there are no current plans to do so. If we did it would be 1.11+. Do you typically allow multiple versions of Istio with a single Knative version?

@dprotaso
Copy link
Contributor

dprotaso commented Jun 3, 2021

Do you typically allow multiple versions of Istio with a single Knative version?

There's tests against different versions - ie. #648

But we've been shipping what we deem 'stable' in our release yamls - which is 1.9.x now

@ZhiminXiang
Copy link

Does this mean when installing Istio to support Knative, we need a specific installation instruction? Here is out current installation instruction https://github.com/knative/docs/blob/mkdocs/docs/admin/install/installing-istio.md which seems does not include this extra label.

@howardjohn
Copy link
Contributor Author

No, the label is on the knative-local-gateway service which is installed by knative

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants