OceanImport
Provides a Spotinst Ocean GKE import resource.
scheduled task
scheduled_task- (Optional) Set scheduling object.shutdown_hours- (Optional) Set shutdown hours for cluster object.is_enabled- (Optional) Flag to enable / disable the shutdown hours. Example: Truetime_windows- (Required) Set time windows for shutdown hours. specify a list of ‘timeWindows’ with at least one time window Each string is in the format of - ddd:hh:mm-ddd:hh:mm ddd = day of week = Sun | Mon | Tue | Wed | Thu | Fri | Sat hh = hour 24 = 0 -23 mm = minute = 0 - 59. Time windows should not overlap. required on cluster.scheduling.isEnabled = True. API Times are in UTC Example: Fri:15:30-Wed:14:30
tasks- (Optional) The scheduling tasks for the cluster.is_enabled- (Required) Describes whether the task is enabled. When true the task should run when false it should not run. Required for cluster.scheduling.tasks object.cron_expression- (Required) A valid cron expression. For example : “ * * * * * “.The cron is running in UTC time zone and is in Unix cron format Cron Expression Validator Script. Only one of ‘frequency’ or ‘cronExpression’ should be used at a time. Required for cluster.scheduling.tasks object Example: 0 1 * * *task_type- (Required) Valid values: “clusterRoll”. Required for cluster.scheduling.tasks object.batch_size_percentage- (Optional) Value in % to set size of batch in roll. Valid values are 0-100 Example: 20.
import * as pulumi from "@pulumi/pulumi";import pulumiusing Pulumi;
class MyStack : Stack
{
public MyStack()
{
}
}
Autoscaler
autoscaler- (Optional) The Ocean Kubernetes Autoscaler object.is_enabled- (Optional, Default:true) Enable the Ocean Kubernetes Autoscaler.is_auto_config- (Optional, Default:true) Automatically configure and optimize headroom resources.auto_headroom_percentage- Optionally set the auto headroom percentage, set a number between 0-200 to control the headroom % from the cluster. Relevant when isAutoConfig=true.cooldown- (Optional, Default:null) Cooldown period between scaling actions.headroom- (Optional) Spare resource capacity management enabling fast assignment of Pods without waiting for new resources to launch.cpu_per_unit- (Optional) Optionally configure the number of CPUs to allocate the headroom. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU.memory_per_unit- (Optional) Optionally configure the amount of memory (MiB) to allocate the headroom.gpu_per_unit- (Optional) How much GPU allocate for headroom unit.num_of_units- (Optional) The number of units to retain as headroom, where each unit has the defined headroom CPU and memory.down- (Optional) Auto Scaling scale down operations.evaluation_periods- (Optional, Default:null) The number of evaluation periods that should accumulate before a scale down action takes place.max_scale_down_percentage- (Optional) Would represent the maximum % to scale-down. Number between 1-100.resource_limits- (Optional) Optionally set upper and lower bounds on the resource usage of the cluster.max_vcpu- (Optional) The maximum cpu in vCpu units that can be allocated to the cluster.max_memory_gib- (Optional) The maximum memory in GiB units that can be allocated to the cluster.
import * as pulumi from "@pulumi/pulumi";import pulumiusing Pulumi;
class MyStack : Stack
{
public MyStack()
{
}
}
Example Usage
using Pulumi;
using SpotInst = Pulumi.SpotInst;
class MyStack : Stack
{
public MyStack()
{
var example = new SpotInst.Gke.OceanImport("example", new SpotInst.Gke.OceanImportArgs
{
BackendServices =
{
new SpotInst.Gke.Inputs.OceanImportBackendServiceArgs
{
LocationType = "regional",
NamedPorts =
{
new SpotInst.Gke.Inputs.OceanImportBackendServiceNamedPortArgs
{
Name = "http",
Ports =
{
"80",
"8080",
},
},
},
Scheme = "INTERNAL",
ServiceName = "example-backend-service",
},
},
ClusterName = "example-cluster-name",
DesiredCapacity = 0,
Location = "us-central1-a",
MaxSize = 2,
MinSize = 0,
Whitelists =
{
"n1-standard-1",
"n1-standard-2",
},
});
}
}
Coming soon!
import pulumi
import pulumi_spotinst as spotinst
example = spotinst.gke.OceanImport("example",
backend_services=[{
"locationType": "regional",
"namedPorts": [{
"name": "http",
"ports": [
80,
8080,
],
}],
"scheme": "INTERNAL",
"serviceName": "example-backend-service",
}],
cluster_name="example-cluster-name",
desired_capacity=0,
location="us-central1-a",
max_size=2,
min_size=0,
whitelists=[
"n1-standard-1",
"n1-standard-2",
])import * as pulumi from "@pulumi/pulumi";
import * as spotinst from "@pulumi/spotinst";
const example = new spotinst.gke.OceanImport("example", {
backendServices: [{
locationType: "regional",
namedPorts: [{
name: "http",
ports: [
"80",
"8080",
],
}],
scheme: "INTERNAL",
serviceName: "example-backend-service",
}],
clusterName: "example-cluster-name",
desiredCapacity: 0,
location: "us-central1-a",
maxSize: 2,
minSize: 0,
whitelists: [
"n1-standard-1",
"n1-standard-2",
],
});Create a OceanImport Resource
new OceanImport(name: string, args: OceanImportArgs, opts?: CustomResourceOptions);def OceanImport(resource_name, opts=None, autoscaler=None, backend_services=None, cluster_name=None, desired_capacity=None, location=None, max_size=None, min_size=None, scheduled_tasks=None, whitelists=None, __props__=None);func NewOceanImport(ctx *Context, name string, args OceanImportArgs, opts ...ResourceOption) (*OceanImport, error)public OceanImport(string name, OceanImportArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args OceanImportArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args OceanImportArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OceanImportArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
OceanImport Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The OceanImport resource accepts the following input properties:
- Cluster
Name string The GKE cluster name.
- Location string
The zone the master cluster is located in.
- Autoscaler
Pulumi.
Spot Inst. Gke. Inputs. Ocean Import Autoscaler Args - Backend
Services List<Pulumi.Spot Inst. Gke. Inputs. Ocean Import Backend Service Args> Describes the backend service configurations.
- Desired
Capacity int The number of instances to launch and maintain in the cluster.
- Max
Size int The upper limit of instances the cluster can scale up to.
- Min
Size int The lower limit of instances the cluster can scale down to.
- Scheduled
Tasks List<Pulumi.Spot Inst. Gke. Inputs. Ocean Import Scheduled Task Args> - Whitelists List<string>
- Cluster
Name string The GKE cluster name.
- Location string
The zone the master cluster is located in.
- Autoscaler
Ocean
Import Autoscaler - Backend
Services []OceanImport Backend Service Describes the backend service configurations.
- Desired
Capacity int The number of instances to launch and maintain in the cluster.
- Max
Size int The upper limit of instances the cluster can scale up to.
- Min
Size int The lower limit of instances the cluster can scale down to.
- Scheduled
Tasks []OceanImport Scheduled Task - Whitelists []string
- cluster
Name string The GKE cluster name.
- location string
The zone the master cluster is located in.
- autoscaler
Ocean
Import Autoscaler - backend
Services OceanImport Backend Service[] Describes the backend service configurations.
- desired
Capacity number The number of instances to launch and maintain in the cluster.
- max
Size number The upper limit of instances the cluster can scale up to.
- min
Size number The lower limit of instances the cluster can scale down to.
- scheduled
Tasks OceanImport Scheduled Task[] - whitelists string[]
- cluster_
name str The GKE cluster name.
- location str
The zone the master cluster is located in.
- autoscaler
Dict[Ocean
Import Autoscaler] - backend_
services List[OceanImport Backend Service] Describes the backend service configurations.
- desired_
capacity float The number of instances to launch and maintain in the cluster.
- max_
size float The upper limit of instances the cluster can scale up to.
- min_
size float The lower limit of instances the cluster can scale down to.
- scheduled_
tasks List[OceanImport Scheduled Task] - whitelists List[str]
Outputs
All input properties are implicitly available as output properties. Additionally, the OceanImport resource produces the following output properties:
- Cluster
Controller stringId - Id string
- The provider-assigned unique ID for this managed resource.
- Cluster
Controller stringId - Id string
- The provider-assigned unique ID for this managed resource.
- cluster
Controller stringId - id string
- The provider-assigned unique ID for this managed resource.
- cluster_
controller_ strid - id str
- The provider-assigned unique ID for this managed resource.
Look up an Existing OceanImport Resource
Get an existing OceanImport 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?: OceanImportState, opts?: CustomResourceOptions): OceanImportstatic get(resource_name, id, opts=None, autoscaler=None, backend_services=None, cluster_controller_id=None, cluster_name=None, desired_capacity=None, location=None, max_size=None, min_size=None, scheduled_tasks=None, whitelists=None, __props__=None);func GetOceanImport(ctx *Context, name string, id IDInput, state *OceanImportState, opts ...ResourceOption) (*OceanImport, error)public static OceanImport Get(string name, Input<string> id, OceanImportState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Autoscaler
Pulumi.
Spot Inst. Gke. Inputs. Ocean Import Autoscaler Args - Backend
Services List<Pulumi.Spot Inst. Gke. Inputs. Ocean Import Backend Service Args> Describes the backend service configurations.
- Cluster
Controller stringId - Cluster
Name string The GKE cluster name.
- Desired
Capacity int The number of instances to launch and maintain in the cluster.
- Location string
The zone the master cluster is located in.
- Max
Size int The upper limit of instances the cluster can scale up to.
- Min
Size int The lower limit of instances the cluster can scale down to.
- Scheduled
Tasks List<Pulumi.Spot Inst. Gke. Inputs. Ocean Import Scheduled Task Args> - Whitelists List<string>
- Autoscaler
Ocean
Import Autoscaler - Backend
Services []OceanImport Backend Service Describes the backend service configurations.
- Cluster
Controller stringId - Cluster
Name string The GKE cluster name.
- Desired
Capacity int The number of instances to launch and maintain in the cluster.
- Location string
The zone the master cluster is located in.
- Max
Size int The upper limit of instances the cluster can scale up to.
- Min
Size int The lower limit of instances the cluster can scale down to.
- Scheduled
Tasks []OceanImport Scheduled Task - Whitelists []string
- autoscaler
Ocean
Import Autoscaler - backend
Services OceanImport Backend Service[] Describes the backend service configurations.
- cluster
Controller stringId - cluster
Name string The GKE cluster name.
- desired
Capacity number The number of instances to launch and maintain in the cluster.
- location string
The zone the master cluster is located in.
- max
Size number The upper limit of instances the cluster can scale up to.
- min
Size number The lower limit of instances the cluster can scale down to.
- scheduled
Tasks OceanImport Scheduled Task[] - whitelists string[]
- autoscaler
Dict[Ocean
Import Autoscaler] - backend_
services List[OceanImport Backend Service] Describes the backend service configurations.
- cluster_
controller_ strid - cluster_
name str The GKE cluster name.
- desired_
capacity float The number of instances to launch and maintain in the cluster.
- location str
The zone the master cluster is located in.
- max_
size float The upper limit of instances the cluster can scale up to.
- min_
size float The lower limit of instances the cluster can scale down to.
- scheduled_
tasks List[OceanImport Scheduled Task] - whitelists List[str]
Supporting Types
OceanImportAutoscaler
OceanImportAutoscalerDown
OceanImportAutoscalerHeadroom
OceanImportAutoscalerResourceLimits
OceanImportBackendService
- Service
Name string The name of the backend service.
- Location
Type string Sets which location the backend services will be active. Valid values:
regional,global.- Named
Ports List<Pulumi.Spot Inst. Gke. Inputs. Ocean Import Backend Service Named Port Args> - Scheme string
Use when
location_typeisregional. Set the traffic for the backend service to either between the instances in the vpc or to traffic from the internet. Valid values:INTERNAL,EXTERNAL.
- Service
Name string The name of the backend service.
- Location
Type string Sets which location the backend services will be active. Valid values:
regional,global.- Named
Ports []OceanImport Backend Service Named Port - Scheme string
Use when
location_typeisregional. Set the traffic for the backend service to either between the instances in the vpc or to traffic from the internet. Valid values:INTERNAL,EXTERNAL.
- service
Name string The name of the backend service.
- location
Type string Sets which location the backend services will be active. Valid values:
regional,global.- named
Ports OceanImport Backend Service Named Port[] - scheme string
Use when
location_typeisregional. Set the traffic for the backend service to either between the instances in the vpc or to traffic from the internet. Valid values:INTERNAL,EXTERNAL.
- service
Name str The name of the backend service.
- location
Type str Sets which location the backend services will be active. Valid values:
regional,global.- named
Ports List[OceanImport Backend Service Named Port] - scheme str
Use when
location_typeisregional. Set the traffic for the backend service to either between the instances in the vpc or to traffic from the internet. Valid values:INTERNAL,EXTERNAL.
OceanImportBackendServiceNamedPort
- Name string
- Ports List<string>
A list of ports.
OceanImportScheduledTask
OceanImportScheduledTaskShutdownHours
OceanImportScheduledTaskTask
Package Details
- Repository
- https://github.com/pulumi/pulumi-spotinst
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
spotinstTerraform Provider.