mirror of
https://github.com/clearlinux/cloud-native-setup.git
synced 2026-08-25 17:45:52 +00:00
Re-organize tests,Add resource/limits/runtimeclass
Currently cpumanagerpolicy:static is partially broken. Hope these files catch future regressions Added a script to generate yamls for different runtimeclass from a template with different resource constraints on the pod Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
This commit is contained in:
committed by
Saikrishna Edupuganti
parent
f238ed6db1
commit
b925d25730
@@ -80,7 +80,7 @@ runtime class set to "kata" will launch the POD/Deployment with Kata.
|
||||
|
||||
An example is
|
||||
|
||||
`kubectl apply -f tests/test-deploy-kata-qemu.yaml`
|
||||
`kubectl apply -f tests/deploy-svc-ing/test-deploy-kata-qemu.yaml`
|
||||
|
||||
### Running Kata Workloads with Firecracker
|
||||
|
||||
@@ -89,7 +89,7 @@ with firecracker as the isolation mechanism for Kata.
|
||||
|
||||
An example is
|
||||
|
||||
`kubectl apply -f tests/test-deploy-kata-fc.yaml`
|
||||
`kubectl apply -f tests/deploy-svc-ing/test-deploy-kata-fc.yaml`
|
||||
|
||||
## Making Kata the default runtime
|
||||
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
input="test-cpumanager.yaml.tmpl"
|
||||
|
||||
filename() {
|
||||
echo "test-cpumanager-$1.yaml"
|
||||
}
|
||||
|
||||
for runtimeclass in runc kata-qemu kata-fc; do
|
||||
output=$(filename $runtimeclass)
|
||||
cp $input $output
|
||||
sed -i "s/__runtimeclass__/$runtimeclass/g" $output
|
||||
if [ $runtimeclass == "runc" ]; then continue; fi
|
||||
|
||||
insertline="\ \ runtimeClassName: $runtimeclass"
|
||||
sed -i "/spec:/a $insertline" $output
|
||||
done
|
||||
kubectl apply -f .
|
||||
@@ -0,0 +1,92 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: test-cpumanager-guaranteed-__runtimeclass__
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: busy
|
||||
image: busybox
|
||||
command: [ "top" ]
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1
|
||||
memory: 100Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: test-cpumanager-burstable-integer-limit-__runtimeclass__
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: busy
|
||||
image: busybox
|
||||
command: [ "top" ]
|
||||
resources:
|
||||
requests:
|
||||
cpu: 1
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: 2
|
||||
memory: 500Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: test-cpumanager-burstable-float-limit-__runtimeclass__
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: busy
|
||||
image: busybox
|
||||
command: [ "top" ]
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: 1
|
||||
memory: 500Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: test-cpumanager-burstable-integer-__runtimeclass__
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: busy
|
||||
image: busybox
|
||||
command: [ "top" ]
|
||||
resources:
|
||||
requests:
|
||||
cpu: 1
|
||||
memory: 100Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: test-cpumanager-burstable-float-__runtimeclass__
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: busy
|
||||
image: busybox
|
||||
command: [ "top" ]
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 100Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: test-cpumanager-besteffort-__runtimeclass__
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: busy
|
||||
image: busybox
|
||||
command: [ "top" ]
|
||||
@@ -1,16 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: test-cpumanager-kata
|
||||
spec:
|
||||
runtimeClassName: kata
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: taskset
|
||||
image: busybox
|
||||
command: [ "taskset", "-p", "1" ]
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1
|
||||
memory: 500Mi
|
||||
@@ -1,15 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: test-cpumanager-runc
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: taskset
|
||||
image: busybox
|
||||
command: [ "taskset", "-p", "1" ]
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1
|
||||
memory: 100Mi
|
||||
Reference in New Issue
Block a user