Commit 739bf4d8 authored by ravisantoshgudimetla's avatar ravisantoshgudimetla

# This is a combination of 2 commits.

# The first commit's message is: Modular extensions for kube scheduler perf testing framework # This is the 2nd commit message: Modular extensions for kube scheduler perf testing framework
parent 0dff56b4
......@@ -18,11 +18,14 @@ package benchmark
// High Level Configuration for all predicates and priorities.
type schedulerPerfConfig struct {
NodeCount int // The number of nodes which will be seeded with metadata to match predicates and have non-trivial priority rankings.
PodCount int // The number of pods which will be seeded with metadata to match predicates and have non-trivial priority rankings.
NodeAffinity *nodeAffinity
// TODO: Other predicates and priorities to be added here.
}
// nodeAffinity priority configuration details.
type nodeAffinity struct {
numGroups int // number of Node-Pod sets with Pods NodeAffinity matching given Nodes.
nodeAffinityKey string // Node Selection Key.
LabelCount int // number of labels to be added to each node or pod.
}
......@@ -1003,7 +1003,7 @@ func makeCreatePod(client clientset.Interface, namespace string, podTemplate *v1
return fmt.Errorf("Terminal error while creating pod, won't retry: %v", err)
}
func createPod(client clientset.Interface, namespace string, podCount int, podTemplate *v1.Pod) error {
func CreatePod(client clientset.Interface, namespace string, podCount int, podTemplate *v1.Pod) error {
var createError error
lock := sync.Mutex{}
createPodFunc := func(i int) {
......@@ -1050,7 +1050,7 @@ func createController(client clientset.Interface, controllerName, namespace stri
func NewCustomCreatePodStrategy(podTemplate *v1.Pod) TestPodCreateStrategy {
return func(client clientset.Interface, namespace string, podCount int) error {
return createPod(client, namespace, podCount, podTemplate)
return CreatePod(client, namespace, podCount, podTemplate)
}
}
......@@ -1076,7 +1076,7 @@ func NewSimpleWithControllerCreatePodStrategy(controllerName string) TestPodCrea
if err := createController(client, controllerName, namespace, podCount, basePod); err != nil {
return err
}
return createPod(client, namespace, podCount, basePod)
return CreatePod(client, namespace, podCount, basePod)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment