lke

package
v2.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDataSource added in v2.14.0

func NewDataSource() datasource.DataSource

func Resource

func Resource() *schema.Resource

Types

type DataSource

type DataSource struct {
	helper.BaseDataSource
}

func (*DataSource) Read added in v2.14.0

type LKEControlPlane added in v2.14.0

type LKEControlPlane struct {
	HighAvailability types.Bool `tfsdk:"high_availability"`
}

func ParseControlPlane added in v2.14.0

func ParseControlPlane(
	controlPlane linodego.LKEClusterControlPlane,
) LKEControlPlane

type LKEDataModel added in v2.14.0

type LKEDataModel struct {
	// LKE Cluster
	ID           types.Int64       `tfsdk:"id"`
	Created      types.String      `tfsdk:"created"`
	Updated      types.String      `tfsdk:"updated"`
	Label        types.String      `tfsdk:"label"`
	Region       types.String      `tfsdk:"region"`
	Status       types.String      `tfsdk:"status"`
	K8sVersion   types.String      `tfsdk:"k8s_version"`
	Tags         types.Set         `tfsdk:"tags"`
	ControlPlane []LKEControlPlane `tfsdk:"control_plane"`

	// LKE Node Pools
	Pools []LKENodePool `tfsdk:"pools"`

	// LKE Cluster Kubeconfig
	Kubeconfig types.String `tfsdk:"kubeconfig"`

	// LKE Cluster API endpoints
	APIEndpoints types.List `tfsdk:"api_endpoints"`

	// LKE Cluster Dashboard
	DashboardURL types.String `tfsdk:"dashboard_url"`
}

LKEDataModel describes the Terraform resource data model to match the data source schema.

type LKENodePool added in v2.14.0

type LKENodePool struct {
	ID         types.Int64             `tfsdk:"id"`
	Count      types.Int64             `tfsdk:"count"`
	Type       types.String            `tfsdk:"type"`
	Tags       types.List              `tfsdk:"tags"`
	Disks      []LKENodePoolDisk       `tfsdk:"disks"`
	Nodes      []LKENodePoolNode       `tfsdk:"nodes"`
	Autoscaler []LKENodePoolAutoscaler `tfsdk:"autoscaler"`
}

type LKENodePoolAutoscaler added in v2.14.0

type LKENodePoolAutoscaler struct {
	Enabled types.Bool  `tfsdk:"enabled"`
	Min     types.Int64 `tfsdk:"min"`
	Max     types.Int64 `tfsdk:"max"`
}

type LKENodePoolDisk added in v2.14.0

type LKENodePoolDisk struct {
	Size types.Int64  `tfsdk:"size"`
	Type types.String `tfsdk:"type"`
}

type LKENodePoolNode added in v2.14.0

type LKENodePoolNode struct {
	ID         types.String `tfsdk:"id"`
	InstanceID types.Int64  `tfsdk:"instance_id"`
	Status     types.String `tfsdk:"status"`
}

type NodePoolSpec

type NodePoolSpec struct {
	ID                int
	Type              string
	Count             int
	AutoScalerEnabled bool
	AutoScalerMin     int
	AutoScalerMax     int
}

type NodePoolUpdates

type NodePoolUpdates struct {
	ToDelete []int
	ToCreate []linodego.LKENodePoolCreateOptions
	ToUpdate map[int]linodego.LKENodePoolUpdateOptions
}

func ReconcileLKENodePoolSpecs

func ReconcileLKENodePoolSpecs(
	oldSpecs []NodePoolSpec, newSpecs []NodePoolSpec,
) (NodePoolUpdates, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL