tinkerbell

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package tinkerbell provides Platform implementation using Tinkerbell provisioning system.

Index

Constants

View Source
const (
	// Name represents Tinkerbell platform name as it should be referenced in function calls and configuration.
	Name = "tinkerbell"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AssetDir              string   `hcl:"asset_dir"`
	Name                  string   `hcl:"name"`
	DNSZone               string   `hcl:"dns_zone"`
	SSHPublicKeys         []string `hcl:"ssh_public_keys"`
	ControllerIPAddresses []string `hcl:"controller_ip_addresses"`

	ControllerCLCSnippets           []string `hcl:"controller_clc_snippets,optional"`
	ControllerFlatcarInstallBaseURL string   `hcl:"controller_flatcar_install_base_url,optional"`

	OSChannel string `hcl:"os_channel,optional"`
	OSVersion string `hcl:"os_version,optional"`

	// If true, Tinkerbell server will be created, then used to setup Lokomotive cluster.
	Sandbox *Sandbox `hcl:"experimental_sandbox,block"`

	// Generic options.
	EnableAggregation        bool   `hcl:"enable_aggregation,optional"`
	EnableReporting          bool   `hcl:"enable_reporting,optional"`
	PodCIDR                  string `hcl:"pod_cidr,optional"`
	ServiceCIDR              string `hcl:"service_cidr,optional"`
	ClusterDomainSuffix      string `hcl:"cluster_domain_suffix,optional"`
	CertsValidityPeriodHours int    `hcl:"certs_validity_period_hours,optional"`
	NetworkMTU               int    `hcl:"network_mtu,optional"`
	DisableSelfHostedKubelet bool   `hcl:"disable_self_hosted_kubelet,optional"`
	ConntrackMaxPerCore      int    `hcl:"conntrack_max_per_core,optional"`

	WorkerPools []WorkerPool `hcl:"worker_pool,block"`
}

Config represents Tinkerbell platform configuration.

func NewConfig

func NewConfig() *Config

NewConfig returns Tinkerbell default configuration.

func (*Config) Apply

func (c *Config) Apply(ex *terraform.Executor) error

Apply applies Terraform configuration.

func (*Config) ApplyWithoutParallel added in v0.8.0

func (c *Config) ApplyWithoutParallel(ex *terraform.Executor) error

ApplyWithoutParallel applies Terraform configuration without parallel executions.

func (*Config) Destroy

func (c *Config) Destroy(ex *terraform.Executor) error

Destroy destroys Terraform managed resources.

func (*Config) Initialize

func (c *Config) Initialize(ex *terraform.Executor) error

Initialize unpacks control plane Helm charts into assets directory and creates Terraform configuration file.

func (*Config) LoadConfig

func (c *Config) LoadConfig(configBody *hcl.Body, evalContext *hcl.EvalContext) hcl.Diagnostics

LoadConfig loads platform configuration using given HCL structs.

func (*Config) Meta

func (c *Config) Meta() platform.Meta

Meta is part of Platform interface and returns common information about the platform configuration.

func (*Config) Validate

func (c *Config) Validate() hcl.Diagnostics

Validate validates cluster configuration.

type Sandbox

type Sandbox struct {
	HostsCIDR        string `hcl:"hosts_cidr"`
	FlatcarImagePath string `hcl:"flatcar_image_path"`
	PoolPath         string `hcl:"pool_path"`
}

Sandbox represents Tinkerbell sandbox setup configuration.

type WorkerPool

type WorkerPool struct {
	PoolName string `hcl:"name,label"`

	IPAddresses   []string `hcl:"ip_addresses"`
	SSHPublicKeys []string `hcl:"ssh_public_keys,optional"`

	OSChannel             string   `hcl:"os_channel,optional"`
	OSVersion             string   `hcl:"os_version,optional"`
	FlatcarInstallBaseURL string   `hcl:"flatcar_install_base_url,optional"`
	CLCSnippets           []string `hcl:"clc_snippets,optional"`

	// Generic options.
	Labels map[string]string `hcl:"labels,optional"`
	Taints map[string]string `hcl:"taints,optional"`
}

WorkerPool represents Tinkerbell worker pool configuration.

func (*WorkerPool) Name

func (w *WorkerPool) Name() string

Name returns worker pool name.

Jump to

Keyboard shortcuts

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