Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 60c541b

Browse files
committed
provided better hrq example of usage
Signed-off-by: unknown <[email protected]>
1 parent 8833eca commit 60c541b

File tree

1 file changed

+41
-5
lines changed

1 file changed

+41
-5
lines changed

docs/user-guide/concepts.md

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,48 @@ You can create a subnamespace from the command line via `kubectl hns create chil
225225

226226
### Hierarchical resource quotas (HRQs)
227227

228-
When you want to give some amount of resources to `team-a`, and want them to be able
229-
to distrtibute their resources between themselves, you create a `HierarchicalResourceQuota`
230-
in namespace `team-a`. Any member from `team-a` can create their own `HierarchicalResourceQuota`
231-
in his subnamespace, and the sum of all resources from all the subnamespaces of the
228+
When you want to give some amount of resources to `team-a`, and want them to be able to
229+
flexibly use resources in any of their subnamespaces, you create a `HierarchicalResourceQuota`
230+
in namespace `team-a`. The sum of all resources from all the subnamespaces of the
232231
members wont be over the amount of resources that is configured in
233-
`HierarchicalResourceQuota` of namespace `team-a`.
232+
`HierarchicalResourceQuota` of namespace `team-a`. All of the reasources of `team-a` are
233+
equally shared between the applications in their subnamespaces, which is very efficient.
234+
235+
You have the struggle that each time some team calls you and asks you to modify their
236+
`ResourceQuota` or namespaces structure? HRQ fixes it!
237+
With the following teams tree:
238+
```
239+
company-a
240+
├── organization-a
241+
│ ├── org-a-team-1
242+
│ ├── org-a-team-2
243+
│ ...
244+
├── organization-b
245+
│ ├── org-b-team-1
246+
│ ├── org-b-team-2
247+
│ ...
248+
...
249+
```
250+
Instead of each team askin from the `cluster-admin` to modify their ResourceQuota,
251+
you can make the following namespace hierarchy:
252+
```
253+
company-a-restrictions
254+
└── [s] company-a
255+
```
256+
And put the resources HRQ in the `company-a-restrictions` namespace. This will restrict
257+
whole `company-a` to the amount of resources that they are paying for. Then `company-a`
258+
can do similar HRQ with their organizations:
259+
```
260+
company-a-restrictions (has HRQ)
261+
└── [s] company-a
262+
├── [s] org-a-restrictions (has HRQ)
263+
│ └── [s] organization-a
264+
├── [s] org-b-restrictions (has HRQ)
265+
│ └── [s] organization-b
266+
...
267+
```
268+
This way each individual can fairly and securely distribute their resources across
269+
their members.
234270

235271
when creating `HierarchicalResourceQuota`, HNC automatically creates `ResourceQuota`
236272
with name `local-impl-hrq` and propogates it to all subnamespaces. It monitors

0 commit comments

Comments
 (0)