Skip to content

Commit 4202dcf

Browse files
authored
Merge pull request #51046 from my-git9/npa-1180
[zh-cn]sync apiserver-config.v1alpha1.md
2 parents d6c4717 + 95e21cd commit 4202dcf

File tree

1 file changed

+59
-45
lines changed

1 file changed

+59
-45
lines changed

content/zh-cn/docs/reference/config-api/apiserver-config.v1alpha1.md

Lines changed: 59 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ package: apiserver.k8s.io/v1alpha1
1010
auto_generated: true
1111
-->
1212

13+
<p>
1314
<!--
1415
Package v1alpha1 is the v1alpha1 version of the API.
1516
-->
16-
<p>包 v1alpha1 包含 API 的 v1alpha1 版本。</p>
17+
包 v1alpha1 包含 API 的 v1alpha1 版本。
18+
</p>
1719

1820
<!--
1921
## Resource Types
@@ -125,11 +127,11 @@ AuthenticationConfiguration 为身份认证提供版本化的配置。
125127
<table class="table">
126128
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
127129
<tbody>
128-
130+
129131
<tr><td><code>apiVersion</code><br/>string</td><td><code>apiserver.k8s.io/v1alpha1</code></td></tr>
130132
<tr><td><code>kind</code><br/>string</td><td><code>AuthenticationConfiguration</code></td></tr>
131-
132-
133+
134+
133135
<tr><td><code>jwt</code> <B><!--[Required]-->[必需]</B><br/>
134136
<a href="#apiserver-k8s-io-v1beta1-JWTAuthenticator"><code>[]JWTAuthenticator</code></a>
135137
</td>
@@ -191,7 +193,7 @@ The minimum valid JWT payload must contain the following claims:
191193
<table class="table">
192194
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
193195
<tbody>
194-
196+
195197
<tr><td><code>apiVersion</code><br/>string</td><td><code>apiserver.k8s.io/v1alpha1</code></td></tr>
196198
<tr><td><code>kind</code><br/>string</td><td><code>AuthorizationConfiguration</code></td></tr>
197199

