mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
Refactor SchedulerConfigFile
Rename to SchedulerConfigPath and make it a pointer to be consist with other fields Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
parent
cfc53ee524
commit
bc15aca26d
@ -110,8 +110,9 @@ type testCase struct {
|
|||||||
WorkloadTemplate []op
|
WorkloadTemplate []op
|
||||||
// List of workloads to run under this testCase.
|
// List of workloads to run under this testCase.
|
||||||
Workloads []*workload
|
Workloads []*workload
|
||||||
// SchedulerConfigFile is the path of scheduler configuration
|
// SchedulerConfigPath is the path of scheduler configuration
|
||||||
SchedulerConfigFile string
|
// Optional
|
||||||
|
SchedulerConfigPath *string
|
||||||
// Default path to spec file describing the pods to create.
|
// Default path to spec file describing the pods to create.
|
||||||
// This path can be overridden in createPodsOp by setting PodTemplatePath .
|
// This path can be overridden in createPodsOp by setting PodTemplatePath .
|
||||||
// Optional
|
// Optional
|
||||||
@ -645,8 +646,8 @@ func runWorkload(b *testing.B, tc *testCase, w *workload) []DataItem {
|
|||||||
defer cancel()
|
defer cancel()
|
||||||
var cfg *config.KubeSchedulerConfiguration
|
var cfg *config.KubeSchedulerConfiguration
|
||||||
var err error
|
var err error
|
||||||
if len(tc.SchedulerConfigFile) != 0 {
|
if tc.SchedulerConfigPath != nil {
|
||||||
cfg, err = loadSchedulerConfig(tc.SchedulerConfigFile)
|
cfg, err = loadSchedulerConfig(*tc.SchedulerConfigPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
b.Fatalf("error loading scheduler config file: %v", err)
|
b.Fatalf("error loading scheduler config file: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user