Skip to content

Commit

Permalink
Update docs for v1 resource quota configuration (#17547)
Browse files Browse the repository at this point in the history
  • Loading branch information
liggitt authored and k8s-ci-robot committed Nov 27, 2019
1 parent 88ce6af commit 7990056
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions content/en/docs/concepts/policy/resource-quotas.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

{{< tabs name="example1" >}}
{{% tab name="apiserver.config.k8s.io/v1" %}}
```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
kind: AdmissionConfiguration
plugins:
- name: "ResourceQuota"
configuration:
# Deprecated in v1.17 in favor of apiserver.config.k8s.io/v1, ResourceQuotaConfiguration
apiVersion: resourcequota.admission.k8s.io/v1beta1
kind: Configuration
limitedResources:
Expand All @@ -552,6 +573,8 @@ plugins:
operator: In
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.
For example:
Expand Down

0 comments on commit 7990056

Please sign in to comment.