Skip to content

Update the instruction on how to use cluster local gateway#2090

Merged
knative-prow-robot merged 9 commits intoknative:masterfrom
houshengbo:fix-local-gateway-doc
Jul 28, 2020
Merged

Update the instruction on how to use cluster local gateway#2090
knative-prow-robot merged 9 commits intoknative:masterfrom
houshengbo:fix-local-gateway-doc

Conversation

@houshengbo
Copy link
Copy Markdown

Fixes #1402

Proposed Changes

  • This PR adds the instruction of updating the configmap config-istio under the namespace knative-serving, if the service name for the local gateway is not cluster-local-gateway.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jan 9, 2020
@knative-prow-robot knative-prow-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 9, 2020
@tcnghia
Copy link
Copy Markdown
Contributor

tcnghia commented Jan 9, 2020

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 9, 2020
Copy link
Copy Markdown
Contributor

@abrennan89 abrennan89 left a comment

Choose a reason for hiding this comment

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

Some initial review comments

Comment thread docs/install/installing-istio.md Outdated
installation method is not ensured. For a production-ready installation, see the `helm` installation method above.

If you follow either of the above steps, your service and deployment for the local gateway are both named `cluster-local-gateway`,
and you do not need to update gateway configmap `config-istio` under `knative-serving` namespace, because Knative Serving
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

New sentence for readability;
"You do not need to update the config-istio configmap because Knative Serving can use the local gateway cluster-local-gateway by default."

Comment thread docs/install/installing-istio.md Outdated
and you do not need to update gateway configmap `config-istio` under `knative-serving` namespace, because Knative Serving
can by default use the local gateway with the name `cluster-local-gateway`.

However, if you create custom service and deployment for local gateway with a name other than `cluster-local-gateway`, you
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe a new heading here to call attention to the user story / task?
e.g. Updating the config-istio configmap to use a non-default local gateway

@samodell wdyt?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1 to that idea!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd remove "However" here

Comment thread docs/install/installing-istio.md Outdated
can by default use the local gateway with the name `cluster-local-gateway`.

However, if you create custom service and deployment for local gateway with a name other than `cluster-local-gateway`, you
need to update gateway configmap `config-istio` under `knative-serving` namespace. Run the following command:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. Run the following command
  2. Replace X field with the custom service

Split this into numbered steps to make it more like a procedure?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

Comment thread docs/install/installing-istio.md Outdated
and you do not need to update gateway configmap `config-istio` under `knative-serving` namespace, because Knative Serving
can by default use the local gateway with the name `cluster-local-gateway`.

However, if you create custom service and deployment for local gateway with a name other than `cluster-local-gateway`, you
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1 to that idea!

Comment thread docs/install/installing-istio.md Outdated
can by default use the local gateway with the name `cluster-local-gateway`.

However, if you create custom service and deployment for local gateway with a name other than `cluster-local-gateway`, you
need to update gateway configmap `config-istio` under `knative-serving` namespace. Run the following command:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

Comment thread docs/install/installing-istio.md Outdated
**Note:** This method is only for development purposes. The production readiness of the above
installation method is not ensured. For a production-ready installation, see the `helm` installation method above.

If you follow either of the above steps, your service and deployment for the local gateway are both named `cluster-local-gateway`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Instead of "either of the above steps," let's clarify the exact types of installs we're referring to -- "If you installed Istio via METHOD or METHOD..."

@samodell
Copy link
Copy Markdown
Contributor

Hi @houshengbo , can you respond to the review comments when you have some time?

@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 26, 2020
Copy link
Copy Markdown
Contributor

@carieshmarie carieshmarie left a comment

Choose a reason for hiding this comment

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

Thanks, Vincent. Looking good - just have one tiny nit - can you incorporate my requested change?

Thanks!

Comment thread docs/install/installing-istio.md Outdated

### Updating the `config-istio` configmap to use a non-default local gateway

However, if you create custom service and deployment for local gateway with a name other than `cluster-local-gateway`, you
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
However, if you create custom service and deployment for local gateway with a name other than `cluster-local-gateway`, you
If you create custom service and deployment for local gateway with a name other than `cluster-local-gateway`, you

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 2, 2020
Comment thread docs/install/installing-istio.md Outdated
@@ -261,6 +261,54 @@ kubectl apply -f https://raw.githubusercontent.com/knative/serving/master/third_
**Note:** This method is only for development purposes. The production readiness of the above
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No need to overstate, use something more succinct, e.g.

Note: This installation method is not production ready and is for development purposes only. For a more stable method, use Helm. For more information about the Helm installation method, see [link to helm docs].