@@ -397,8 +399,8 @@ AnonymousAuthConfig 为匿名身份认证器提供配置信息。</p>
397399
<table class="table">
398400
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
399401
<tbody>
400-
401-
402+
403+
402404
<tr><td><code>enabled</code> <B><!--[Required]-->[必需]</B><br/>
403405
<code>bool</code>
404406
</td>
@@ -453,8 +455,8 @@ AudienceMatchPolicyType 是 issuer.audienceMatchPolicy 合法值的集合
453455
<table class="table">
454456
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
455457
<tbody>
456-
457-
458+
459+
458460
<tr><td><code>type</code> <B><!--[Required]-->[必需]</B><br/>
459461
<code>string</code>
460462
</td>
@@ -544,7 +546,9 @@ If username.expression is set, the expression must produce a string value.
544546
If username.expression uses 'claims.email', then 'claims.email_verified' must be used in
545547
username.expression or extra[<em>].valueExpression or claimValidationRules[</em>].expression.
546548
An example claim validation rule expression that matches the validation automatically
547-
applied when username.claim is set to 'email' is 'claims.?email_verified.orValue(true)'.
549+
applied when username.claim is set to 'email' is 'claims.?email_verified.orValue(true) == true'. By explicitly comparing
550+
the value to true, we let type-checking see the result will be a boolean, and to make sure a non-boolean email_verified
551+
claim will be caught at runtime.<
548552
-->
549553
username 表示用户名属性的一个选项。
550554
声明的值必须是单一字符串。
@@ -555,6 +559,8 @@ applied when username.claim is set to 'email' is 'claims.?email_verified.orValue
555559
或 <code>claimValidationRules[*].expression</code> 中使用 'claims.email_verified'。
556560
这里有一个声明验证规则表达式的示例,当 username.claim 设置为 'email' 时与自动应用的验证所匹配:
557561
'claims.?email_verified.orValue(true)'。
562+
通过显式地将值与 true 进行比较,我们可以看到类型检查的结果将是一个布尔值,
563+
并确保在运行时捕获到非布尔值的 email_verified 声明。
558564
</p>
559565
<p>
560566
<!--
@@ -568,13 +574,13 @@ For prefix:
568574
behavior using authentication config, set username.prefix="<value of issuer.url>#"
569575
(3) --oidc-username-prefix="<value>". For the same behavior using authentication config, set username.prefix="<value>"
570576
-->
571-
在基于标志的方法中,--oidc-username-claim 和 --oidc-username-prefix
572-
是可选的。如果未设置 --oidc-username-claim,默认值为 &quot;sub&quot;
577+
在基于标志的方法中,<code>--oidc-username-claim</code><code>--oidc-username-prefix</code>
578+
是可选的。如果未设置 <code>--oidc-username-claim</code>,默认值为 &quot;sub&quot;
573579
对于身份认证配置,声明或前缀都没有默认值。声明和前缀必须显式设置。
574-
对于声明,如果在传统标志方法中未设置 --oidc-username-claim,
580+
对于声明,如果在传统标志方法中未设置 <code>--oidc-username-claim</code>
575581
请在身份认证配置中配置 username.claim=&quot;sub&quot;
576582
对于前缀:
577-
(1) --oidc-username-prefix="-", 未添加前缀到用户名。要实现相同的行为,请在身份认证配置中设置
583+
(1) --oidc-username-prefix="-"未添加前缀到用户名。要实现相同的行为,请在身份认证配置中设置
578584
username.prefix=&quot;&quot;
579585
(2) --oidc-username-prefix=&quot;&quot; 并且 --oidc-username-claim != &quot;email&quot;
580586
前缀为 &quot;&lt;--oidc-issuer-url 的值&gt;#&quot;。要实现相同的行为,请在身份认证配置中设置
@@ -598,8 +604,8 @@ If groups.expression is set, the expression must produce a string or string arra
598604
-->
599605
groups 表示 groups 属性的一个选项。
600606
其中 claim 字段的值必须是字符串或字符串数组。
601-
如果设置了 groups.claim,则必须指定 prefix 字段(可以是空字符串)。
602-
如果设置了 groups.expression,则该表达式必须生成一个字符串或字符串数组值。
607+
如果设置了 <code>groups.claim</code>,则必须指定 prefix 字段(可以是空字符串)。
608+
如果设置了 <code>groups.expression</code>,则该表达式必须生成一个字符串或字符串数组值。
603609
&quot;&quot;[] 和 null 值被视为不存在组映射。
604610
</p>
605611
</td>
@@ -616,7 +622,7 @@ If uid.expression is set, the expression must produce a string value.
616622
-->
617623
uid 表示 uid 属性的一个选项。
618624
其中的 claim 字段必须是一个字符串。
619-
如果设置了 uid.expression,则该表达式必须生成一个字符串值。
625+
如果设置了 <code>uid.expression</code>,则该表达式必须生成一个字符串值。
620626
</p>
621627
</td>
622628
</tr>
@@ -654,7 +660,9 @@ This will result in:
654660
- key: "foo"
655661
valueExpression: "'bar'"
656662
</pre>
657-
这将导致一个额外的属性 - foo: [&quot;bar&quot;]<br/>
663+
这将导致一个额外的属性 - foo: [&quot;bar&quot;]
664+
665+
<br/>
658666

