Skip to content

Commit 9338334

Browse files
committed
[zh-cn]sync names.md
Signed-off-by: xin.li <[email protected]>
1 parent a554c9b commit 9338334

File tree

1 file changed

+21
-12
lines changed
  • content/zh-cn/docs/concepts/overview/working-with-objects

1 file changed

+21
-12
lines changed

content/zh-cn/docs/concepts/overview/working-with-objects/names.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ In cases when objects represent a physical entity, like a Node representing a ph
6666
<!--
6767
The server may generate a name when `generateName` is provided instead of `name` in a resource create request.
6868
When `generateName` is used, the provided value is used as a name prefix, which server appends a generated suffix
69-
to. Even though the name is generated, it may conflict with existing names resulting in a HTTP 409 response. This
70-
became far less likely to happen in Kubernetes v1.31 and later, since the server will make up to 8 attempt to generate a
71-
unique name before returning a HTTP 409 response.
69+
to. Even though the name is generated, it may conflict with existing names resulting in an HTTP 409 response. This
70+
became far less likely to happen in Kubernetes v1.31 and later, since the server will make up to 8 attempts to generate a
71+
unique name before returning an HTTP 409 response.
7272
-->
7373
当在资源创建请求中提供 `generateName` 而不是 `name` 时,服务器可能会生成一个名称。
7474
使用 `generateName` 时,所提供的值将作为名称前缀,服务器会在其后附加一个生成的后缀。
@@ -90,7 +90,7 @@ This means the name must:
9090
9191
- contain no more than 253 characters
9292
- contain only lowercase alphanumeric characters, '-' or '.'
93-
- start with an alphanumeric character
93+
- start with an alphabetic character
9494
- end with an alphanumeric character
9595
-->
9696
### DNS 子域名 {#dns-subdomain-names}
@@ -101,9 +101,18 @@ DNS 子域名的定义可参见 [RFC 1123](https://tools.ietf.org/html/rfc1123)
101101

102102
- 不能超过 253 个字符
103103
- 只能包含小写字母、数字,以及 '-' 和 '.'
104-
- 必须以字母数字开头
104+
- 必须以字母开头
105105
- 必须以字母数字结尾
106106

107+
{{< note >}}
108+
<!--
109+
When the `RelaxedServiceNameValidation` feature gate is enabled,
110+
Service object names are allowed to start with a digit.
111+
-->
112+
当启用 `RelaxedServiceNameValidation` 特性门控时,
113+
Service 对象名称可以以数字开头。
114+
{{< /note >}}
115+
107116
<!--
108117
### RFC 1123 Label Names {#dns-label-names}
109118
@@ -126,7 +135,6 @@ This means the name must:
126135
- 必须以字母数字开头
127136
- 必须以字母数字结尾
128137

129-
130138
<!--
131139
### RFC 1035 Label Names
132140
@@ -151,13 +159,14 @@ This means the name must:
151159

152160
{{< note >}}
153161
<!--
154-
The only difference between the RFC 1035 and RFC 1123
155-
label standards is that RFC 1123 labels are allowed to
156-
start with a digit, whereas RFC 1035 labels can start
157-
with a lowercase alphabetic character only.
162+
While RFC 1123 technically allows labels to start with digits, the current
163+
Kubernetes implementation requires both RFC 1035 and RFC 1123 labels to start
164+
with an alphabetic character. The exception is when the `RelaxedServiceNameValidation`
165+
feature gate is enabled for Service objects, which allows Service names to start with digits.
158166
-->
159-
RFC 1035 和 RFC 1123 标签标准之间的唯一区别是 RFC 1123
160-
标签允许以数字开头,而 RFC 1035 标签只能以小写字母字符开头。
167+
尽管 RFC 1123 在技术上允许标签以数字开头,当前的 Kubernetes 实现要求
168+
RFC 1035 和 RFC 1123 标签都以字母字符开头。例外情况是当为 Service 对象启用了
169+
`RelaxedServiceNameValidation` 特性门控时,这允许 Service 名称以数字开头。
161170
{{< /note >}}
162171

163172
<!--

0 commit comments

Comments
 (0)