Update docs for v1 resource quota configuration (#17547)
This commit is contained in:
committed by
Bob Killen
parent
162292ac2f
commit
1bdaa20400
@@ -537,12 +537,33 @@ With this mechanism, operators will be able to restrict usage of certain high pr
|
|||||||
|
|
||||||
To enforce this, kube-apiserver flag `--admission-control-config-file` should be used to pass path to the following configuration file:
|
To enforce this, kube-apiserver flag `--admission-control-config-file` should be used to pass path to the following configuration file:
|
||||||
|
|
||||||
|
{{< tabs name="example1" >}}
|
||||||
|
{{% tab name="apiserver.config.k8s.io/v1" %}}
|
||||||
```yaml
|
```yaml
|
||||||
|
apiVersion: apiserver.config.k8s.io/v1
|
||||||
|
kind: AdmissionConfiguration
|
||||||
|
plugins:
|
||||||
|
- name: "ResourceQuota"
|
||||||
|
configuration:
|
||||||
|
apiVersion: apiserver.config.k8s.io/v1
|
||||||
|
kind: ResourceQuotaConfiguration
|
||||||
|
limitedResources:
|
||||||
|
- resource: pods
|
||||||
|
matchScopes:
|
||||||
|
- scopeName: PriorityClass
|
||||||
|
operator: In
|
||||||
|
values: ["cluster-services"]
|
||||||
|
```
|
||||||
|
{{% /tab %}}
|
||||||
|
{{% tab name="apiserver.k8s.io/v1alpha1" %}}
|
||||||
|
```yaml
|
||||||
|
# Deprecated in v1.17 in favor of apiserver.config.k8s.io/v1
|
||||||
apiVersion: apiserver.k8s.io/v1alpha1
|
apiVersion: apiserver.k8s.io/v1alpha1
|
||||||
kind: AdmissionConfiguration
|
kind: AdmissionConfiguration
|
||||||
plugins:
|
plugins:
|
||||||
- name: "ResourceQuota"
|
- name: "ResourceQuota"
|
||||||
configuration:
|
configuration:
|
||||||
|
# Deprecated in v1.17 in favor of apiserver.config.k8s.io/v1, ResourceQuotaConfiguration
|
||||||
apiVersion: resourcequota.admission.k8s.io/v1beta1
|
apiVersion: resourcequota.admission.k8s.io/v1beta1
|
||||||
kind: Configuration
|
kind: Configuration
|
||||||
limitedResources:
|
limitedResources:
|
||||||
@@ -552,6 +573,8 @@ plugins:
|
|||||||
operator: In
|
operator: In
|
||||||
values: ["cluster-services"]
|
values: ["cluster-services"]
|
||||||
```
|
```
|
||||||
|
{{% /tab %}}
|
||||||
|
{{< /tabs >}}
|
||||||
|
|
||||||
Now, "cluster-services" pods will be allowed in only those namespaces where a quota object with a matching `scopeSelector` is present.
|
Now, "cluster-services" pods will be allowed in only those namespaces where a quota object with a matching `scopeSelector` is present.
|
||||||
For example:
|
For example:
|
||||||
|
|||||||
Reference in New Issue
Block a user