659667
硬编码 key,value 从声明的值复制
660668
<pre>
@@ -708,8 +716,8 @@ ClaimOrExpression 为单个声明或表达式提供配置信息。
708716
<table class="table">
709717
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
710718
<tbody>
711-
712-
719+
720+
713721
<tr><td><code>claim</code><br/>
714722
<code>string</code>
715723
</td>
@@ -787,7 +795,7 @@ Only string claim keys are supported.
787795
Mutually exclusive with expression and message.
788796
-->
789797
claim 是所需要的声明的名称。
790-
与 --oidc-required-claim 标志相同。
798+
<code>--oidc-required-claim</code> 标志相同。
791799
仅支持用字符串声明键。
792800
与 expression 和 message 互斥。
793801
</p>
@@ -806,7 +814,7 @@ If claim is set and requiredValue is not set, the claim must be present with a v
806814
Mutually exclusive with expression and message.
807815
-->
808816
requiredValue 是声明中必须包含的值。
809-
与 --oidc-required-claim 标志相同。
817+
<code>--oidc-required-claim</code> 标志相同。
810818
仅支持用字符串声明值。
811819
如果设置了 claim 而未设置 requiredValue,则 claim 必须存在且值必须设置为空字符串。
812820
与 expression 和 message 互斥。
@@ -992,7 +1000,7 @@ key must be lowercase.
9921000
Required to be unique.
9931001
-->
9941002
key 是用作 extra 属性键的字符串。
995-
key 必须是域前缀路径(例如 example.org/foo)。第一个 &quot;/&quot; 之前的所有字符必须是符合
1003+
key 必须是域前缀路径(例如 <code>example.org/foo</code>)。第一个 &quot;/&quot; 之前的所有字符必须是符合
9961004
RFC 1123 定义的有效子域名。第一个 &quot;/&quot; 之后的所有字符必须是符合 RFC 3986
9971005
定义的有效 HTTP 路径字符。
9981006
key 必须是小写。必须是唯一的。
@@ -1015,7 +1023,7 @@ For example, a variable named 'sub' can be accessed as 'claims.sub'.
10151023
Nested claims can be accessed using dot notation, e.g. 'claims.foo.bar'.</li>
10161024
</ul>
10171025
<p>Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/</p>
1018-
-->
1026+
-->
10191027
<p>valueExpression 是一个 CEL 表达式,用于提取 extra 中的属性值。
10201028
valueExpression 必须生成一个字符串或字符串数组值。
10211029
&quot;&quot;[] 和 null 值被视为不存在 extra 映射。
@@ -1041,17 +1049,18 @@ Nested claims can be accessed using dot notation, e.g. 'claims.foo.bar'.</li>
10411049

