Skip to content

Commit f5b85d4

Browse files
committed
[zh-cn]sync server-side-apply
Signed-off-by: xin.li
1 parent 5cd0e54 commit f5b85d4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

content/zh-cn/docs/reference/using-api/server-side-apply.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,17 +1020,18 @@ Apply can send partially specified objects as YAML as the body of a `PATCH` requ
10201020
to the URI of a resource. When applying a configuration, you should always include all the
10211021
fields that are important to the outcome (such as a desired state) that you want to define.
10221022

1023-
All JSON messages are valid YAML. Some clients specify Server-Side Apply requests using YAML
1024-
request bodies that are also valid JSON.
1023+
All JSON messages are valid YAML. Therefore, in addition to using YAML request bodies for Server-Side Apply requests, you can also use JSON request bodies, as they are also valid YAML.
1024+
In either case, use the media type `application/apply-patch+yaml` for the HTTP request.
10251025
-->
10261026
## API 实现 {#api-implementation}
10271027

10281028
支持服务器端应用的资源的 `PATCH` 动词可以接受非官方的 `application/apply-patch+yaml` 内容类型。
10291029
服务器端应用的用户可以将部分指定的对象以 YAML 格式作为 `PATCH` 请求的主体发送到资源的 URI。
10301030
应用配置时,你应该始终包含对要定义的结果(如所需状态)重要的所有字段。
10311031

1032-
所有 JSON 消息都是有效的 YAML。一些客户端使用 YAML 请求体指定服务器端应用请求,
1033-
而这些 YAML 同样是合法的 JSON。
1032+
所有 JSON 消息都是有效的 YAML。因此,除了可以为 Server-Side Apply 请求使用
1033+
YAML 请求体外,你也可以使用 JSON 请求体,因为它们同样是有效的 YAML。
1034+
无论哪种情况,请为 HTTP 请求使用媒体类型 `application/apply-patch+yaml`。
10341035

10351036
commit comments
Comments
 (0)