Introduce a churnOp to scheduler perf testing framework

- support two modes: recreate and create
- use DynmaicClient to create API objects
This commit is contained in:
Wei Huang
2021-02-08 16:53:13 -08:00
parent 6404eda8de
commit 1e5878b910
9 changed files with 276 additions and 13 deletions

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Node
metadata:
generateName: node-churn-
status:
capacity:
pods: "0"
conditions:
- status: "True"
type: Ready
phase: Running

View File

@@ -0,0 +1,8 @@
apiVersion: v1
kind: Pod
metadata:
generateName: pod-churn-
spec:
containers:
- image: k8s.gcr.io/pause:3.4.1
name: pause

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
generateName: service-churn-
spec:
selector:
app: foo
ports:
- protocol: TCP
port: 8080
targetPort: 8080

View File

@@ -449,3 +449,29 @@
initNodes: 5000
initPods: 2000
measurePods: 5000
- name: SchedulingWithMixedChurn
workloadTemplate:
- opcode: createNodes
countParam: $initNodes
- opcode: churn
mode: recreate
number: 1
templatePaths:
- config/churn/node-default.yaml
- config/pod-high-priority-large-cpu.yaml
- config/churn/service-default.yaml
intervalMilliseconds: 1000
- opcode: createPods
countParam: $measurePods
podTemplatePath: config/pod-default.yaml
collectMetrics: true
workloads:
- name: 1000Nodes
params:
initNodes: 1000
measurePods: 1000
- name: 5000Nodes
params:
initNodes: 5000
measurePods: 2000

View File

@@ -0,0 +1,15 @@
apiVersion: v1
kind: Pod
metadata:
generateName: pod-h-
spec:
priority: 10
containers:
- image: k8s.gcr.io/pause:3.2
name: pause
ports:
- containerPort: 80
resources:
requests:
cpu: 9
memory: 500Mi