-
Notifications
You must be signed in to change notification settings - Fork 1.8k
explain multi-project quota #2596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
[[admin-guide-muliproject-quota]] | ||
= Multi-Project Quotas | ||
{product-author} | ||
{product-version} | ||
:data-uri: | ||
:icons: | ||
:experimental: | ||
:toc: macro | ||
:toc-title: | ||
:prewrap!: | ||
|
||
toc::[] | ||
|
||
== Overview | ||
|
||
A multi-project quota, defined by a `*ClusterResourceQuota*` object, allows xref:../admin_guide/quota.adoc#admin-guide-quota[quota] | ||
to be shared across multiple projects. Resources used in each selected project | ||
will be aggregated and that aggregate will be used to limit resources across | ||
all the selected projects. | ||
|
||
[[multi-project-quotas-selecting-projects]] | ||
=== Selecting Projects | ||
|
||
Projects can be selected based on either annotation selection, label selection, or both. | ||
For example, `oc create clusterquota for-user --project-annotation-selector openshift.io/requester=<user-name> --hard pods=10 --hard secrets=20` | ||
creates: | ||
|
||
==== | ||
[source,yaml] | ||
---- | ||
apiVersion: v1 | ||
kind: ClusterResourceQuota | ||
metadata: | ||
name: for-user | ||
spec: | ||
quota: <1> | ||
hard: | ||
pods: "10" | ||
secrets: "20" | ||
selector: | ||
annotations: <2> | ||
openshift.io/requester: <user-name> | ||
labels: null <3> | ||
status: | ||
namespaces: <4> | ||
- namespace: ns-one | ||
status: | ||
hard: | ||
pods: "10" | ||
secrets: "20" | ||
used: | ||
pods: "1" | ||
secrets: "9" | ||
total: <5> | ||
hard: | ||
pods: "10" | ||
secrets: "20" | ||
used: | ||
pods: "1" | ||
secrets: "9" | ||
---- | ||
<1> The ResourceQuotaSpec object that will be enforced over the selected projects | ||
<2> A simple key/value selector for annotations | ||
<3> A label selector that can be used to select projects | ||
<4> A per-namespace map that describes current quota usage in each selected project | ||
<5> The aggregate usage across all selected projects | ||
==== | ||
|
||
This multi-project quota document will control all projects requested by `"<user-name>"` using the default | ||
project request endpoint. He will be limited to ten pods and twenty secrets. | ||
|
||
|
||
[[multi-project-quotas-viewing-applicable-clusterresourcequotas]] | ||
=== Viewing Applicable ClusterResourceQuotas | ||
|
||
A project-admin is not allowed to create or modify the multi-project quota that limits | ||
him, but he is allowed to view the multi-project quota documents are applied to his project. | ||
He can do this via the `*AppliedClusterResourceQuota*` resource. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. write doc gender neutral |
||
|
||
`oc describe AppliedClusterResourceQuota` produces: | ||
|
||
==== | ||
---- | ||
Name: for-user | ||
Namespace: <none> | ||
Created: 19 hours ago | ||
Labels: <none> | ||
Annotations: <none> | ||
Label Selector: <null> | ||
AnnotationSelector: map[openshift.io/requester:<user-name>] | ||
Resource Used Hard | ||
-------- ---- ---- | ||
pods 1 10 | ||
secrets 9 20 | ||
---- | ||
==== | ||
|
||
|
||
[[multi-project-quotas-selection-granularity]] | ||
=== Selection Granularity | ||
|
||
Because of the locking consideration when claiming quota allocations, the | ||
number of active projects selected by a multi-project quota is an important consideration. | ||
Selecting more than 100 projects under a single multi-project quota may have | ||
deleterious effects on API server responsiveness in those projects. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. deterious? |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add an anchor just above the heading:
[[multi-project-quotas-selecting-projects]]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done