castai.RebalancingSchedule
Explore with Pulumi AI
CAST AI rebalancing schedule resource to manage rebalancing schedules.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as castai from "@pulumi/castai";
const spots = new castai.RebalancingSchedule("spots", {
    schedule: {
        cron: "*/30 * * * *",
    },
    triggerConditions: {
        savingsPercentage: 20,
    },
    launchConfiguration: {
        nodeTtlSeconds: 300,
        numTargetedNodes: 3,
        rebalancingMinNodes: 2,
        keepDrainTimeoutNodes: false,
        selector: JSON.stringify({
            nodeSelectorTerms: [{
                matchExpressions: [{
                    key: "scheduling.cast.ai/spot",
                    operator: "Exists",
                }],
            }],
        }),
        executionConditions: {
            enabled: true,
            achievedSavingsPercentage: 10,
        },
    },
});
import pulumi
import json
import pulumi_castai as castai
spots = castai.RebalancingSchedule("spots",
    schedule={
        "cron": "*/30 * * * *",
    },
    trigger_conditions={
        "savings_percentage": 20,
    },
    launch_configuration={
        "node_ttl_seconds": 300,
        "num_targeted_nodes": 3,
        "rebalancing_min_nodes": 2,
        "keep_drain_timeout_nodes": False,
        "selector": json.dumps({
            "nodeSelectorTerms": [{
                "matchExpressions": [{
                    "key": "scheduling.cast.ai/spot",
                    "operator": "Exists",
                }],
            }],
        }),
        "execution_conditions": {
            "enabled": True,
            "achieved_savings_percentage": 10,
        },
    })
