You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -683,7 +645,7 @@ When faced with an admission decision, the API Server POSTs a JSON serialized `i
683
645
Pod 注解。
684
646
685
647
<!--
686
-
Note that webhook API objects are subject to the same versioning compatibility rules as other Kubernetes API objects. Implementers should be aware of looser compatibility promises for alpha objects and check the "apiVersion" field of the request to ensure correct deserialization. Additionally, the API Server must enable the imagepolicy.k8s.io/v1alpha1 API extensions group (`--runtime-config=imagepolicy.k8s.io/v1alpha1=true`).
648
+
Note that webhook API objects are subject to the same versioning compatibility rules as other Kubernetes API objects. Implementers should be aware of looser compatibility promises for alpha objects and check the "apiVersion" field of the request to ensure correct deserialization. Additionally, the API Server must enable the `imagepolicy.k8s.io/v1alpha1` API extensions group (`--runtime-config=imagepolicy.k8s.io/v1alpha1=true`).
687
649
-->
688
650
注意,Webhook API 对象与其他 Kubernetes API 对象一样受制于相同的版本控制兼容性规则。
689
651
实现者应该知道对 alpha 对象的更宽松的兼容性,并检查请求的 "apiVersion" 字段,
@@ -718,10 +680,10 @@ An example request body:
718
680
```
719
681
720
682
<!--
721
-
The remote service is expected to fill the `ImageReviewStatus` field of the request and respond to either allow or disallow access. The response body's "spec" field is ignored and may be omitted. A permissive response would return:
683
+
The remote service is expected to fill the `ImageReviewStatus` field of the request and respond to either allow or disallow access. The response body's `spec` field is ignored and may be omitted. A permissive response would return:
722
684
-->
723
685
远程服务将填充请求的 `ImageReviewStatus` 字段,并返回允许或不允许访问的响应。
724
-
响应体的 "spec" 字段会被忽略,并且可以省略。一个允许访问应答会返回:
686
+
响应体的 `spec` 字段会被忽略,并且可以省略。一个允许访问应答会返回:
725
687
726
688
```json
727
689
{
@@ -782,10 +744,9 @@ Examples of information you might put here are:
782
744
* 向策略服务器提供一个提示,用于提供镜像的 imageID,以方便它进行查找。
783
745
784
746
<!--
785
-
In any case, the annotations are provided by the user and are not validated by Kubernetes in any way. In the future, if an annotation is determined to be widely useful, it may be promoted to a named field of `ImageReviewSpec`.
747
+
In any case, the annotations are provided by the user and are not validated by Kubernetes in any way.
After enabling the `ExpandPersistentVolumes` feature gate, enabling the `PersistentVolumeClaimResize` admission
1012
-
controller is recommended, too. This admission controller prevents resizing of all claims by default unless a claim's `StorageClass`
967
+
Enabling the `PersistentVolumeClaimResize` admission controller is recommended. This admission controller prevents resizing of all claims by default unless a claim's `StorageClass`
1013
968
explicitly enables resizing by setting `allowVolumeExpansion` to `true`.
1014
969
1015
970
For example: all `PersistentVolumeClaim`s created from the following `StorageClass` support volume expansion:
@@ -1099,8 +1053,6 @@ Reference the `PodNodeSelector` configuration file from the file provided to the
1099
1053
基于提供给 API 服务器命令行标志 `--admission-control-config-file` 的文件名,
1100
1054
从文件中引用 `PodNodeSelector` 配置文件:
1101
1055
1102
-
{{< tabs name="podnodeselector_example1" >}}
1103
-
{{% tab name="apiserver.config.k8s.io/v1" %}}
1104
1056
```yaml
1105
1057
apiVersion: apiserver.config.k8s.io/v1
1106
1058
kind: AdmissionConfiguration
@@ -1109,19 +1061,6 @@ plugins:
1109
1061
path: podnodeselector.yaml
1110
1062
...
1111
1063
```
1112
-
{{% /tab %}}
1113
-
{{% tab name="apiserver.k8s.io/v1alpha1" %}}
1114
-
```yaml
1115
-
# 在 v1.17 中废弃,以鼓励使用 apiserver.config.k8s.io/v1
1116
-
apiVersion: apiserver.k8s.io/v1alpha1
1117
-
kind: AdmissionConfiguration
1118
-
plugins:
1119
-
- name: PodNodeSelector
1120
-
path: podnodeselector.yaml
1121
-
...
1122
-
```
1123
-
{{% /tab %}}
1124
-
{{< /tabs >}}
1125
1064
1126
1065
<!--
1127
1066
#### Configuration Annotation Format
@@ -1283,21 +1222,26 @@ objects in your Kubernetes deployment, you MUST use this admission controller to
1283
1222
执行配额限制。
1284
1223
1285
1224
<!--
1286
-
See the [resourceQuota design doc](https://git.k8s.io/community/contributors/design-proposals/resource-management/admission_control_resource_quota.md) and the [example of Resource Quota](/docs/concepts/policy/resource-quotas/) for more details.
1225
+
See the [ResourceQuota API reference](/docs/reference/kubernetes-api/policy-resources/resource-quota-v1/)
1226
+
and the [example of Resource Quota](/docs/concepts/policy/resource-quotas/) for more details.
If you enable the `PodOverhead` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/), and define a RuntimeClass with [Pod overhead](/docs/concepts/scheduling-eviction/pod-overhead/) configured, this admission controller checks incoming
1299
-
Pods. When enabled, this admission controller rejects any Pod create requests that have the overhead already set.
1300
-
For Pods that have a RuntimeClass is configured and selected in their `.spec`, this admission controller sets `.spec.overhead` in the Pod based on the value defined in the corresponding RuntimeClass.
1238
+
If you define a RuntimeClass with [Pod overhead](/docs/concepts/scheduling-eviction/pod-overhead/)
1239
+
configured, this admission controller checks incoming Pods.
1240
+
When enabled, this admission controller rejects any Pod create requests
1241
+
that have the overhead already set.
1242
+
For Pods that have a RuntimeClass configured and selected in their `.spec`,
1243
+
this admission controller sets `.spec.overhead` in the Pod based on the value
1244
+
defined in the corresponding RuntimeClass.
1301
1245
1302
1246
{{< note >}}
1303
1247
The `.spec.overhead` field for Pod and the `.overhead` field for RuntimeClass are both in beta. If you do not enable the `PodOverhead` feature gate, all Pods are treated as if `.spec.overhead` is unset.
0 commit comments