Comment thread docs/install/installing-istio.md Outdated
installation method is not ensured. For a production-ready installation, see the `helm` installation method above.

After you install the cluster local gateway, your service and deployment for the local gateway are both named `cluster-local-gateway`.
You do not need to update the `config-istio` configmap under `knative-serving` namespace, because Knative Serving can use
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"under the knative-serving namespace"

"the local gateway cluster-local-gateway by default"

Comment thread docs/install/installing-istio.md Outdated

### Updating the `config-istio` configmap to use a non-default local gateway

#### Update Gateway Configmap
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove this heading, there's no need to have two headings below each other with no text in between

Comment thread docs/install/installing-istio.md Outdated

#### Update Gateway Configmap

If you create custom service and deployment for local gateway with a name other than `cluster-local-gateway`, you
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"a custom service"

Comment thread docs/install/installing-istio.md Outdated
#### Update Gateway Configmap

If you create custom service and deployment for local gateway with a name other than `cluster-local-gateway`, you
need to update gateway configmap `config-istio` under `knative-serving` namespace.
Copy link
Copy Markdown
Contributor

@abrennan89 abrennan89 Mar 6, 2020

Choose a reason for hiding this comment

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

"the knative-serving namespace"

Comment thread docs/install/installing-istio.md Outdated
If you create custom service and deployment for local gateway with a name other than `cluster-local-gateway`, you
need to update gateway configmap `config-istio` under `knative-serving` namespace.

1. Run the following command:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doesn't add anything, instead say something like

  1. Edit the config-istio configmap:

Comment thread docs/install/installing-istio.md Outdated
```

2. Replace the `local-gateway.knative-serving.cluster-local-gateway` field with the custom service. If you name both
of the service and deployment after `custom-local-gateway` under the namespace `istio-system`, it should be updated to:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove 'of' and 'after'

Comment thread docs/install/installing-istio.md Outdated

#### Update Knative Gateway

If both of the custom service and deployment are labeled with `custom: custom-local-gateway`, not the default
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove 'of'

Comment thread docs/install/installing-istio.md Outdated
custom: custom-local-gateway
```