10421050
- [JWTAuthenticator](#apiserver-k8s-io-v1alpha1-JWTAuthenticator)
10431051

1052+
<p>
10441053
<!--
1045-
<p>Issuer provides the configuration for an external provider's specific settings.</p>
1054+
Issuer provides the configuration for an external provider's specific settings.
10461055
-->
1047-
<p>Issuer 为外部提供者的特定设置提供配置。</p>
1048-
1056+
Issuer 为外部提供者的特定设置提供配置。
1057+
</p>
10491058

10501059
<table class="table">
10511060
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
10521061
<tbody>
1053-
1054-
1062+
1063+
10551064
<tr><td><code>url</code> <B><!--[Required]-->[必需]</B><br/>
10561065
<code>string</code>
10571066
</td>
@@ -1198,31 +1207,36 @@ Allowed values are:
11981207
</ol>
11991208
<ul>
12001209
<li>
1210+
<p>
12011211
<!--
1202-
<p>MatchAny: the &quot;aud&quot; claim in the presented JWT must match at least one of the entries in the &quot;audiences&quot; field.
1203-
For example, if &quot;audiences&quot; is [&quot;foo&quot;, &quot;bar&quot;], the &quot;aud&quot; claim in the presented JWT must contain either &quot;foo&quot; or &quot;bar&quot; (and may contain both).</p>
1212+
MatchAny: the &quot;aud&quot; claim in the presented JWT must match at least one of the entries in the &quot;audiences&quot; field.
1213+
For example, if &quot;audiences&quot; is [&quot;foo&quot;, &quot;bar&quot;], the &quot;aud&quot; claim in the presented JWT must contain either &quot;foo&quot; or &quot;bar&quot; (and may contain both).
12041214
-->
1205-
<p>MatchAny:所提供的 JWT 中的 &quot;aud&quot; 声明必须至少与 &quot;audiences&quot;
1215+
MatchAny:所提供的 JWT 中的 &quot;aud&quot; 声明必须至少与 &quot;audiences&quot;
12061216
字段中的一个条目匹配。例如,如果 &quot;audiences&quot;[&quot;foo&quot;, &quot;bar&quot;]
12071217
则所提供的 JWT 中的 &quot;aud&quot; 声明必须包含 &quot;foo&quot;&quot;bar&quot;(也可以同时包含两者)。
12081218
</p>
12091219
</li>
12101220
<li>
1221+
<p>
12111222
<!--
1212-
<p>&quot;&quot;: The match policy can be empty (or unset) when a single audience is specified in the &quot;audiences&quot; field. The &quot;aud&quot; claim in the presented JWT must contain the single audience (and may contain others).</p>
1223+
&quot;&quot;: The match policy can be empty (or unset) when a single audience is specified in the &quot;audiences&quot; field. The &quot;aud&quot; claim in the presented JWT must contain the single audience (and may contain others).
12131224
-->
1214-
<p>&quot;&quot;:当 &quot;audiences&quot; 字段中指定单个受众时,匹配策略可以为空(或未设置)。
1215-
所提供的 JWT 中的 &quot;aud&quot; 声明必须包含该单个受众(并且可以包含其他受众)。</p>
1225+
&quot;&quot;:当 &quot;audiences&quot; 字段中指定单个受众时,匹配策略可以为空(或未设置)。
1226+
所提供的 JWT 中的 &quot;aud&quot; 声明必须包含该单个受众(并且可以包含其他受众)。
1227+
</p>
12161228
</li>
12171229
</ul>
1230+
<p>
12181231
<!--
1219-
<p>For more nuanced audience validation, use claimValidationRules.
1220-
example: claimValidationRule[].expression: 'sets.equivalent(claims.aud, [&quot;bar&quot;, &quot;foo&quot;, &quot;baz&quot;])' to require an exact match.</p>
1232+
For more nuanced audience validation, use claimValidationRules.
1233+
example: claimValidationRule[].expression: 'sets.equivalent(claims.aud, [&quot;bar&quot;, &quot;foo&quot;, &quot;baz&quot;])' to require an exact match.
12211234
-->
1222-
<p>对于更精细的受众验证,请使用 claimValidationRules。
1235+
对于更精细的受众验证,请使用 claimValidationRules。
12231236
示例:claimValidationRule[].expression:
12241237
'sets.equivalent(claims.aud, [&quot;bar&quot;, &quot;foo&quot;, &quot;baz&quot;])'
1225-
以要求精确匹配。</p>
1238+
以要求精确匹配。
1239+
</p>
12261240
</td>
12271241
</tr>
12281242
</tbody>
@@ -1318,7 +1332,7 @@ The validation rules are logically ANDed together and must all return true for t
13181332
<table class="table">
13191333
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
13201334
<tbody>
1321-
1335+
13221336
<tr><td><code>claim</code><br/>
13231337
<code>string</code>
13241338
</td>
@@ -1590,7 +1604,7 @@ UDSTransport 设置通过 UDS 连接 konnectivity 服务器时需要的信息。
15901604
<tbody>
15911605

15921606

1593-
<tr><td><code>udsName</code> <B>[必需]</B><br/>
1607+
<tr><td><code>udsName</code> <B><!--[Required]-->[必需]</B><br/>
15941608
<code>string</code>
15951609
</td>
15961610
<td>
@@ -1687,7 +1701,7 @@ API 文档:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28
16871701
<table class="table">
16881702
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
16891703
<tbody>
1690-
1704+
16911705
<tr><td><code>authorizedTTL</code> <B><!--[Required]-->[必需]</B><br/>
16921706
<a href="https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
16931707
</td>
@@ -1745,7 +1759,7 @@ Same as setting <code>--authorization-webhook-version</code> flag
17451759
Valid values: v1beta1, v1
17461760
Required, no default value</p>
17471761
-->
1748-
<p>要发送到 Webhook 并期望从 Webhook 获得的 authorization.k8s.io SubjectAccessReview 的 API 版本。
1762+
<p>要发送到 Webhook 并期望从 Webhook 获得的 <code>authorization.k8s.io</code> SubjectAccessReview 的 API 版本。
17491763
与设置 <code>--authorization-webhook-version</code> 标志相同。
17501764
有效值:v1beta1、v1。必需,无默认值</p>
17511765
</td>
@@ -1905,8 +1919,8 @@ Required, if connectionInfo.Type is KubeConfig
19051919
<table class="table">
19061920
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
19071921
<tbody>
1908-
1909-
1922+
1923+
19101924
<tr><td><code>expression</code> <B><!--[Required]-->[必需]</B><br/>
19111925
<code>string</code>
19121926
</td>

0 commit comments

Comments
 (0)