Documentation LimitRange Policies (#14086)
* Documentation LimitRange Policies * Fixing limirange docs issues * Style and grammar * Reviewer wanted * syntax and grammar feedbacks
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
6b46deab6e
commit
37df3efaf9
@@ -0,0 +1,19 @@
|
||||
apiVersion: v1
|
||||
kind: LimitRange
|
||||
metadata:
|
||||
name: limit-mem-cpu-per-container
|
||||
spec:
|
||||
limits:
|
||||
- max:
|
||||
cpu: "800m"
|
||||
memory: "1Gi"
|
||||
min:
|
||||
cpu: "100m"
|
||||
memory: "99Mi"
|
||||
default:
|
||||
cpu: "700m"
|
||||
memory: "900Mi"
|
||||
defaultRequest:
|
||||
cpu: "110m"
|
||||
memory: "111Mi"
|
||||
type: Container
|
||||
@@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: LimitRange
|
||||
metadata:
|
||||
name: limit-mem-cpu-per-pod
|
||||
spec:
|
||||
limits:
|
||||
- max:
|
||||
cpu: "2"
|
||||
memory: "2Gi"
|
||||
type: Pod
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: LimitRange
|
||||
metadata:
|
||||
name: limit-memory-ratio-pod
|
||||
spec:
|
||||
limits:
|
||||
- maxLimitRequestRatio:
|
||||
memory: 2
|
||||
type: Pod
|
||||
@@ -0,0 +1,37 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: busybox1
|
||||
spec:
|
||||
containers:
|
||||
- name: busybox-cnt01
|
||||
image: busybox
|
||||
command: ["/bin/sh"]
|
||||
args: ["-c", "while true; do echo hello from cnt01; sleep 10;done"]
|
||||
resources:
|
||||
requests:
|
||||
memory: "100Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "200Mi"
|
||||
cpu: "500m"
|
||||
- name: busybox-cnt02
|
||||
image: busybox
|
||||
command: ["/bin/sh"]
|
||||
args: ["-c", "while true; do echo hello from cnt02; sleep 10;done"]
|
||||
resources:
|
||||
requests:
|
||||
memory: "100Mi"
|
||||
cpu: "100m"
|
||||
- name: busybox-cnt03
|
||||
image: busybox
|
||||
command: ["/bin/sh"]
|
||||
args: ["-c", "while true; do echo hello from cnt03; sleep 10;done"]
|
||||
resources:
|
||||
limits:
|
||||
memory: "200Mi"
|
||||
cpu: "500m"
|
||||
- name: busybox-cnt04
|
||||
image: busybox
|
||||
command: ["/bin/sh"]
|
||||
args: ["-c", "while true; do echo hello from cnt04; sleep 10;done"]
|
||||
@@ -0,0 +1,37 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: busybox2
|
||||
spec:
|
||||
containers:
|
||||
- name: busybox-cnt01
|
||||
image: busybox
|
||||
command: ["/bin/sh"]
|
||||
args: ["-c", "while true; do echo hello from cnt01; sleep 10;done"]
|
||||
resources:
|
||||
requests:
|
||||
memory: "100Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "200Mi"
|
||||
cpu: "500m"
|
||||
- name: busybox-cnt02
|
||||
image: busybox
|
||||
command: ["/bin/sh"]
|
||||
args: ["-c", "while true; do echo hello from cnt02; sleep 10;done"]
|
||||
resources:
|
||||
requests:
|
||||
memory: "100Mi"
|
||||
cpu: "100m"
|
||||
- name: busybox-cnt03
|
||||
image: busybox
|
||||
command: ["/bin/sh"]
|
||||
args: ["-c", "while true; do echo hello from cnt03; sleep 10;done"]
|
||||
resources:
|
||||
limits:
|
||||
memory: "200Mi"
|
||||
cpu: "500m"
|
||||
- name: busybox-cnt04
|
||||
image: busybox
|
||||
command: ["/bin/sh"]
|
||||
args: ["-c", "while true; do echo hello from cnt04; sleep 10;done"]
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: busybox3
|
||||
spec:
|
||||
containers:
|
||||
- name: busybox-cnt01
|
||||
image: busybox
|
||||
resources:
|
||||
limits:
|
||||
memory: "300Mi"
|
||||
requests:
|
||||
memory: "100Mi"
|
||||
@@ -0,0 +1,10 @@
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: pvc-limit-greater
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
@@ -0,0 +1,10 @@
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: pvc-limit-lower
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 500Mi
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: LimitRange
|
||||
metadata:
|
||||
name: storagelimits
|
||||
spec:
|
||||
limits:
|
||||
- type: PersistentVolumeClaim
|
||||
max:
|
||||
storage: 2Gi
|
||||
min:
|
||||
storage: 1Gi
|
||||
@@ -320,6 +320,12 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||
"cpu-defaults-pod": {&api.Pod{}},
|
||||
"cpu-defaults-pod-2": {&api.Pod{}},
|
||||
"cpu-defaults-pod-3": {&api.Pod{}},
|
||||
"limit-mem-cpu-container": {&api.LimitRange{}},
|
||||
"limit-mem-cpu-pod": {&api.LimitRange{}},
|
||||
"limit-range-pod-1": {&api.Pod{}},
|
||||
"limit-range-pod-2": {&api.Pod{}},
|
||||
"limit-range-pod-3": {&api.Pod{}},
|
||||
"limit-memory-ratio-pod": {&api.LimitRange{}},
|
||||
"memory-constraints": {&api.LimitRange{}},
|
||||
"memory-constraints-pod": {&api.Pod{}},
|
||||
"memory-constraints-pod-2": {&api.Pod{}},
|
||||
@@ -329,6 +335,8 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||
"memory-defaults-pod": {&api.Pod{}},
|
||||
"memory-defaults-pod-2": {&api.Pod{}},
|
||||
"memory-defaults-pod-3": {&api.Pod{}},
|
||||
"pvc-limit-lower": {&api.PersistentVolumeClaim{}},
|
||||
"pvc-limit-greater": {&api.PersistentVolumeClaim{}},
|
||||
"quota-mem-cpu": {&api.ResourceQuota{}},
|
||||
"quota-mem-cpu-pod": {&api.Pod{}},
|
||||
"quota-mem-cpu-pod-2": {&api.Pod{}},
|
||||
@@ -337,6 +345,7 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||
"quota-objects-pvc-2": {&api.PersistentVolumeClaim{}},
|
||||
"quota-pod": {&api.ResourceQuota{}},
|
||||
"quota-pod-deployment": {&apps.Deployment{}},
|
||||
"storagelimits": {&api.LimitRange{}},
|
||||
},
|
||||
"admin/sched": {
|
||||
"my-scheduler": {&api.ServiceAccount{}, &rbac.ClusterRoleBinding{}, &apps.Deployment{}},
|
||||
@@ -405,8 +414,8 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||
"zookeeper": {&api.Service{}, &api.Service{}, &policy.PodDisruptionBudget{}, &apps.StatefulSet{}},
|
||||
},
|
||||
"configmap": {
|
||||
"configmaps": {&api.ConfigMap{}, &api.ConfigMap{}},
|
||||
"configmap-multikeys": {&api.ConfigMap{}},
|
||||
"configmaps": {&api.ConfigMap{}, &api.ConfigMap{}},
|
||||
"configmap-multikeys": {&api.ConfigMap{}},
|
||||
},
|
||||
"controllers": {
|
||||
"daemonset": {&apps.DaemonSet{}},
|
||||
|
||||
Reference in New Issue
Block a user