If there is a change in service ports (compared with that of
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

with -> to

Copy link
Copy Markdown
Contributor

@abrennan89 abrennan89 left a comment

Choose a reason for hiding this comment

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

Some minor comments

Copy link
Copy Markdown
Contributor

@abrennan89 abrennan89 left a comment

Choose a reason for hiding this comment

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

For some reason I can't comment on the configuring DNS part, so I'll comment here.

"Knative dispatches to different services based on their hostname, so it greatly
simplifies things to have DNS properly configured. For this, we must look up the
external IP address that Istio received. This can be done with the following
command:"

Maybe update to something like...
"You must configure your DNS settings to allow Knative to dispatch services based on their hostname.

To do this, you must look up the external IP address received by Istio by entering the following command:"

Some other minor comments in the doc too, but otherwise lgtm! Thanks Vincent.

Comment thread docs/install/installing-istio.md Outdated

**Note:** This method is only for development purposes. The production readiness of the above
installation method is not ensured. For a production-ready installation, see the `helm` installation method above.
__Note:__ This installation method is not production ready and is for development purposes only. For a more stable method,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why change the note format to __ here?

Comment thread docs/install/installing-istio.md Outdated
```

If both the custom service and deployment are labeled with `custom: custom-local-gateway`, not the default
`istio: cluster-local-gateway`, you need to update gateway instance `cluster-local-gateway` in `knative-serving` namespace:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the knative-serving namespace

@houshengbo
Copy link
Copy Markdown
Author

@abrennan89 Thx, I just updated the changes.

@tcnghia
Copy link
Copy Markdown
Contributor

tcnghia commented Mar 24, 2020

/lgtm
/approve

@abrennan89
Copy link
Copy Markdown
Contributor

@houshengbo is this PR still WIP?

@abrennan89 abrennan89 mentioned this pull request Jun 11, 2020
3 tasks
@knative-prow-robot knative-prow-robot added approved and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 12, 2020
@houshengbo
Copy link
Copy Markdown
Author

@abrennan89 I have just rebased and submitted.

@nak3
Copy link
Copy Markdown
Contributor

nak3 commented Jun 12, 2020

@houshengbo
The PR is almost same with https://knative.dev/development/serving/setting-up-custom-ingress-gateway/, it is just for cluster-local-gateway.
Is it better to add it in https://knative.dev/development/serving/setting-up-custom-ingress-gateway/ ?

@houshengbo
Copy link
Copy Markdown
Author

@nak3 It is similar, but it is about cluster-local-gateway.
We do not have a separate page for cluster-local-gateway. I am not sure if it should be added into custom ingress gateway.

@knative-prow-robot knative-prow-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 16, 2020
Copy link
Copy Markdown
Contributor

@abrennan89 abrennan89 left a comment

Choose a reason for hiding this comment

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

@houshengbo a few more minor suggestions that you should be able to just accept as commits, then this should be OK to merge.

@duglin do you want to take a quick look to make sure this addresses the linked issue?
Thanks.

Comment thread docs/install/installing-istio.md Outdated
If you create a custom service and deployment for local gateway with a name other than `cluster-local-gateway`, you
need to update gateway configmap `config-istio` under the `knative-serving` namespace.

1. Edit the 1config-istio1 configmap:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
1. Edit the 1config-istio1 configmap:
1. Edit the `config-istio` configmap:

Comment thread docs/install/installing-istio.md Outdated
```

If both the custom service and deployment are labeled with `custom: custom-local-gateway`, not the default
`istio: cluster-local-gateway`, you need to update gateway instance `cluster-local-gateway` in the `knative-serving` namespace:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
`istio: cluster-local-gateway`, you need to update gateway instance `cluster-local-gateway` in the `knative-serving` namespace:
`istio: cluster-local-gateway`, you must update gateway instance `cluster-local-gateway` in the `knative-serving` namespace:

Comment thread docs/install/installing-istio.md Outdated
Comment on lines +201 to +204
Knative dispatches to different services based on their hostname, so it greatly
simplifies things to have DNS properly configured. For this, we must look up the
external IP address that Istio received. This can be done with the following
command:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Knative dispatches to different services based on their hostname, so it greatly
simplifies things to have DNS properly configured. For this, we must look up the
external IP address that Istio received. This can be done with the following
command:
Knative dispatches to different services based on their hostname, so it is recommended to have DNS properly configured.
To do this, begin by looking up the external IP address that Istio received:

Comment thread docs/install/installing-istio.md Outdated
Comment on lines +214 to +217
This external IP can be used with your DNS provider with a wildcard `A` record;
however, for a basic functioning DNS setup (not suitable for production!) this
external IP address can be used with `xip.io` in the `config-domain` ConfigMap
in `knative-serving`. You can edit this with the following command:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
This external IP can be used with your DNS provider with a wildcard `A` record;
however, for a basic functioning DNS setup (not suitable for production!) this
external IP address can be used with `xip.io` in the `config-domain` ConfigMap
in `knative-serving`. You can edit this with the following command:
This external IP can be used with your DNS provider with a wildcard `A` record. However, for a basic non-production set up, this external IP address can be used with `xip.io` in the `config-domain` ConfigMap
in `knative-serving`.
You can edit this by using the following command:

@abrennan89 abrennan89 requested a review from duglin June 30, 2020 18:19
Comment thread docs/install/installing-istio.md Outdated
```

After you install the cluster local gateway, your service and deployment for the local gateway are both named `cluster-local-gateway`.
You do not need to update the `config-istio` configmap under the `knative-serving` namespace, because Knative Serving can use
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This sentence, while I assume is true, feels a bit out of place because it assumes the reader wanted to update the configMap - but why would they? A newbie wouldn't have even thought about doing this so I don't think there's any need to mention it. I think you can remove it.

Comment thread docs/install/installing-istio.md Outdated
kubectl edit configmap config-istio -n knative-serving
```

2. Replace the `local-gateway.knative-serving.cluster-local-gateway` field with the custom service. If you name both
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'd add As an example, in front of the If you name both... sentence so make it clear that custom-local-gateway is just an example.

Comment thread docs/install/installing-istio.md Outdated
custom-local-gateway.istio-system.svc.cluster.local
```

If both the custom service and deployment are labeled with `custom: custom-local-gateway`, not the default
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I might have missed it, but why would they have this label? Did we talk about it some place?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I should surely add "As an example" at the beginning. This demonstrates how users should change the label of the cluster-local-gateway into something else.

@houshengbo
Copy link
Copy Markdown
Author

@abrennan89 @duglin I have changed the PR based on the comments.
Thank you.

@abrennan89
Copy link
Copy Markdown
Contributor

/lgtm
/approve

Thanks @houshengbo !

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 28, 2020
@abrennan89 abrennan89 added this to the 0.17 docs release milestone Jul 28, 2020
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abrennan89, houshengbo, tcnghia

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

The pull request process is described here

Details 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 merged commit 35e5cdb into knative:master Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing docs for cluster local setup