Skip to content

Conversation

@Firstsawyou
Copy link
Contributor

@Firstsawyou Firstsawyou commented Apr 7, 2021

Signed-off-by: Firstsawyou yuelinz99@gmail.com

What this PR does / why we need it:

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first


## upstream 节点是否支持配置 `FQDN`(Fully Qualified Domain Name) 地址

这是支持,下面是一个 `FQDN` 为 `localhost.localdomain.com` 的示例:
Copy link
Member

Choose a reason for hiding this comment

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

Grammar is wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated.


```shell
# 测试请求
$ curl http://127.0.0.1:9080/hello -i
Copy link
Member

Choose a reason for hiding this comment

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

are you really test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not a real test, because the FQDN address I configured did not resolve to the local host. I will update it later for a local test.


In route, we can achieve more condition matching by combining `uri` with `vars` field. For more details of using `vars`, please refer to [lua-resty-expr](https://github.com/api7/lua-resty-expr).

## Does the upstream node support configuring the `FQDN`(Fully Qualified Domain Name) address
Copy link
Contributor

Choose a reason for hiding this comment

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

You may add a hyperlink about FQDN.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated.

"upstream": {
"type": "roundrobin",
"nodes": {
"localhost.localdomain.com:1980": 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Use a FQDN of Kubernetes Service is more vivid.

@moonming
Copy link
Member

ping @Firstsawyou

## Does the upstream node support configuring the [FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) address

This is supported. Here is an example where the `FQDN` is `localhost.localdomain`:
This is supported. Here is an example where the `FQDN` is `httpbin.default.svc.cluster.local`:
Copy link
Contributor

Choose a reason for hiding this comment

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

Add some notes to hint readers:

This is supported. Here is an example where the FQDN is httpbin.default.svc.cluster.local (a Kubernetes Service):

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated.

Copy link
Member

@spacewander spacewander Apr 20, 2021

Choose a reason for hiding this comment

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

Need to remove the repeated "Here is an example where the FQDN is httpbin.default.svc.cluster.local"

## upstream 节点是否支持配置 [FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) 地址?

这是支持的,下面是一个 `FQDN` 为 `httpbin.default.svc.cluster.local` 的示例:
这是支持的,下面是一个 `FQDN` 为 `httpbin.default.svc.cluster.local`(a Kubernetes Service) 的示例:
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the FAQ docs in Chinese, don't just copy and paste!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

## Does the upstream node support configuring the [FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) address

This is supported. Here is an example where the `FQDN` is `localhost.localdomain`:
This is supported. Here is an example where the `FQDN` is `httpbin.default.svc.cluster.local`:
Copy link
Member

@spacewander spacewander Apr 20, 2021

Choose a reason for hiding this comment

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

Need to remove the repeated "Here is an example where the FQDN is httpbin.default.svc.cluster.local"

## upstream 节点是否支持配置 [FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) 地址?

这是支持的,下面是一个 `FQDN` 为 `httpbin.default.svc.cluster.local`(a Kubernetes Service) 的示例:
这是支持的,下面是一个 `FQDN` 为 `httpbin.default.svc.cluster.local`(Kubernetes Service) 的示例:
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
这是支持的,下面是一个 `FQDN``httpbin.default.svc.cluster.local`(Kubernetes 的 Service) 的示例:
这是支持的,下面是一个 `FQDN``httpbin.default.svc.cluster.local`(一个 Kubernetes Service) 的示例:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@Firstsawyou Firstsawyou requested review from moonming and tokers April 20, 2021 05:50
@spacewander spacewander merged commit 750a9cf into apache:master Apr 22, 2021
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.

5 participants