Merge pull request #25948 from ydFu/add-code-blocks

Add Code blocks in limit-storage-consumption.md
This commit is contained in:
Kubernetes Prow Robot
2021-01-04 23:47:57 -08:00
committed by GitHub
@@ -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.