You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apisix.apache.org by GitBox <gi...@apache.org> on 2020/08/02 06:56:47 UTC

[GitHub] [apisix-control-plane] gxthrj commented on a change in pull request #5: doc: add yaml design doc

gxthrj commented on a change in pull request #5:
URL: https://github.com/apache/apisix-control-plane/pull/5#discussion_r464040748



##########
File path: doc/yaml_struct.md
##########
@@ -0,0 +1,223 @@
+## Currently, 4 types are defined, namely
+1.Gateway
+2.Traffic distribution rules
+3.Define the target service
+4.Plug-in extension
+
+### Gateway
+For edge traffic, extract the host separately and define a Gateway type
+
+```yaml
+kind:Gateway
+name: baidu-gw
+servers:
+ - port:
+     number: 80
+     name: http
+     protocol: HTTP
+   hosts:
+   - "a.domain.com"
+   - "b.domain.com"
+```
+|  object/field   | describition |
+|  ----  | ----  |
+| Gateway  | the type for Edge traffic  |
+| Gateway.servers  | Define edge traffic service list  |
+| Gateway.servers.port  | the port for service  |
+| Gateway.servers.port.protocol  | Specify protocol  |
+| Gateway.servers.hosts  | List of domain names that a certain service can accept  |
+
+### Define traffic distribution rules
+
+```yaml
+kind: Rule
+name: xxx-rules
+hosts:
+- "domain.com"
+gateways:
+- baidu-gw

Review comment:
       change `baidu` to `foo`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org