Skip to content

Commit

Permalink
add doc for gracePeriodSeconds (#196)
Browse files Browse the repository at this point in the history
Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
  • Loading branch information
furykerry committed Jul 10, 2024
1 parent 1a75ffa commit bc946b4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ spec:
# 与服务相关的 Ingress 名称
ingress:
name: echoserver
gracePeriodSeconds: 10
```

</TabItem>
Expand Down Expand Up @@ -95,6 +96,7 @@ spec:
# 与服务相关的 Ingress 名称
ingress:
name: echoserver
gracePeriodSeconds: 10
```

</TabItem>
Expand Down Expand Up @@ -177,14 +179,17 @@ spec:
ingress:
classType: <traffic-type> # 例如:nginx | higress,默认为 "nginx"
name: <ingress-name-that-is-related-the-service>
gracePeriodSeconds: 10
- service: <service-name-that-is-related-your-workload>
gateway: # 或者选择使用 Ingress 或 GatewayAPI
httpRouteName: <gateway-api-httpRoute-name>
gracePeriodSeconds: 10
- service: <service-name-that-is-related-your-workload>
customNetworkRefs:
- apiVersion: <your-resource-apiVersion>
kind: <your-resource-kind>
name: <your-resource-name>
gracePeriodSeconds: 10
```

| 字段 | 类型 | 默认值 | 说明 |
Expand All @@ -196,6 +201,7 @@ spec:
| `ingress.classType` | 字符串 | "nginx" | Ingress类型,如"nginx"、"higress"或其他 |
| `ingress.name` | 字符串 | "" | 绑定服务的Ingress资源的名称 |
| `gateway.httpRouteName` | 字符串 | "" | Gateway API的[HTTPRoute](https://gateway-api.sigs.k8s.io/concepts/api-overview/#httproute)资源名称 |
| `gracePeriodSeconds` | 整数| 3 | 在每个步骤中等待流量路由配置生效的时间(秒)|
注意:
- 如果决定使用`trafficRoutings`,则`ingress``gateway``customNetworkRefs`不能同时为nil,且`ingress``gateway``customNetworkRefs` 不能同时配置在一个trafficRouting中。

Expand All @@ -215,6 +221,7 @@ spec:
ingress:
classType: mse
name: spring-cloud-a
gracePeriodSeconds: 10
strategy:
matches:
- headers:
Expand Down
8 changes: 7 additions & 1 deletion rollouts/user-manuals/api-specifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,17 @@ spec:
ingress: # alternative: ingress,gateway,customNetworkRefs
classType: <traffic-type> # example: nginx | higress, defaults to "nginx"
name: <ingress-name-that-is-related-the-service>
gracePeriodSeconds: 10
- service: <service-name-that-is-related-your-workload>
gateway:
httpRouteName: <gateway-api-httpRoute-name>
gracePeriodSeconds: 10
- service: <service-name-that-is-related-your-workload>
customNetworkRefs:
- apiVersion: <your-resource-apiVersion>
kind: <your-resource-kind>
name: <your-resource-name>
gracePeriodSeconds: 10
```

</TabItem>
Expand All @@ -198,6 +201,7 @@ spec:
ingress: # alternative: ingress,gateway,customNetworkRefs
classType: <traffic-type> # example: nginx | higress, defaults to "nginx"
name: <ingress-name-that-is-related-the-service>
gracePeriodSeconds: 10
- service: <service-name-that-is-related-your-workload>
gateway:
httpRouteName: <gateway-api-httpRoute-name>
Expand All @@ -216,10 +220,11 @@ spec:
| `service` | string | "" | Name of service that select the pods of bounded workload |
| `ingress` | object | nil | (optional) Description of the Ingress object you want to bind |
| `gateway` | object | nil | (optional) Description of the [Gateway API](https://gateway-api.sigs.k8s.io/) resources you want to bind |
| `customNetworkRefs ` | Array | "" | Definitions of [customize API Gateway resources](https://openkruisyye.io/rollouts/developer-manuals/custom-network-provider) |
| `customNetworkRefs ` | Array | "" | (optional) Definitions of [customize API Gateway resources](https://openkruisyye.io/rollouts/developer-manuals/custom-network-provider) |
| `ingress.classType` | string | "nginx" | Ingress type, such as "nginx", "higress", or others |
| `ingress.name` | string | "" | Name of ingress resource that bounded the service |
| `gateway.httpRouteName` | string | "" | Name of [HTTPRoute](https://gateway-api.sigs.k8s.io/concepts/api-overview/#httproute) resource of Gateway API |
| `gracePeriodSeconds` | integer| 3 | Duration in seconds that kruise rollout wait for the traffic routing configuration changes to take effects in each step |

**Note: if you decide to use `trafficRoutings`, one and only one of `ingress`,`gateway`,`customNetworkRefs` can be present in one trafficRouting element*

Expand All @@ -238,6 +243,7 @@ spec:
ingress:
classType: mse
name: spring-cloud-a
gracePeriodSeconds: 10
strategy:
matches:
- headers:
Expand Down

0 comments on commit bc946b4

Please sign in to comment.