From 05f29d55d83f999e056e0b65a43e6a6f1de016dc Mon Sep 17 00:00:00 2001 From: "xin.li" Date: Sun, 14 May 2023 15:24:12 +0800 Subject: [PATCH] [zh-cn] sync object-meta audit-annotations service-v1.md Signed-off-by: xin.li --- .../common-definitions/object-meta.md | 26 +++++---- .../service-resources/service-v1.md | 27 +++++++++ .../audit-annotations.md | 58 ++++++++++++++++++- 3 files changed, 97 insertions(+), 14 deletions(-) diff --git a/content/zh-cn/docs/reference/kubernetes-api/common-definitions/object-meta.md b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/object-meta.md index 1ebd622083..6ab601689e 100644 --- a/content/zh-cn/docs/reference/kubernetes-api/common-definitions/object-meta.md +++ b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/object-meta.md @@ -33,11 +33,12 @@ ObjectMeta 是所有持久化资源必须具有的元数据,其中包括用户 - **name** (string) + name 在命名空间内必须是唯一的。创建资源时需要,尽管某些资源可能允许客户端请求自动地生成适当的名称。 名称主要用于创建幂等性和配置定义。无法更新。更多信息: - https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/names/ + https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/names#names - **generateName** (string) @@ -64,34 +65,34 @@ ObjectMeta 是所有持久化资源必须具有的元数据,其中包括用户 namespace 定义了一个值空间,其中每个名称必须唯一。空命名空间相当于 “default” 命名空间,但 “default” 是规范表示。 并非所有对象都需要限定在命名空间中——这些对象的此字段的值将为空。 必须是 DNS_LABEL。无法更新。更多信息: - https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/namespaces/ + https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/namespaces - **labels** (map[string]string) 可用于组织和分类(确定范围和选择)对象的字符串键和值的映射。 可以匹配 ReplicationController 和 Service 的选择算符。更多信息: - https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/labels/ + https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/labels - **annotations** (map[string]string) annotations 是一个非结构化的键值映射,存储在资源中,可以由外部工具设置以存储和检索任意元数据。 它们不可查询,在修改对象时应保留。更多信息: - https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/annotations/ + https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/annotations ### 系统字段 {#System} @@ -256,13 +257,15 @@ ObjectMeta 是所有持久化资源必须具有的元数据,其中包括用户 - **ownerReferences.name** (string),必选 - + + 被引用资源的名称。更多信息: https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/names/ - **ownerReferences.uid** (string),必选 - + + 被引用资源的 uid。更多信息: https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/names#uids @@ -384,8 +387,9 @@ ObjectMeta 是所有持久化资源必须具有的元数据,其中包括用户 + UID 是该对象在时间和空间上的唯一值。它通常由服务器在成功创建资源时生成,并且不允许使用 PUT 操作更改。 由系统填充。只读。更多信息: diff --git a/content/zh-cn/docs/reference/kubernetes-api/service-resources/service-v1.md b/content/zh-cn/docs/reference/kubernetes-api/service-resources/service-v1.md index 34deb10fb0..57d52ea7ea 100644 --- a/content/zh-cn/docs/reference/kubernetes-api/service-resources/service-v1.md +++ b/content/zh-cn/docs/reference/kubernetes-api/service-resources/service-v1.md @@ -856,6 +856,15 @@ GET /api/v1/namespaces/{namespace}/services }}">resourceVersionMatch + +- **sendInitialEvents** (**查询参数**): boolean + + }}">sendInitialEvents + - **timeoutSeconds**(**查询参数**):integer }}">timeoutSeconds @@ -924,6 +933,15 @@ GET /api/v1/services }}">resourceVersionMatch + +- **sendInitialEvents** (**查询参数**): boolean + + }}">sendInitialEvents + - **timeoutSeconds**(**查询参数**):integer }}">timeoutSeconds @@ -1367,6 +1385,15 @@ DELETE /api/v1/namespaces/{namespace}/services }}">resourceVersionMatch + +- **sendInitialEvents** (**查询参数**): boolean + + }}">sendInitialEvents + - **timeoutSeconds**(**查询参数**):integer }}">timeoutSeconds diff --git a/content/zh-cn/docs/reference/labels-annotations-taints/audit-annotations.md b/content/zh-cn/docs/reference/labels-annotations-taints/audit-annotations.md index 2b34ad834d..61dfe89cd0 100644 --- a/content/zh-cn/docs/reference/labels-annotations-taints/audit-annotations.md +++ b/content/zh-cn/docs/reference/labels-annotations-taints/audit-annotations.md @@ -13,7 +13,8 @@ This page serves as a reference for the audit annotations of the kubernetes.io namespace. These annotations apply to `Event` object from API group `audit.k8s.io`. --> -该页面作为 kubernetes.io 名字空间的审计注解的参考。这些注解适用于 API 组 `audit.k8s.io` 中的 `Event` 对象。 +该页面作为 kubernetes.io 名字空间的审计注解的参考。这些注解适用于 API 组 +`audit.k8s.io` 中的 `Event` 对象。 {{< note >}} Go 文档中有更多关于此的信息: [拒绝 SHA-1 证书](https://go.dev/doc/go1.18#sha1)。 + +## validation.policy.admission.k8s.io/validation_failure + + +例子:`validation.policy.admission.k8s.io/validation_failure: +'[{"message": "Invalid value", {"policy": "policy.example.com", +{"binding": "policybinding.example.com", {"expressionIndex": "1", +{"validationActions": ["Audit"]}]'` + + +由 Kubernetes v1.27 及更高版本使用。 + +此注解表示 API 请求的准入策略验证评估为 false, +或者当策略配置为 `failurePolicy: Fail` 时验证报错。 + + +注解的值是一个 JSON 对象。JSON 中的 `message` +字段提供了有关验证失败的信息。 + + +JSON 中的 `policy`、`binding` 和 `expressionIndex` +分别标识了 `ValidatingAdmissionPolicy` 的名称、 +`ValidatingAdmissionPolicyBinding` 的名称以及失败的 +CEL 表达式在策略 `validations` 中的索引。 + + +`validationActions` 显示针对此验证失败采取的操作。 +有关 `validationActions` 的更多详细信息, +请参阅[验证准入策略](/zh-cn/docs/reference/access-authn-authz/validating-admission-policy/)。 +