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

Commit b6a81a7

Browse files
authored
Merge pull request #316 from agilgur5/docs-hrq-quickstart-style-guide
docs: apply k8s style guide to HRQ quickstart example
2 parents ce1aba4 + 20400c5 commit b6a81a7

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

docs/user-guide/quickstart.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -477,14 +477,13 @@ acme-org
477477
If you create a `HierarchicalResourceQuota` in namespace `acme-org`, the sum of
478478
all subnamespaces' resources can't surpass the HRQ.
479479

480-
We will demonstrate how it works using services, but you could also limit `cpu`,
481-
`memory`, or any other `ResourceQuota` field.
480+
This example demonstrates how it works using services, but you could also limit
481+
`cpu`, `memory`, or any other `ResourceQuota` field.
482482

483483
> _Note: Decimal point values cannot be specified (you can't do `cpu: 1.5`, but
484484
> you can do `cpu: "1.5"` or `cpu: 1500m`). See [#292](https://github.com/kubernetes-sigs/hierarchical-namespaces/issues/292)_
485485

486-
Creating the HRQ:
487-
486+
Create the HRQ:
488487
```bash
489488
kubectl apply -f - << EOF
490489
apiVersion: hnc.x-k8s.io/v1alpha2
@@ -498,16 +497,16 @@ spec:
498497
EOF
499498
```
500499

501-
Lets create Service in namespace `team-a`:
500+
Create a Service in namespace `team-a`:
502501
```bash
503502
kubectl create service clusterip team-a-svc --clusterip=None -n team-a
504503
```
505504

506-
And when we try to create Service in namespace `team-b`:
505+
Now, when you try to create a Service in namespace `team-b`:
507506
```bash
508507
kubectl create service clusterip team-b-svc --clusterip=None -n team-b
509508
```
510-
We get an error:
509+
You get an error:
511510
```
512511
Error from server (Forbidden):
513512
error when creating "STDIN":
@@ -528,13 +527,13 @@ acme-org services: 1/1
528527
```
529528
You can also view HRQs in all namespaces by running `kubectl get hrq -A`.
530529

531-
> _Note: If you execute `kubectl get qouta` in namespace `acme-org`, `team-a` or `team-b`,
530+
> _Note: If you execute `kubectl get qouta` in namespace `acme-org`, `team-a` or `team-b`,
532531
> you will see `ResourceQuota` objects named `hrq.hnc.x-k8s.io`.
533532
> But it is part of the internal implementation of hierarchical resource quotas and shouldn't be modified or
534533
> inspected directly.
535-
> Also if you inspect the namespace information
536-
> using `kubectl describe ns <NAMESPACE NAME>`,
537-
> you may see Resource Quotas imformation of
534+
> Also if you inspect the namespace information
535+
> using `kubectl describe ns <NAMESPACE NAME>`,
536+
> you may see Resource Quotas imformation of
538537
> `hrq.hnc.x-k8s.io`, which is also the case([#275](https://github.com/kubernetes-sigs/hierarchical-namespaces/issues/275))._
539538

540539
And finally, you can delete the HRQ by deleting the CR:
@@ -645,7 +644,7 @@ kubectl hns set service-1 -a
645644
You can check if the `service-1` cascading deletion is enabled from its `.spec.allowCascadingDeletion` field of `HierarchyConfiguration`. If the value is `true`, it's enabled.
646645

647646
```bash
648-
kubectl get hierarchyconfiguration hierarchy -o jsonpath='{.spec}' -n service-1
647+
kubectl get hierarchyconfiguration hierarchy -o jsonpath='{.spec}' -n service-1
649648
```
650649

651650
Expected output:
@@ -715,19 +714,19 @@ team-a
715714
```
716715

717716

718-
As the same of `service-1`, you can't delete `service-4` subnamespace which is
717+
As the same of `service-1`, you can't delete `service-4` subnamespace which is
719718
a parent of `staging` full namespace.
720719

721-
This is both to be consistent with how subnamespaces are treated,
722-
and also because deleting `service-4` will delete any propagated objects
720+
This is both to be consistent with how subnamespaces are treated,
721+
and also because deleting `service-4` will delete any propagated objects
723722
inside `staging`.
724723

725724
```bash
726725
kubectl delete subns service-4 -n team-a
727726
# forbidden
728727
```
729728

730-
So you need to make `service-4` subnamespace `"allowCascadingDeletion":true` to
729+
So you need to make `service-4` subnamespace `"allowCascadingDeletion":true` to
731730
delete it.
732731

733732
```bash

0 commit comments

Comments
 (0)