From c5865976aeec8c34dd32b17f7e93756f858e9b8e Mon Sep 17 00:00:00 2001 From: Michael Smithhisler Date: Thu, 9 Apr 2026 13:17:58 -0400 Subject: [PATCH 1/8] batch queue: add config parameters to scheduler_configuration --- api/operator.go | 16 +++ command/operator_scheduler_get_config.go | 26 +++- command/operator_scheduler_get_config_test.go | 4 + nomad/structs/node_pool.go | 4 + nomad/structs/operator.go | 72 +++++++++++ nomad/structs/operator_test.go | 118 ++++++++++++++++++ 6 files changed, 237 insertions(+), 3 deletions(-) diff --git a/api/operator.go b/api/operator.go index fc974d83fbf..1c1b4169fe2 100644 --- a/api/operator.go +++ b/api/operator.go @@ -174,6 +174,13 @@ type SchedulerConfiguration struct { // priority jobs to place higher priority jobs. PreemptionConfig PreemptionConfig + // BatchQueue specifies the configuration of the batch jobs queue + // use to control queueing and scheduling of batch jobs. + // + // "Scheduling" in this context refers to releasing evaluations + // to the eval broker for scheduling with a worker. + BatchQueue BatchQueue + // MemoryOversubscriptionEnabled specifies whether memory oversubscription is enabled MemoryOversubscriptionEnabled bool @@ -233,6 +240,15 @@ type PreemptionConfig struct { ServiceSchedulerEnabled bool } +// BatchQueue is the configuration for a batch job queue used to control scheduling +// of batch jobs. +type BatchQueue struct { + Type string + TenantType string + MetadataKey string + Config map[string]any +} + // SchedulerGetConfiguration is used to query the current Scheduler configuration. func (op *Operator) SchedulerGetConfiguration(q *QueryOptions) (*SchedulerConfigurationResponse, *QueryMeta, error) { var resp SchedulerConfigurationResponse diff --git a/command/operator_scheduler_get_config.go b/command/operator_scheduler_get_config.go index feb88297211..2b690bc9622 100644 --- a/command/operator_scheduler_get_config.go +++ b/command/operator_scheduler_get_config.go @@ -76,8 +76,7 @@ func (o *OperatorSchedulerGetConfig) Run(args []string) int { schedConfig := resp.SchedulerConfig - // Output the information. - o.Ui.Output(formatKV([]string{ + out := []string{ fmt.Sprintf("Scheduler Algorithm|%s", schedConfig.SchedulerAlgorithm), fmt.Sprintf("Memory Oversubscription|%v", schedConfig.MemoryOversubscriptionEnabled), fmt.Sprintf("Reject Job Registration|%v", schedConfig.RejectJobRegistration), @@ -87,8 +86,29 @@ func (o *OperatorSchedulerGetConfig) Run(args []string) int { fmt.Sprintf("Preemption Batch Scheduler|%v", schedConfig.PreemptionConfig.BatchSchedulerEnabled), fmt.Sprintf("Preemption SysBatch Scheduler|%v", schedConfig.PreemptionConfig.SysBatchSchedulerEnabled), fmt.Sprintf("Node Limit For Feasibility Checks|%v", schedConfig.NodeLimitForFeasibilityChecks), + fmt.Sprintf("Batch Queue Type|%v", schedConfig.BatchQueue.Type), fmt.Sprintf("Modify Index|%v", resp.SchedulerConfig.ModifyIndex), - })) + } + + if schedConfig.BatchQueue.Type != "" { + out = append(out, fmt.Sprintf("Batch Queue Tenant Type|%v", schedConfig.BatchQueue.TenantType)) + + // only append metadata key if it's set + if schedConfig.BatchQueue.TenantType == "metadata" { + out = append(out, fmt.Sprintf("Batch Queue Metadata Key|%v", schedConfig.BatchQueue.MetadataKey)) + } + + conf := "" + for k, v := range schedConfig.BatchQueue.Config { + conf = fmt.Sprintf("%s%s", conf, fmt.Sprintf("%v:%v ", k, v)) + } + out = append(out, fmt.Sprintf("Batch Queue Config|%v", conf)) + } + + out = append(out, fmt.Sprintf("Modify Index|%v", resp.SchedulerConfig.ModifyIndex)) + + // Output the information. + o.Ui.Output(formatKV(out)) return 0 } diff --git a/command/operator_scheduler_get_config_test.go b/command/operator_scheduler_get_config_test.go index a0be94b3da5..2cd0bbc9143 100644 --- a/command/operator_scheduler_get_config_test.go +++ b/command/operator_scheduler_get_config_test.go @@ -27,6 +27,10 @@ func TestOperatorSchedulerGetConfig_Run(t *testing.T) { s := ui.OutputWriter.String() must.StrContains(t, s, "Scheduler Algorithm = binpack") must.StrContains(t, s, "Preemption SysBatch Scheduler = false") + must.StrContains(t, s, "Scheduler Algorithm = binpack") + must.StrContains(t, s, "Preemption SysBatch Scheduler = false") + must.StrContains(t, s, "Node Limit For Feasibility Checks = 0") + must.StrContains(t, s, "Batch Queue Type =") ui.ErrorWriter.Reset() ui.OutputWriter.Reset() diff --git a/nomad/structs/node_pool.go b/nomad/structs/node_pool.go index b4dfc4308d7..05aa643df0c 100644 --- a/nomad/structs/node_pool.go +++ b/nomad/structs/node_pool.go @@ -249,6 +249,10 @@ type NodePoolSchedulerConfiguration struct { // If not defined, the global cluster scheduling algorithm is used. SchedulerAlgorithm SchedulerAlgorithm `hcl:"scheduler_algorithm"` + // BatchQueue defines the batch job queue configuration used + // to control scheduling of batch jobs. + BatchQueue BatchQueue `hcl:"batch_queue"` + // MemoryOversubscriptionEnabled specifies whether memory oversubscription // is enabled. If not defined, the global cluster configuration is used. MemoryOversubscriptionEnabled *bool `hcl:"memory_oversubscription_enabled"` diff --git a/nomad/structs/operator.go b/nomad/structs/operator.go index 3006572ccde..466e698503d 100644 --- a/nomad/structs/operator.go +++ b/nomad/structs/operator.go @@ -224,6 +224,10 @@ type SchedulerConfiguration struct { // priority jobs to place higher priority jobs. PreemptionConfig PreemptionConfig `hcl:"preemption_config"` + // BatchQueue specifies the batch queue for this scheduler configuration + // which defines the behavior for scheduling batch job evaluations. + BatchQueue BatchQueue `hcl:"batch_queue"` + // MemoryOversubscriptionEnabled specifies whether memory oversubscription is enabled MemoryOversubscriptionEnabled bool `hcl:"memory_oversubscription_enabled"` @@ -286,6 +290,11 @@ func (s *SchedulerConfiguration) WithNodePool(pool *NodePool) *SchedulerConfigur if poolConfig.SchedulerAlgorithm != "" { schedConfig.SchedulerAlgorithm = poolConfig.SchedulerAlgorithm } + + if poolConfig.BatchQueue.Type != "" { + schedConfig.BatchQueue = poolConfig.BatchQueue + } + if poolConfig.MemoryOversubscriptionEnabled != nil { schedConfig.MemoryOversubscriptionEnabled = *poolConfig.MemoryOversubscriptionEnabled } @@ -310,6 +319,10 @@ func (s *SchedulerConfiguration) Validate() error { return fmt.Errorf("invalid scheduler algorithm: %v", s.SchedulerAlgorithm) } + if err := s.BatchQueue.Validate(); err != nil { + return err + } + return nil } @@ -346,6 +359,65 @@ type PreemptionConfig struct { ServiceSchedulerEnabled bool `hcl:"service_scheduler_enabled"` } +type BatchQueue struct { + Type string `hcl:"type"` + TenantType string `hcl:"tenant_type"` + MetadataKey string `hcl:"metadata_key"` + Config map[string]any `hcl:"config"` // TODO: not sure yet how to handle this any blob +} + +type DynamicQueueConfig struct { + CalcInterval time.Duration + MaxAge time.Duration + MaxSize int + AgeWeight int + UsageWeight int + SizeWeight int +} + +func validateDuration(val any) error { + switch t := val.(type) { + case string: + if _, err := time.ParseDuration(t); err != nil { + return err + } + case int, nil: + default: + return fmt.Errorf("value not a duration: %v", val) + } + + return nil +} + +func (b *BatchQueue) Validate() error { + if b.Type == "" { + return nil + } + + // TODO: lots of magic strings here + switch b.Type { + case "dynamicPriority": + if err := validateDuration(b.Config["calc_interval"]); err != nil { + return fmt.Errorf("failed to parse calc_interval: %v", err) + } + if err := validateDuration(b.Config["max_age"]); err != nil { + return fmt.Errorf("failed to parse max_age: %v", err) + } + default: + return fmt.Errorf("unsupported batch queue type: %s", b.Type) + } + + if b.TenantType != "namespace" && b.TenantType != "metadata" { + return fmt.Errorf("unsupported tenant type: %s", b.TenantType) + } + + if b.TenantType == "metadata" && b.MetadataKey == "" { + return fmt.Errorf("metadata key must be specified if using metadata tenency") + } + + return nil +} + // SchedulerSetConfigRequest is used by the Operator endpoint to update the // current Scheduler configuration of the cluster. type SchedulerSetConfigRequest struct { diff --git a/nomad/structs/operator_test.go b/nomad/structs/operator_test.go index b9d013022fb..d19236bfd82 100644 --- a/nomad/structs/operator_test.go +++ b/nomad/structs/operator_test.go @@ -86,10 +86,16 @@ func TestSchedulerConfiguration_WithNodePool(t *testing.T) { pool: &NodePool{ SchedulerConfiguration: &NodePoolSchedulerConfiguration{ MemoryOversubscriptionEnabled: pointer.Of(true), + BatchQueue: BatchQueue{ + Type: "test", + }, }, }, expected: &SchedulerConfiguration{ MemoryOversubscriptionEnabled: true, + BatchQueue: BatchQueue{ + Type: "test", + }, }, }, { @@ -140,3 +146,115 @@ func TestSchedulerConfiguration_WithNodePool(t *testing.T) { }) } } + +func TestSchedulerConfiguration_Validate(t *testing.T) { + + testCases := []struct { + name string + schedConfig *SchedulerConfiguration + err string + }{ + { + name: "invalid scheduler algorithm", + schedConfig: &SchedulerConfiguration{ + SchedulerAlgorithm: "not-good", + }, + err: "invalid scheduler algorithm: not-good", + }, + { + name: "valid scheduler algorithm", + schedConfig: &SchedulerConfiguration{ + SchedulerAlgorithm: SchedulerAlgorithmBinpack, + }, + err: "", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + err := tc.schedConfig.Validate() + if tc.err != "" { + must.ErrorContains(t, err, tc.err) + } else { + must.NoError(t, err) + } + }) + } +} + +func TestBatchQueue_Validate(t *testing.T) { + + testCases := []struct { + name string + batchConfig BatchQueue + err string + }{ + { + name: "invalid queue type", + batchConfig: BatchQueue{ + Type: "foo", + }, + err: "unsupported batch queue type", + }, + { + name: "invalid metadata type", + batchConfig: BatchQueue{ + Type: "dynamicPriority", + TenantType: "foo", + }, + err: "unsupported tenant type", + }, + { + name: "empty metadata key errors", + batchConfig: BatchQueue{ + Type: "dynamicPriority", + TenantType: "metadata", + }, + err: "metadata key must be specified", + }, + { + name: "dynamicPriority - invalid interval", + batchConfig: BatchQueue{ + Type: "dynamicPriority", + TenantType: "namespace", + Config: map[string]any{ + "calc_interval": "hello", + }, + }, + err: "failed to parse", + }, + { + name: "dynamicPriority - valid string interval", + batchConfig: BatchQueue{ + Type: "dynamicPriority", + TenantType: "namespace", + Config: map[string]any{ + "calc_interval": "1h", + }, + }, + err: "", + }, + { + name: "dynamicPriority - valid int interval", + batchConfig: BatchQueue{ + Type: "dynamicPriority", + TenantType: "namespace", + Config: map[string]any{ + "calc_interval": 1000, + }, + }, + err: "", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + err := tc.batchConfig.Validate() + if tc.err != "" { + must.ErrorContains(t, err, tc.err) + } else { + must.NoError(t, err) + } + }) + } +} From 6cd8462dde081c744b7104355c50abcbf9015365 Mon Sep 17 00:00:00 2001 From: Michael Smithhisler Date: Thu, 9 Apr 2026 13:22:44 -0400 Subject: [PATCH 2/8] remove config todo --- nomad/structs/operator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nomad/structs/operator.go b/nomad/structs/operator.go index 466e698503d..5fadd7a6c5c 100644 --- a/nomad/structs/operator.go +++ b/nomad/structs/operator.go @@ -363,7 +363,7 @@ type BatchQueue struct { Type string `hcl:"type"` TenantType string `hcl:"tenant_type"` MetadataKey string `hcl:"metadata_key"` - Config map[string]any `hcl:"config"` // TODO: not sure yet how to handle this any blob + Config map[string]any `hcl:"config"` } type DynamicQueueConfig struct { From c5c055664dcae0112a95f552a97677a7e64b90e8 Mon Sep 17 00:00:00 2001 From: Michael Smithhisler Date: Thu, 9 Apr 2026 13:29:04 -0400 Subject: [PATCH 3/8] remove some magic strings --- nomad/structs/operator.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/nomad/structs/operator.go b/nomad/structs/operator.go index 5fadd7a6c5c..453c0c80492 100644 --- a/nomad/structs/operator.go +++ b/nomad/structs/operator.go @@ -359,6 +359,13 @@ type PreemptionConfig struct { ServiceSchedulerEnabled bool `hcl:"service_scheduler_enabled"` } +const ( + QueueTypeDynamicPriority = "dynamicPriority" + + DynamicCalcInterval = "calc_interval" + DynamicMaxAge = "max_age" +) + type BatchQueue struct { Type string `hcl:"type"` TenantType string `hcl:"tenant_type"` @@ -394,13 +401,12 @@ func (b *BatchQueue) Validate() error { return nil } - // TODO: lots of magic strings here switch b.Type { - case "dynamicPriority": - if err := validateDuration(b.Config["calc_interval"]); err != nil { + case QueueTypeDynamicPriority: + if err := validateDuration(b.Config[DynamicCalcInterval]); err != nil { return fmt.Errorf("failed to parse calc_interval: %v", err) } - if err := validateDuration(b.Config["max_age"]); err != nil { + if err := validateDuration(b.Config[DynamicMaxAge]); err != nil { return fmt.Errorf("failed to parse max_age: %v", err) } default: From 564281d4a49c8358f11a9a72ad55ce494e4dc0be Mon Sep 17 00:00:00 2001 From: Michael Smithhisler Date: Mon, 4 May 2026 14:05:15 -0400 Subject: [PATCH 4/8] add more validation --- nomad/structs/operator.go | 9 +++++++-- nomad/structs/operator_test.go | 8 ++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/nomad/structs/operator.go b/nomad/structs/operator.go index 453c0c80492..a819dc08934 100644 --- a/nomad/structs/operator.go +++ b/nomad/structs/operator.go @@ -398,6 +398,11 @@ func validateDuration(val any) error { func (b *BatchQueue) Validate() error { if b.Type == "" { + switch { + case b.TenantType != "", b.MetadataKey != "", b.Config != nil: + return errors.New("batch queue configuration found but no type specified") + } + return nil } @@ -410,11 +415,11 @@ func (b *BatchQueue) Validate() error { return fmt.Errorf("failed to parse max_age: %v", err) } default: - return fmt.Errorf("unsupported batch queue type: %s", b.Type) + return fmt.Errorf("unsupported batch queue type: %q", b.Type) } if b.TenantType != "namespace" && b.TenantType != "metadata" { - return fmt.Errorf("unsupported tenant type: %s", b.TenantType) + return fmt.Errorf("unsupported tenant type: %q", b.TenantType) } if b.TenantType == "metadata" && b.MetadataKey == "" { diff --git a/nomad/structs/operator_test.go b/nomad/structs/operator_test.go index d19236bfd82..572e3a6a889 100644 --- a/nomad/structs/operator_test.go +++ b/nomad/structs/operator_test.go @@ -204,6 +204,14 @@ func TestBatchQueue_Validate(t *testing.T) { }, err: "unsupported tenant type", }, + { + name: "batch config with no type", + batchConfig: BatchQueue{ + Type: "", + TenantType: "metadata", + }, + err: "batch queue config found but no type specified", + }, { name: "empty metadata key errors", batchConfig: BatchQueue{ From 2c442bc9ee0b7dc2a9ea1e640b62d0cc8f58496f Mon Sep 17 00:00:00 2001 From: Michael Smithhisler Date: Mon, 4 May 2026 15:24:29 -0400 Subject: [PATCH 5/8] fix tests --- command/operator_scheduler_get_config.go | 1 - nomad/structs/operator_test.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/command/operator_scheduler_get_config.go b/command/operator_scheduler_get_config.go index 2b690bc9622..d1fa2447f5d 100644 --- a/command/operator_scheduler_get_config.go +++ b/command/operator_scheduler_get_config.go @@ -87,7 +87,6 @@ func (o *OperatorSchedulerGetConfig) Run(args []string) int { fmt.Sprintf("Preemption SysBatch Scheduler|%v", schedConfig.PreemptionConfig.SysBatchSchedulerEnabled), fmt.Sprintf("Node Limit For Feasibility Checks|%v", schedConfig.NodeLimitForFeasibilityChecks), fmt.Sprintf("Batch Queue Type|%v", schedConfig.BatchQueue.Type), - fmt.Sprintf("Modify Index|%v", resp.SchedulerConfig.ModifyIndex), } if schedConfig.BatchQueue.Type != "" { diff --git a/nomad/structs/operator_test.go b/nomad/structs/operator_test.go index 572e3a6a889..ce0ce978aa2 100644 --- a/nomad/structs/operator_test.go +++ b/nomad/structs/operator_test.go @@ -210,7 +210,7 @@ func TestBatchQueue_Validate(t *testing.T) { Type: "", TenantType: "metadata", }, - err: "batch queue config found but no type specified", + err: "batch queue configuration found but no type specified", }, { name: "empty metadata key errors", From 3fa3803e4b017057cc246c06afab7271a9b35722 Mon Sep 17 00:00:00 2001 From: Michael Smithhisler Date: Wed, 6 May 2026 09:51:01 -0400 Subject: [PATCH 6/8] adds types and constants for batchqueue --- api/operator.go | 21 +++++++++++++++------ nomad/structs/operator.go | 32 +++++++++++++++++++++----------- nomad/structs/operator_test.go | 20 ++++++++++---------- 3 files changed, 46 insertions(+), 27 deletions(-) diff --git a/api/operator.go b/api/operator.go index 1c1b4169fe2..d5124032692 100644 --- a/api/operator.go +++ b/api/operator.go @@ -222,14 +222,23 @@ type SchedulerSetConfigurationResponse struct { WriteMeta } -// SchedulerAlgorithm is an enum string that encapsulates the valid options for a -// SchedulerConfiguration block's SchedulerAlgorithm. These modes will allow the -// scheduler to be user-selectable. -type SchedulerAlgorithm string +// Enum strings that encapsulate the valid options for a +// their respective scheduler configuration blocks. These modes +// allow the config to be user-selectable. +type ( + SchedulerAlgorithm string + BatchQueueTenant string + BatchQueueType string +) const ( SchedulerAlgorithmBinpack SchedulerAlgorithm = "binpack" SchedulerAlgorithmSpread SchedulerAlgorithm = "spread" + + BatchQueueTypeDynamic BatchQueueType = "dynamicPriority" + + BatchQueueTenantMetadata BatchQueueTenant = "metadata" + BatchQueueTenantNamespace BatchQueueTenant = "namespace" ) // PreemptionConfig specifies whether preemption is enabled based on scheduler type @@ -243,8 +252,8 @@ type PreemptionConfig struct { // BatchQueue is the configuration for a batch job queue used to control scheduling // of batch jobs. type BatchQueue struct { - Type string - TenantType string + Type BatchQueueType + TenantType BatchQueueTenant MetadataKey string Config map[string]any } diff --git a/nomad/structs/operator.go b/nomad/structs/operator.go index a819dc08934..c71825ddbc8 100644 --- a/nomad/structs/operator.go +++ b/nomad/structs/operator.go @@ -359,18 +359,26 @@ type PreemptionConfig struct { ServiceSchedulerEnabled bool `hcl:"service_scheduler_enabled"` } +type ( + BatchQueueType string + BatchQueueTenant string +) + const ( - QueueTypeDynamicPriority = "dynamicPriority" + BatchQueueTypeDynamic BatchQueueType = "dynamicPriorty" + + TenantTypeMetadata BatchQueueTenant = "metadata" + TenantTypeNamespace BatchQueueTenant = "namespace" DynamicCalcInterval = "calc_interval" DynamicMaxAge = "max_age" ) type BatchQueue struct { - Type string `hcl:"type"` - TenantType string `hcl:"tenant_type"` - MetadataKey string `hcl:"metadata_key"` - Config map[string]any `hcl:"config"` + Type BatchQueueType `hcl:"type"` + TenantType BatchQueueTenant `hcl:"tenant_type"` + MetadataKey string `hcl:"metadata_key"` + Config map[string]any `hcl:"config"` } type DynamicQueueConfig struct { @@ -407,7 +415,7 @@ func (b *BatchQueue) Validate() error { } switch b.Type { - case QueueTypeDynamicPriority: + case BatchQueueTypeDynamic: if err := validateDuration(b.Config[DynamicCalcInterval]); err != nil { return fmt.Errorf("failed to parse calc_interval: %v", err) } @@ -418,14 +426,16 @@ func (b *BatchQueue) Validate() error { return fmt.Errorf("unsupported batch queue type: %q", b.Type) } - if b.TenantType != "namespace" && b.TenantType != "metadata" { + switch b.TenantType { + case TenantTypeNamespace: + case TenantTypeMetadata: + if b.MetadataKey == "" { + return fmt.Errorf("metadata key must be specified if using metadata tenency") + } + default: return fmt.Errorf("unsupported tenant type: %q", b.TenantType) } - if b.TenantType == "metadata" && b.MetadataKey == "" { - return fmt.Errorf("metadata key must be specified if using metadata tenency") - } - return nil } diff --git a/nomad/structs/operator_test.go b/nomad/structs/operator_test.go index ce0ce978aa2..371a37bc8c2 100644 --- a/nomad/structs/operator_test.go +++ b/nomad/structs/operator_test.go @@ -199,7 +199,7 @@ func TestBatchQueue_Validate(t *testing.T) { { name: "invalid metadata type", batchConfig: BatchQueue{ - Type: "dynamicPriority", + Type: BatchQueueTypeDynamic, TenantType: "foo", }, err: "unsupported tenant type", @@ -208,23 +208,23 @@ func TestBatchQueue_Validate(t *testing.T) { name: "batch config with no type", batchConfig: BatchQueue{ Type: "", - TenantType: "metadata", + TenantType: TenantTypeNamespace, }, err: "batch queue configuration found but no type specified", }, { name: "empty metadata key errors", batchConfig: BatchQueue{ - Type: "dynamicPriority", - TenantType: "metadata", + Type: BatchQueueTypeDynamic, + TenantType: TenantTypeMetadata, }, err: "metadata key must be specified", }, { name: "dynamicPriority - invalid interval", batchConfig: BatchQueue{ - Type: "dynamicPriority", - TenantType: "namespace", + Type: BatchQueueTypeDynamic, + TenantType: TenantTypeNamespace, Config: map[string]any{ "calc_interval": "hello", }, @@ -234,8 +234,8 @@ func TestBatchQueue_Validate(t *testing.T) { { name: "dynamicPriority - valid string interval", batchConfig: BatchQueue{ - Type: "dynamicPriority", - TenantType: "namespace", + Type: BatchQueueTypeDynamic, + TenantType: TenantTypeNamespace, Config: map[string]any{ "calc_interval": "1h", }, @@ -245,8 +245,8 @@ func TestBatchQueue_Validate(t *testing.T) { { name: "dynamicPriority - valid int interval", batchConfig: BatchQueue{ - Type: "dynamicPriority", - TenantType: "namespace", + Type: BatchQueueTypeDynamic, + TenantType: TenantTypeNamespace, Config: map[string]any{ "calc_interval": 1000, }, From d69ae2467af004989b9294bd5b96ef34ba0b6ca8 Mon Sep 17 00:00:00 2001 From: Michael Smithhisler Date: Wed, 6 May 2026 09:55:33 -0400 Subject: [PATCH 7/8] update api tenant names --- api/operator.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/operator.go b/api/operator.go index d5124032692..0816bcddc15 100644 --- a/api/operator.go +++ b/api/operator.go @@ -237,8 +237,8 @@ const ( BatchQueueTypeDynamic BatchQueueType = "dynamicPriority" - BatchQueueTenantMetadata BatchQueueTenant = "metadata" - BatchQueueTenantNamespace BatchQueueTenant = "namespace" + TenantMetadata BatchQueueTenant = "metadata" + TenantNamespace BatchQueueTenant = "namespace" ) // PreemptionConfig specifies whether preemption is enabled based on scheduler type From bba754863c270b0a2b3ec20dbaf4f30072beba21 Mon Sep 17 00:00:00 2001 From: Michael Smithhisler Date: Wed, 6 May 2026 09:56:05 -0400 Subject: [PATCH 8/8] fix again --- api/operator.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/operator.go b/api/operator.go index 0816bcddc15..ae517f6ba8a 100644 --- a/api/operator.go +++ b/api/operator.go @@ -237,8 +237,8 @@ const ( BatchQueueTypeDynamic BatchQueueType = "dynamicPriority" - TenantMetadata BatchQueueTenant = "metadata" - TenantNamespace BatchQueueTenant = "namespace" + TenantTypeMetadata BatchQueueTenant = "metadata" + TenantTypeNamespace BatchQueueTenant = "namespace" ) // PreemptionConfig specifies whether preemption is enabled based on scheduler type