Scheduler Config Args
data class SchedulerConfigArgs(val memoryOversubscriptionEnabled: Output<Boolean>? = null, val preemptionConfig: Output<Map<String, Boolean>>? = null, val schedulerAlgorithm: Output<String>? = null) : ConvertibleToJava<SchedulerConfigArgs>
Manages scheduler configuration of the Nomad cluster.
Warning: destroying this resource will not have any effect in the cluster configuration, since there's no clear definition of what a destroy action should do. The cluster will be left as-is and only the state reference will be removed.
Example Usage
Set cluster scheduler configuration:
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nomad.SchedulerConfig;
import com.pulumi.nomad.SchedulerConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var config = new SchedulerConfig("config", SchedulerConfigArgs.builder()
.memoryOversubscriptionEnabled(true)
.preemptionConfig(Map.ofEntries(
Map.entry("batch_scheduler_enabled", true),
Map.entry("service_scheduler_enabled", true),
Map.entry("sysbatch_scheduler_enabled", true),
Map.entry("system_scheduler_enabled", true)
))
.schedulerAlgorithm("spread")
.build());
}
}
Content copied to clipboard
Constructors
Properties
Link copied to clipboard
(bool: false)
- When true
, tasks may exceed their reserved memory limit.
Link copied to clipboard
(map[string]bool)
- Options to enable preemption for various schedulers.
Link copied to clipboard
(string: "binpack")
- Specifies whether scheduler binpacks or spreads allocations on available nodes. Possible values are binpack
and spread
.