Merge pull request #113615 from kerthcet/feat/add-benchmark-tests

Add nodeInclusionPolicy benchmark tests to scheduler_perf
This commit is contained in:
Kubernetes Prow Robot
2022-11-07 09:18:28 -08:00
committed by GitHub
7 changed files with 82 additions and 91 deletions

View File

@@ -0,0 +1,17 @@
apiVersion: v1
kind: Node
metadata:
generateName: taint-node-
spec:
taints:
- effect: NoSchedule
key: foo
status:
capacity:
pods: "110"
cpu: "4"
memory: 32Gi
conditions:
- status: "True"
type: Ready
phase: Running

View File

@@ -399,7 +399,7 @@
measurePods: 500
# This test case always seems to fail.
# https://github.com/kubernetes/kubernetes/issues/108308
#
#
# - name: 5000Nodes
# params:
# initNodes: 5000
@@ -427,7 +427,7 @@
measurePods: 500
# This test case always seems to fail.
# https://github.com/kubernetes/kubernetes/issues/108308
#
#
# - name: 5000Nodes
# params:
# initNodes: 5000
@@ -630,3 +630,31 @@
initNamespaces: 100
measurePods: 1000
- name: SchedulingWithNodeInclusionPolicy
featureGates:
NodeInclusionPolicyInPodTopologySpread: true
defaultPodTemplatePath: config/pod-with-node-inclusion-policy.yaml
workloadTemplate:
- opcode: createNodes
countParam: $normalNodes
uniqueNodeLabelStrategy:
labelKey: kubernetes.io/hostname
- opcode: createNodes
nodeTemplatePath: config/node-with-taint.yaml
countParam: $taintNodes
uniqueNodeLabelStrategy:
labelKey: kubernetes.io/hostname
- opcode: createPods
countParam: $measurePods
collectMetrics: true
workloads:
- name: 500Nodes
params:
taintNodes: 100
normalNodes: 400
measurePods: 400
- name: 5000Nodes
params:
taintNodes: 1000
normalNodes: 4000
measurePods: 4000

View File

@@ -0,0 +1,28 @@
apiVersion: v1
kind: Pod
metadata:
generateName: spreading-pod-with-node-inclusion-policy-
labels:
foo: bar
spec:
containers:
- image: registry.k8s.io/pause:3.8
name: pause
ports:
- containerPort: 80
resources:
limits:
cpu: 100m
memory: 500Mi
requests:
cpu: 100m
memory: 500Mi
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
NodeAffinityPolicy: Honor
NodeTaintsPolicy: Honor
labelSelector:
matchLabels:
foo: bar

View File

@@ -988,7 +988,7 @@ func waitUntilPodsScheduledInNamespace(ctx context.Context, podInformer coreinfo
if len(scheduled) >= wantCount {
return true, nil
}
klog.Infof("%s: namespace %s: got %d pods, want %d", name, namespace, len(scheduled), wantCount)
klog.Infof("%s: namespace %s, pods: want %d, got %d", name, namespace, wantCount, len(scheduled))
return false, nil
})
}