cluster_builder

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Output = "services/terraformer/server/clusters"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterBuilder

type ClusterBuilder struct {
	// DesiredClusterInfo contains the information about the
	// desired state of the cluster.
	DesiredClusterInfo *pb.ClusterInfo
	// CurrentClusterInfo contains the information about the
	// current state of the cluster.
	CurrentClusterInfo *pb.ClusterInfo
	// ProjectName is the name of the manifest.
	ProjectName string
	// ClusterType is the type of the cluster being build
	// LoadBalancer or K8s.
	ClusterType pb.ClusterType
	// Metadata contains data that further describe
	// the cluster that is to be build. For example,
	// in the case of LoadBalancer this will contain the defined
	// roles from the manifest. Can be nil if no data is supplied.
	Metadata map[string]any
	// SpawnProcessLimit represents a synchronization channel which limits the number of spawned terraform
	// processes. This values should always be non-nil and be buffered, where the capacity indicates
	// the limit.
	SpawnProcessLimit chan struct{}
}

ClusterBuilder wraps data needed for building a cluster.

func (ClusterBuilder) CreateNodepools

func (c ClusterBuilder) CreateNodepools() error

CreateNodepools creates node pools for the cluster.

func (ClusterBuilder) DestroyNodepools

func (c ClusterBuilder) DestroyNodepools() error

DestroyNodepools destroys nodepools for the cluster.

type NodePoolInfo added in v0.4.0

type NodePoolInfo struct {
	NodePool  *pb.DynamicNodePool
	Name      string
	Nodes     []*pb.Node
	IsControl bool
}

type NodepoolsData

type NodepoolsData struct {
	ClusterName string
	ClusterHash string
	NodePools   []NodePoolInfo
	Metadata    map[string]any
	Regions     []string
}

Jump to

Keyboard shortcuts

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