Skip to content

Conversation

@houshengbo
Copy link
Contributor

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
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
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

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
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."

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
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
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
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

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
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
Contributor

Choose a reason for hiding this comment

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

+1

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
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!

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
Contributor

Choose a reason for hiding this comment

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

+1

**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
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
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
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!

### 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
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
Contributor 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
kubectl apply -f https://raw.githubusercontent.com/knative/serving/master/third_party/${VERSION}/istio-knative-extras.yaml
```
**Note:** This method is only for development purposes. The production readiness of the above
Copy link
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].

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
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"

### Updating the `config-istio` configmap to use a non-default local gateway
#### Update Gateway Configmap
Copy link
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

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

Choose a reason for hiding this comment

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

"a custom service"

#### 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
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"

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
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:

```
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
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'

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

Choose a reason for hiding this comment

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

remove 'of'

custom: custom-local-gateway
```
If there is a change in service ports (compared with that of
Copy link
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
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
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.

**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
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?

```
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
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
Contributor Author

@abrennan89 Thx, I just updated the changes.

@tcnghia
Copy link
Contributor

tcnghia commented Mar 24, 2020

/lgtm
/approve

@abrennan89
Copy link
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
Contributor Author

@abrennan89 I have just rebased and submitted.

@nak3
Copy link
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
Contributor 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
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.

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
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:

```

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
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 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
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 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
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
```

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

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.

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

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.

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

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
Contributor 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
Contributor Author

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

@abrennan89
Copy link
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
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

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