Show / Hide Table of Contents

Class OceanImport

Provides a Spotinst Ocean GKE import resource.

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",
        },
    });
}

}

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: True
    • time_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.
using Pulumi;

class MyStack : Stack
{
public MyStack()
{
}

}

<a id="autoscaler"></a>

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.
using Pulumi;

class MyStack : Stack
{
public MyStack()
{
}

}
Inheritance
System.Object
Resource
CustomResource
OceanImport
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.SpotInst.Gke
Assembly: Pulumi.SpotInst.dll
Syntax
public class OceanImport : CustomResource

Constructors

View Source

OceanImport(String, OceanImportArgs, CustomResourceOptions)

Create a OceanImport resource with the given unique name, arguments, and options.

Declaration
public OceanImport(string name, OceanImportArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

OceanImportArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Autoscaler

Declaration
public Output<OceanImportAutoscaler> Autoscaler { get; }
Property Value
Type Description
Output<OceanImportAutoscaler>
View Source

BackendServices

Describes the backend service configurations.

Declaration
public Output<ImmutableArray<OceanImportBackendService>> BackendServices { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<OceanImportBackendService>>
View Source

ClusterControllerId

Declaration
public Output<string> ClusterControllerId { get; }
Property Value
Type Description
Output<System.String>
View Source

ClusterName

The GKE cluster name.

Declaration
public Output<string> ClusterName { get; }
Property Value
Type Description
Output<System.String>
View Source

DesiredCapacity

The number of instances to launch and maintain in the cluster.

Declaration
public Output<int> DesiredCapacity { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Location

The zone the master cluster is located in.

Declaration
public Output<string> Location { get; }
Property Value
Type Description
Output<System.String>
View Source

MaxSize

The upper limit of instances the cluster can scale up to.

Declaration
public Output<int> MaxSize { get; }
Property Value
Type Description
Output<System.Int32>
View Source

MinSize

The lower limit of instances the cluster can scale down to.

Declaration
public Output<int> MinSize { get; }
Property Value
Type Description
Output<System.Int32>
View Source

ScheduledTasks

Declaration
public Output<ImmutableArray<OceanImportScheduledTask>> ScheduledTasks { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<OceanImportScheduledTask>>
View Source

Whitelists

Declaration
public Output<ImmutableArray<string>> Whitelists { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>

Methods

View Source

Get(String, Input<String>, OceanImportState, CustomResourceOptions)

Get an existing OceanImport resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static OceanImport Get(string name, Input<string> id, OceanImportState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

OceanImportState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
OceanImport
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.