package main
import (
	"encoding/json"
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/castai/v7/castai"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"nodeSelectorTerms": []map[string]interface{}{
				map[string]interface{}{
					"matchExpressions": []map[string]interface{}{
						map[string]interface{}{
							"key":      "scheduling.cast.ai/spot",
							"operator": "Exists",
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err = castai.NewRebalancingSchedule(ctx, "spots", &castai.RebalancingScheduleArgs{
			Schedule: &castai.RebalancingScheduleScheduleArgs{
				Cron: pulumi.String("*/30 * * * *"),
			},
			TriggerConditions: &castai.RebalancingScheduleTriggerConditionsArgs{
				SavingsPercentage: pulumi.Float64(20),
			},
			LaunchConfiguration: &castai.RebalancingScheduleLaunchConfigurationArgs{
				NodeTtlSeconds:        pulumi.Float64(300),
				NumTargetedNodes:      pulumi.Float64(3),
				RebalancingMinNodes:   pulumi.Float64(2),
				KeepDrainTimeoutNodes: pulumi.Bool(false),
				Selector:              pulumi.String(json0),
				ExecutionConditions: &castai.RebalancingScheduleLaunchConfigurationExecutionConditionsArgs{
					Enabled:                   pulumi.Bool(true),
					AchievedSavingsPercentage: pulumi.Float64(10),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Castai = Pulumi.Castai;
return await Deployment.RunAsync(() => 
{
    var spots = new Castai.RebalancingSchedule("spots", new()
    {
        Schedule = new Castai.Inputs.RebalancingScheduleScheduleArgs
        {
            Cron = "*/30 * * * *",
        },
        TriggerConditions = new Castai.Inputs.RebalancingScheduleTriggerConditionsArgs
        {
            SavingsPercentage = 20,
        },
        LaunchConfiguration = new Castai.Inputs.RebalancingScheduleLaunchConfigurationArgs
        {
            NodeTtlSeconds = 300,
            NumTargetedNodes = 3,
            RebalancingMinNodes = 2,
            KeepDrainTimeoutNodes = false,
            Selector = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["nodeSelectorTerms"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["matchExpressions"] = new[]
                        {
                            new Dictionary<string, object?>
                            {
                                ["key"] = "scheduling.cast.ai/spot",
                                ["operator"] = "Exists",
                            },
                        },
                    },
                },
            }),
            ExecutionConditions = new Castai.Inputs.RebalancingScheduleLaunchConfigurationExecutionConditionsArgs
            {
                Enabled = true,
                AchievedSavingsPercentage = 10,
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.castai.RebalancingSchedule;
import com.pulumi.castai.RebalancingScheduleArgs;
import com.pulumi.castai.inputs.RebalancingScheduleScheduleArgs;
import com.pulumi.castai.inputs.RebalancingScheduleTriggerConditionsArgs;
import com.pulumi.castai.inputs.RebalancingScheduleLaunchConfigurationArgs;
import com.pulumi.castai.inputs.RebalancingScheduleLaunchConfigurationExecutionConditionsArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 spots = new RebalancingSchedule("spots", RebalancingScheduleArgs.builder()
            .schedule(RebalancingScheduleScheduleArgs.builder()
                .cron("*/30 * * * *")
                .build())
            .triggerConditions(RebalancingScheduleTriggerConditionsArgs.builder()
                .savingsPercentage(20)
                .build())
            .launchConfiguration(RebalancingScheduleLaunchConfigurationArgs.builder()
                .nodeTtlSeconds(300)
                .numTargetedNodes(3)
                .rebalancingMinNodes(2)
                .keepDrainTimeoutNodes(false)
                .selector(serializeJson(
                    jsonObject(
                        jsonProperty("nodeSelectorTerms", jsonArray(jsonObject(
                            jsonProperty("matchExpressions", jsonArray(jsonObject(
                                jsonProperty("key", "scheduling.cast.ai/spot"),
                                jsonProperty("operator", "Exists")
                            )))
                        )))
                    )))
                .executionConditions(RebalancingScheduleLaunchConfigurationExecutionConditionsArgs.builder()
                    .enabled(true)
                    .achievedSavingsPercentage(10)
                    .build())
                .build())
            .build());
    }
}
resources:
  spots:
    type: castai:RebalancingSchedule
    properties:
      schedule:
        cron: '*/30 * * * *'
      triggerConditions:
        savingsPercentage: 20
      launchConfiguration:
        nodeTtlSeconds: 300
        numTargetedNodes: 3
        rebalancingMinNodes: 2
        keepDrainTimeoutNodes: false
        selector:
          fn::toJSON:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: scheduling.cast.ai/spot
                    operator: Exists
        executionConditions:
          enabled: true
          achievedSavingsPercentage: 10
Create RebalancingSchedule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RebalancingSchedule(name: string, args: RebalancingScheduleArgs, opts?: CustomResourceOptions);@overload
def RebalancingSchedule(resource_name: str,
                        args: RebalancingScheduleArgs,
                        opts: Optional[ResourceOptions] = None)
@overload
def RebalancingSchedule(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        launch_configuration: Optional[RebalancingScheduleLaunchConfigurationArgs] = None,
                        schedule: Optional[RebalancingScheduleScheduleArgs] = None,
                        trigger_conditions: Optional[RebalancingScheduleTriggerConditionsArgs] = None,
                        name: Optional[str] = None,
                        rebalancing_schedule_id: Optional[str] = None,
                        timeouts: Optional[RebalancingScheduleTimeoutsArgs] = None)func NewRebalancingSchedule(ctx *Context, name string, args RebalancingScheduleArgs, opts ...ResourceOption) (*RebalancingSchedule, error)public RebalancingSchedule(string name, RebalancingScheduleArgs args, CustomResourceOptions? opts = null)
public RebalancingSchedule(String name, RebalancingScheduleArgs args)
public RebalancingSchedule(String name, RebalancingScheduleArgs args, CustomResourceOptions options)
type: castai:RebalancingSchedule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RebalancingScheduleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RebalancingScheduleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RebalancingScheduleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RebalancingScheduleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RebalancingScheduleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var rebalancingScheduleResource = new Castai.RebalancingSchedule("rebalancingScheduleResource", new()
{
    LaunchConfiguration = new Castai.Inputs.RebalancingScheduleLaunchConfigurationArgs
    {
        AggressiveMode = false,
        AggressiveModeConfig = new Castai.Inputs.RebalancingScheduleLaunchConfigurationAggressiveModeConfigArgs
        {
            IgnoreLocalPersistentVolumes = false,
            IgnoreProblemJobPods = false,
            IgnoreProblemPodsWithoutController = false,
            IgnoreProblemRemovalDisabledPods = false,
        },
        ExecutionConditions = new Castai.Inputs.RebalancingScheduleLaunchConfigurationExecutionConditionsArgs
        {
            Enabled = false,
            AchievedSavingsPercentage = 0,
        },
        KeepDrainTimeoutNodes = false,
        NodeTtlSeconds = 0,
        NumTargetedNodes = 0,
        RebalancingMinNodes = 0,
        Selector = "string",
        TargetNodeSelectionAlgorithm = "string",
    },
    Schedule = new Castai.Inputs.RebalancingScheduleScheduleArgs
    {
        Cron = "string",
    },
    TriggerConditions = new Castai.Inputs.RebalancingScheduleTriggerConditionsArgs
    {
        SavingsPercentage = 0,
        IgnoreSavings = false,
    },
    Name = "string",
    RebalancingScheduleId = "string",
    Timeouts = new Castai.Inputs.RebalancingScheduleTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Read = "string",
        Update = "string",
    },
});
example, err := castai.NewRebalancingSchedule(ctx, "rebalancingScheduleResource", &castai.RebalancingScheduleArgs{
LaunchConfiguration: &.RebalancingScheduleLaunchConfigurationArgs{
AggressiveMode: pulumi.Bool(false),
AggressiveModeConfig: &.RebalancingScheduleLaunchConfigurationAggressiveModeConfigArgs{
IgnoreLocalPersistentVolumes: pulumi.Bool(false),
IgnoreProblemJobPods: pulumi.Bool(false),
IgnoreProblemPodsWithoutController: pulumi.Bool(false),
IgnoreProblemRemovalDisabledPods: pulumi.Bool(false),
},
ExecutionConditions: &.RebalancingScheduleLaunchConfigurationExecutionConditionsArgs{
Enabled: pulumi.Bool(false),
AchievedSavingsPercentage: pulumi.Float64(0),
},
KeepDrainTimeoutNodes: pulumi.Bool(false),
NodeTtlSeconds: pulumi.Float64(0),
NumTargetedNodes: pulumi.Float64(0),
RebalancingMinNodes: pulumi.Float64(0),
Selector: pulumi.String("string"),
TargetNodeSelectionAlgorithm: pulumi.String("string"),
},
Schedule: &.RebalancingScheduleScheduleArgs{
Cron: pulumi.String("string"),
},
TriggerConditions: &.RebalancingScheduleTriggerConditionsArgs{
SavingsPercentage: pulumi.Float64(0),
IgnoreSavings: pulumi.Bool(false),
},
Name: pulumi.String("string"),
RebalancingScheduleId: pulumi.String("string"),
Timeouts: &.RebalancingScheduleTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Read: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var rebalancingScheduleResource = new RebalancingSchedule("rebalancingScheduleResource", RebalancingScheduleArgs.builder()
    .launchConfiguration(RebalancingScheduleLaunchConfigurationArgs.builder()
        .aggressiveMode(false)
        .aggressiveModeConfig(RebalancingScheduleLaunchConfigurationAggressiveModeConfigArgs.builder()
            .ignoreLocalPersistentVolumes(false)
            .ignoreProblemJobPods(false)
            .ignoreProblemPodsWithoutController(false)
            .ignoreProblemRemovalDisabledPods(false)
            .build())
        .executionConditions(RebalancingScheduleLaunchConfigurationExecutionConditionsArgs.builder()
            .enabled(false)
            .achievedSavingsPercentage(0)
            .build())
        .keepDrainTimeoutNodes(false)
        .nodeTtlSeconds(0)
        .numTargetedNodes(0)
        .rebalancingMinNodes(0)
        .selector("string")
        .targetNodeSelectionAlgorithm("string")
        .build())
    .schedule(RebalancingScheduleScheduleArgs.builder()
        .cron("string")
        .build())
    .triggerConditions(RebalancingScheduleTriggerConditionsArgs.builder()
        .savingsPercentage(0)
        .ignoreSavings(false)
        .build())
    .name("string")
    .rebalancingScheduleId("string")
    .timeouts(RebalancingScheduleTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .read("string")
        .update("string")
        .build())
    .build());
rebalancing_schedule_resource = castai.RebalancingSchedule("rebalancingScheduleResource",
    launch_configuration={
        "aggressive_mode": False,
        "aggressive_mode_config": {
            "ignore_local_persistent_volumes": False,
            "ignore_problem_job_pods": False,
            "ignore_problem_pods_without_controller": False,
            "ignore_problem_removal_disabled_pods": False,
        },
        "execution_conditions": {
            "enabled": False,
            "achieved_savings_percentage": 0,
        },
        "keep_drain_timeout_nodes": False,
        "node_ttl_seconds": 0,
        "num_targeted_nodes": 0,
        "rebalancing_min_nodes": 0,
        "selector": "string",
        "target_node_selection_algorithm": "string",
    },
    schedule={
        "cron": "string",
    },
    trigger_conditions={
        "savings_percentage": 0,
        "ignore_savings": False,
    },
    name="string",
    rebalancing_schedule_id="string",
    timeouts={
        "create": "string",
        "delete": "string",
        "read": "string",
        "update": "string",
    })
const rebalancingScheduleResource = new castai.RebalancingSchedule("rebalancingScheduleResource", {
    launchConfiguration: {
        aggressiveMode: false,
        aggressiveModeConfig: {
            ignoreLocalPersistentVolumes: false,
            ignoreProblemJobPods: false,
            ignoreProblemPodsWithoutController: false,
            ignoreProblemRemovalDisabledPods: false,
        },
        executionConditions: {
            enabled: false,
            achievedSavingsPercentage: 0,
        },
        keepDrainTimeoutNodes: false,
        nodeTtlSeconds: 0,
        numTargetedNodes: 0,
        rebalancingMinNodes: 0,
        selector: "string",
        targetNodeSelectionAlgorithm: "string",
    },
    schedule: {
        cron: "string",
    },
    triggerConditions: {
        savingsPercentage: 0,
        ignoreSavings: false,
    },
    name: "string",
    rebalancingScheduleId: "string",
    timeouts: {
        create: "string",
        "delete": "string",
        read: "string",
        update: "string",
    },
});
type: castai:RebalancingSchedule
properties:
    launchConfiguration:
        aggressiveMode: false
        aggressiveModeConfig:
            ignoreLocalPersistentVolumes: false
            ignoreProblemJobPods: false
            ignoreProblemPodsWithoutController: false
            ignoreProblemRemovalDisabledPods: false
        executionConditions:
            achievedSavingsPercentage: 0
            enabled: false
        keepDrainTimeoutNodes: false
        nodeTtlSeconds: 0
        numTargetedNodes: 0
        rebalancingMinNodes: 0
        selector: string
        targetNodeSelectionAlgorithm: string
    name: string
    rebalancingScheduleId: string
    schedule:
        cron: string
    timeouts:
        create: string
        delete: string
        read: string
        update: string
    triggerConditions:
        ignoreSavings: false
        savingsPercentage: 0
RebalancingSchedule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RebalancingSchedule resource accepts the following input properties:
- LaunchConfiguration RebalancingSchedule Launch Configuration 
- Schedule
RebalancingSchedule Schedule 
- TriggerConditions RebalancingSchedule Trigger Conditions 
- Name string
- Name of the schedule.
- RebalancingSchedule stringId 
- The ID of this resource.
- Timeouts
RebalancingSchedule Timeouts 
- LaunchConfiguration RebalancingSchedule Launch Configuration Args 
- Schedule
RebalancingSchedule Schedule Args 
- TriggerConditions RebalancingSchedule Trigger Conditions Args 
- Name string
- Name of the schedule.
- RebalancingSchedule stringId 
- The ID of this resource.
- Timeouts
RebalancingSchedule Timeouts Args 
- launchConfiguration RebalancingSchedule Launch Configuration 
- schedule
RebalancingSchedule Schedule 
- triggerConditions RebalancingSchedule Trigger Conditions 
- name String
- Name of the schedule.
- rebalancingSchedule StringId 
- The ID of this resource.
- timeouts
RebalancingSchedule Timeouts 
- launchConfiguration RebalancingSchedule Launch Configuration 
- schedule
RebalancingSchedule Schedule 
- triggerConditions RebalancingSchedule Trigger Conditions 
- name string
- Name of the schedule.
- rebalancingSchedule stringId 
- The ID of this resource.
- timeouts
RebalancingSchedule Timeouts 
- launch_configuration RebalancingSchedule Launch Configuration Args 
- schedule
RebalancingSchedule Schedule Args 
- trigger_conditions RebalancingSchedule Trigger Conditions Args 
- name str
- Name of the schedule.
- rebalancing_schedule_ strid 
- The ID of this resource.
- timeouts
RebalancingSchedule Timeouts Args 
- launchConfiguration Property Map
- schedule Property Map
- triggerConditions Property Map
- name String
- Name of the schedule.
- rebalancingSchedule StringId 
- The ID of this resource.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the RebalancingSchedule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing RebalancingSchedule Resource
Get an existing RebalancingSchedule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RebalancingScheduleState, opts?: CustomResourceOptions): RebalancingSchedule@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        launch_configuration: Optional[RebalancingScheduleLaunchConfigurationArgs] = None,
        name: Optional[str] = None,
        rebalancing_schedule_id: Optional[str] = None,
        schedule: Optional[RebalancingScheduleScheduleArgs] = None,
        timeouts: Optional[RebalancingScheduleTimeoutsArgs] = None,
        trigger_conditions: Optional[RebalancingScheduleTriggerConditionsArgs] = None) -> RebalancingSchedulefunc GetRebalancingSchedule(ctx *Context, name string, id IDInput, state *RebalancingScheduleState, opts ...ResourceOption) (*RebalancingSchedule, error)public static RebalancingSchedule Get(string name, Input<string> id, RebalancingScheduleState? state, CustomResourceOptions? opts = null)public static RebalancingSchedule get(String name, Output<String> id, RebalancingScheduleState state, CustomResourceOptions options)resources:  _:    type: castai:RebalancingSchedule    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- LaunchConfiguration RebalancingSchedule Launch Configuration 
- Name string
- Name of the schedule.
- RebalancingSchedule stringId 
- The ID of this resource.
- Schedule
RebalancingSchedule Schedule 
- Timeouts
RebalancingSchedule Timeouts 
- TriggerConditions RebalancingSchedule Trigger Conditions 
- LaunchConfiguration RebalancingSchedule Launch Configuration Args 
- Name string
- Name of the schedule.
- RebalancingSchedule stringId 
- The ID of this resource.
- Schedule
RebalancingSchedule Schedule Args 
- Timeouts
RebalancingSchedule Timeouts Args 
- TriggerConditions RebalancingSchedule Trigger Conditions Args 
- launchConfiguration RebalancingSchedule Launch Configuration 
- name String
- Name of the schedule.
- rebalancingSchedule StringId 
- The ID of this resource.
- schedule
RebalancingSchedule Schedule 
- timeouts
RebalancingSchedule Timeouts 
- triggerConditions RebalancingSchedule Trigger Conditions 
- launchConfiguration RebalancingSchedule Launch Configuration 
- name string
- Name of the schedule.
- rebalancingSchedule stringId 
- The ID of this resource.
- schedule
RebalancingSchedule Schedule 
- timeouts
RebalancingSchedule Timeouts 
- triggerConditions RebalancingSchedule Trigger Conditions 
- launch_configuration RebalancingSchedule Launch Configuration Args 
- name str
- Name of the schedule.
- rebalancing_schedule_ strid 
- The ID of this resource.
- schedule
RebalancingSchedule Schedule Args 
- timeouts
RebalancingSchedule Timeouts Args 
- trigger_conditions RebalancingSchedule Trigger Conditions Args 
- launchConfiguration Property Map
- name String
- Name of the schedule.
- rebalancingSchedule StringId 
- The ID of this resource.
- schedule Property Map
- timeouts Property Map
- triggerConditions Property Map
Supporting Types
RebalancingScheduleLaunchConfiguration, RebalancingScheduleLaunchConfigurationArgs        
- AggressiveMode bool
- When enabled rebalancing will also consider problematic pods (pods without controller, job pods, pods with removal-disabled annotation) as not-problematic.
- AggressiveMode RebalancingConfig Schedule Launch Configuration Aggressive Mode Config 
- Advanced configuration for aggressive rebalancing mode.
- ExecutionConditions RebalancingSchedule Launch Configuration Execution Conditions 
- KeepDrain boolTimeout Nodes 
- Defines whether the nodes that failed to get drained until a predefined timeout, will be kept with a rebalancing.cast.ai/status=drain-failed annotation instead of forcefully drained.
- NodeTtl doubleSeconds 
- Specifies amount of time since node creation before the node is allowed to be considered for automated rebalancing.
- NumTargeted doubleNodes 
- Maximum number of nodes that will be selected for rebalancing.
- RebalancingMin doubleNodes 
- Minimum number of nodes that should be kept in the cluster after rebalancing.
- Selector string
- Node selector in JSON format.
- TargetNode stringSelection Algorithm 
- Defines the algorithm used to select the target nodes for rebalancing.
- AggressiveMode bool
- When enabled rebalancing will also consider problematic pods (pods without controller, job pods, pods with removal-disabled annotation) as not-problematic.
- AggressiveMode RebalancingConfig Schedule Launch Configuration Aggressive Mode Config 
- Advanced configuration for aggressive rebalancing mode.
- ExecutionConditions RebalancingSchedule Launch Configuration Execution Conditions 
- KeepDrain boolTimeout Nodes 
- Defines whether the nodes that failed to get drained until a predefined timeout, will be kept with a rebalancing.cast.ai/status=drain-failed annotation instead of forcefully drained.
- NodeTtl float64Seconds 
- Specifies amount of time since node creation before the node is allowed to be considered for automated rebalancing.
- NumTargeted float64Nodes 
- Maximum number of nodes that will be selected for rebalancing.
- RebalancingMin float64Nodes 
- Minimum number of nodes that should be kept in the cluster after rebalancing.
- Selector string
- Node selector in JSON format.
- TargetNode stringSelection Algorithm 
- Defines the algorithm used to select the target nodes for rebalancing.
- aggressiveMode Boolean
- When enabled rebalancing will also consider problematic pods (pods without controller, job pods, pods with removal-disabled annotation) as not-problematic.
- aggressiveMode RebalancingConfig Schedule Launch Configuration Aggressive Mode Config 
- Advanced configuration for aggressive rebalancing mode.
- executionConditions RebalancingSchedule Launch Configuration Execution Conditions 
- keepDrain BooleanTimeout Nodes 
- Defines whether the nodes that failed to get drained until a predefined timeout, will be kept with a rebalancing.cast.ai/status=drain-failed annotation instead of forcefully drained.
- nodeTtl DoubleSeconds 
- Specifies amount of time since node creation before the node is allowed to be considered for automated rebalancing.
- numTargeted DoubleNodes 
- Maximum number of nodes that will be selected for rebalancing.
- rebalancingMin DoubleNodes 
- Minimum number of nodes that should be kept in the cluster after rebalancing.
- selector String
- Node selector in JSON format.
- targetNode StringSelection Algorithm 
- Defines the algorithm used to select the target nodes for rebalancing.
- aggressiveMode boolean
- When enabled rebalancing will also consider problematic pods (pods without controller, job pods, pods with removal-disabled annotation) as not-problematic.
- aggressiveMode RebalancingConfig Schedule Launch Configuration Aggressive Mode Config 
- Advanced configuration for aggressive rebalancing mode.
- executionConditions RebalancingSchedule Launch Configuration Execution Conditions 
- keepDrain booleanTimeout Nodes 
- Defines whether the nodes that failed to get drained until a predefined timeout, will be kept with a rebalancing.cast.ai/status=drain-failed annotation instead of forcefully drained.
- nodeTtl numberSeconds 
- Specifies amount of time since node creation before the node is allowed to be considered for automated rebalancing.
- numTargeted numberNodes 
- Maximum number of nodes that will be selected for rebalancing.
- rebalancingMin numberNodes 
- Minimum number of nodes that should be kept in the cluster after rebalancing.
- selector string
- Node selector in JSON format.
- targetNode stringSelection Algorithm 
- Defines the algorithm used to select the target nodes for rebalancing.
- aggressive_mode bool
- When enabled rebalancing will also consider problematic pods (pods without controller, job pods, pods with removal-disabled annotation) as not-problematic.
- aggressive_mode_ Rebalancingconfig Schedule Launch Configuration Aggressive Mode Config 
- Advanced configuration for aggressive rebalancing mode.
- execution_conditions RebalancingSchedule Launch Configuration Execution Conditions 
- keep_drain_ booltimeout_ nodes 
- Defines whether the nodes that failed to get drained until a predefined timeout, will be kept with a rebalancing.cast.ai/status=drain-failed annotation instead of forcefully drained.
- node_ttl_ floatseconds 
- Specifies amount of time since node creation before the node is allowed to be considered for automated rebalancing.
- num_targeted_ floatnodes 
- Maximum number of nodes that will be selected for rebalancing.
- rebalancing_min_ floatnodes 
- Minimum number of nodes that should be kept in the cluster after rebalancing.
- selector str
- Node selector in JSON format.
- target_node_ strselection_ algorithm 
- Defines the algorithm used to select the target nodes for rebalancing.
- aggressiveMode Boolean
- When enabled rebalancing will also consider problematic pods (pods without controller, job pods, pods with removal-disabled annotation) as not-problematic.
- aggressiveMode Property MapConfig 
- Advanced configuration for aggressive rebalancing mode.
- executionConditions Property Map
- keepDrain BooleanTimeout Nodes 
- Defines whether the nodes that failed to get drained until a predefined timeout, will be kept with a rebalancing.cast.ai/status=drain-failed annotation instead of forcefully drained.
- nodeTtl NumberSeconds 
- Specifies amount of time since node creation before the node is allowed to be considered for automated rebalancing.
- numTargeted NumberNodes 
- Maximum number of nodes that will be selected for rebalancing.
- rebalancingMin NumberNodes 
- Minimum number of nodes that should be kept in the cluster after rebalancing.
- selector String
- Node selector in JSON format.
- targetNode StringSelection Algorithm 
- Defines the algorithm used to select the target nodes for rebalancing.
RebalancingScheduleLaunchConfigurationAggressiveModeConfig, RebalancingScheduleLaunchConfigurationAggressiveModeConfigArgs              
- IgnoreLocal boolPersistent Volumes 
- Rebalance workloads that use local-path Persistent Volumes. THIS WILL RESULT IN DATA LOSS.
- IgnoreProblem boolJob Pods 
- Pods spawned by Jobs or CronJobs will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, pods spawned by Jobs or CronJobs will be terminated if the Rebalancer picks a node that runs them. As such, they are likely to lose their progress.
- IgnoreProblem boolPods Without Controller 
- Pods that don't have a controller (bare pods) will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, such pods might not restart, since they have no controller to do it.
- IgnoreProblem boolRemoval Disabled Pods 
- Pods that are marked with "removal disabled" will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, such pods will be evicted and disrupted.
- IgnoreLocal boolPersistent Volumes 
- Rebalance workloads that use local-path Persistent Volumes. THIS WILL RESULT IN DATA LOSS.
- IgnoreProblem boolJob Pods 
- Pods spawned by Jobs or CronJobs will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, pods spawned by Jobs or CronJobs will be terminated if the Rebalancer picks a node that runs them. As such, they are likely to lose their progress.
- IgnoreProblem boolPods Without Controller 
- Pods that don't have a controller (bare pods) will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, such pods might not restart, since they have no controller to do it.
- IgnoreProblem boolRemoval Disabled Pods 
- Pods that are marked with "removal disabled" will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, such pods will be evicted and disrupted.
- ignoreLocal BooleanPersistent Volumes 
- Rebalance workloads that use local-path Persistent Volumes. THIS WILL RESULT IN DATA LOSS.
- ignoreProblem BooleanJob Pods 
- Pods spawned by Jobs or CronJobs will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, pods spawned by Jobs or CronJobs will be terminated if the Rebalancer picks a node that runs them. As such, they are likely to lose their progress.
- ignoreProblem BooleanPods Without Controller 
- Pods that don't have a controller (bare pods) will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, such pods might not restart, since they have no controller to do it.
- ignoreProblem BooleanRemoval Disabled Pods 
- Pods that are marked with "removal disabled" will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, such pods will be evicted and disrupted.
- ignoreLocal booleanPersistent Volumes 
- Rebalance workloads that use local-path Persistent Volumes. THIS WILL RESULT IN DATA LOSS.
- ignoreProblem booleanJob Pods 
- Pods spawned by Jobs or CronJobs will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, pods spawned by Jobs or CronJobs will be terminated if the Rebalancer picks a node that runs them. As such, they are likely to lose their progress.
- ignoreProblem booleanPods Without Controller 
- Pods that don't have a controller (bare pods) will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, such pods might not restart, since they have no controller to do it.
- ignoreProblem booleanRemoval Disabled Pods 
- Pods that are marked with "removal disabled" will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, such pods will be evicted and disrupted.
- ignore_local_ boolpersistent_ volumes 
- Rebalance workloads that use local-path Persistent Volumes. THIS WILL RESULT IN DATA LOSS.
- ignore_problem_ booljob_ pods 
- Pods spawned by Jobs or CronJobs will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, pods spawned by Jobs or CronJobs will be terminated if the Rebalancer picks a node that runs them. As such, they are likely to lose their progress.
- ignore_problem_ boolpods_ without_ controller 
- Pods that don't have a controller (bare pods) will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, such pods might not restart, since they have no controller to do it.
- ignore_problem_ boolremoval_ disabled_ pods 
- Pods that are marked with "removal disabled" will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, such pods will be evicted and disrupted.
- ignoreLocal BooleanPersistent Volumes 
- Rebalance workloads that use local-path Persistent Volumes. THIS WILL RESULT IN DATA LOSS.
- ignoreProblem BooleanJob Pods 
- Pods spawned by Jobs or CronJobs will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, pods spawned by Jobs or CronJobs will be terminated if the Rebalancer picks a node that runs them. As such, they are likely to lose their progress.
- ignoreProblem BooleanPods Without Controller 
- Pods that don't have a controller (bare pods) will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, such pods might not restart, since they have no controller to do it.
- ignoreProblem BooleanRemoval Disabled Pods 
- Pods that are marked with "removal disabled" will not prevent the Rebalancer from deleting a node on which they run. WARNING: When true, such pods will be evicted and disrupted.
RebalancingScheduleLaunchConfigurationExecutionConditions, RebalancingScheduleLaunchConfigurationExecutionConditionsArgs            
- Enabled bool
- Enables or disables the execution conditions.
- AchievedSavings doublePercentage 
- The percentage of the predicted savings that must be achieved in order to fully execute the plan.If the savings are not achieved after creating the new nodes, the plan will fail and delete the created nodes.
- Enabled bool
- Enables or disables the execution conditions.
- AchievedSavings float64Percentage 
- The percentage of the predicted savings that must be achieved in order to fully execute the plan.If the savings are not achieved after creating the new nodes, the plan will fail and delete the created nodes.
- enabled Boolean
- Enables or disables the execution conditions.
- achievedSavings DoublePercentage 
- The percentage of the predicted savings that must be achieved in order to fully execute the plan.If the savings are not achieved after creating the new nodes, the plan will fail and delete the created nodes.
- enabled boolean
- Enables or disables the execution conditions.
- achievedSavings numberPercentage 
- The percentage of the predicted savings that must be achieved in order to fully execute the plan.If the savings are not achieved after creating the new nodes, the plan will fail and delete the created nodes.
- enabled bool
- Enables or disables the execution conditions.
- achieved_savings_ floatpercentage 
- The percentage of the predicted savings that must be achieved in order to fully execute the plan.If the savings are not achieved after creating the new nodes, the plan will fail and delete the created nodes.
- enabled Boolean
- Enables or disables the execution conditions.
- achievedSavings NumberPercentage 
- The percentage of the predicted savings that must be achieved in order to fully execute the plan.If the savings are not achieved after creating the new nodes, the plan will fail and delete the created nodes.
RebalancingScheduleSchedule, RebalancingScheduleScheduleArgs      
- Cron string
- Cron expression defining when the schedule should trigger.
- Cron string
- Cron expression defining when the schedule should trigger.
- cron String
- Cron expression defining when the schedule should trigger.
- cron string
- Cron expression defining when the schedule should trigger.
- cron str
- Cron expression defining when the schedule should trigger.
- cron String
- Cron expression defining when the schedule should trigger.
RebalancingScheduleTimeouts, RebalancingScheduleTimeoutsArgs      
RebalancingScheduleTriggerConditions, RebalancingScheduleTriggerConditionsArgs        
- SavingsPercentage double
- Defines the minimum percentage of savings expected.
- IgnoreSavings bool
- If true, the savings percentage will be ignored and the rebalancing will be triggered regardless of the savings percentage.
- SavingsPercentage float64
- Defines the minimum percentage of savings expected.
- IgnoreSavings bool
- If true, the savings percentage will be ignored and the rebalancing will be triggered regardless of the savings percentage.
- savingsPercentage Double
- Defines the minimum percentage of savings expected.
- ignoreSavings Boolean
- If true, the savings percentage will be ignored and the rebalancing will be triggered regardless of the savings percentage.
- savingsPercentage number
- Defines the minimum percentage of savings expected.
- ignoreSavings boolean
- If true, the savings percentage will be ignored and the rebalancing will be triggered regardless of the savings percentage.
- savings_percentage float
- Defines the minimum percentage of savings expected.
- ignore_savings bool
- If true, the savings percentage will be ignored and the rebalancing will be triggered regardless of the savings percentage.
- savingsPercentage Number
- Defines the minimum percentage of savings expected.
- ignoreSavings Boolean
- If true, the savings percentage will be ignored and the rebalancing will be triggered regardless of the savings percentage.
Import
Associate terraform resource “spots” with a rebalancing schedule named “spots”.
$ pulumi import castai:index/rebalancingSchedule:RebalancingSchedule spots' spots
Importing via direct schedule ID is also possible.
$ pulumi import castai:index/rebalancingSchedule:RebalancingSchedule spots' b4e69e0c-1762-45eb-bd4f-85cb172e6ad3
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- castai castai/terraform-provider-castai
- License
- Notes
- This Pulumi package is based on the castaiTerraform Provider.