Add Code blocks in limit-storage-consumption.md

* Add Code blocks in the Markdown spec to make it easy to read.

Signed-off-by: ydFu <ader.ydfu@gmail.com>
This commit is contained in:
ydFu
2021-01-05 10:55:47 +08:00
parent f8fd6d9bea
commit 8d50a4c4d7
@@ -12,7 +12,6 @@ The following resources are used in the demonstration: [ResourceQuota](/docs/con
and [PersistentVolumeClaim](/docs/concepts/storage/persistent-volumes/).
## {{% heading "prerequisites" %}}
@@ -41,7 +40,7 @@ the values set by the admin.
In this example, a PVC requesting 10Gi of storage would be rejected because it exceeds the 2Gi max.
```
```yaml
apiVersion: v1
kind: LimitRange
metadata:
@@ -67,7 +66,7 @@ In this example, a 6th PVC in the namespace would be rejected because it exceeds
a 5Gi maximum quota when combined with the 2Gi max limit above, cannot have 3 PVCs where each has 2Gi. That would be 6Gi requested
for a namespace capped at 5Gi.
```
```yaml
apiVersion: v1
kind: ResourceQuota
metadata:
@@ -78,8 +77,6 @@ spec:
requests.storage: "5Gi"
```
<!-- discussion -->
## Summary
@@ -87,7 +84,3 @@ spec:
A limit range can put a ceiling on how much storage is requested while a resource quota can effectively cap the storage
consumed by a namespace through claim counts and cumulative storage capacity. The allows a cluster-admin to plan their
cluster's storage budget without risk of any one project going over their allotment.