machine

package
v2.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompleteCloudProviderSpec added in v2.22.0

func CompleteCloudProviderSpec(cloudProviderSpec interface{}, cloudProvider kubermaticv1.ProviderType, cluster *kubermaticv1.Cluster, datacenter *kubermaticv1.Datacenter, os providerconfig.OperatingSystem) (interface{}, error)

CompleteCloudProviderSpec takes the given cloudProviderSpec (if any) and fills in the other required fields (for AWS for example the VPCID or instance profile name) based on the datacenter (static configuration) and the cluster object (dynamic infos that some providers write into the spec). The result is the cloudProviderSpec being ready to be marshalled into a MachineSpec to ultimately create the MachineDeployment.

func CompleteNetworkConfig added in v2.22.0

func CompleteNetworkConfig(config *providerconfig.NetworkConfig, cluster *kubermaticv1.Cluster) (*providerconfig.NetworkConfig, error)

func CreateProviderConfig added in v2.22.0

func CreateProviderConfig(cloudProvider kubermaticv1.ProviderType, cloudProviderSpec interface{}, osSpec interface{}, networkConfig *providerconfig.NetworkConfig, sshPubKeys []string) (*providerconfig.Config, error)

func CreateProviderSpec added in v2.22.0

func CreateProviderSpec(providerConfig *providerconfig.Config) (*clusterv1alpha1.ProviderSpec, error)

func DecodeCloudProviderSpec added in v2.22.0

func DecodeCloudProviderSpec(cloudProvider kubermaticv1.ProviderType, pconfig providerconfig.Config) (interface{}, error)

func EncodeAsRawExtension added in v2.22.0

func EncodeAsRawExtension(value interface{}) (runtime.RawExtension, error)

func KubermaticProviderType added in v2.22.0

func KubermaticProviderType(mcName providerconfig.CloudProvider) (kubermaticv1.ProviderType, error)

KubermaticProviderType is the inverse of MachineControllerProviderName.

func MachineControllerProviderName added in v2.22.0

func MachineControllerProviderName(kkpName kubermaticv1.ProviderType) (providerconfig.CloudProvider, error)

MachineControllerProviderName translates the KKP cloud provider name into the machine-controller's name. Most providers are named identically, but some are different (like gcp vs. gce).

func OperatingSystemFromSpec added in v2.22.0

func OperatingSystemFromSpec(osSpec interface{}) (providerconfig.OperatingSystem, error)

OperatingSystemFromSpec returns the OS name for the given OS spec.

func ProviderTypeFromSpec added in v2.22.0

func ProviderTypeFromSpec(cloudProviderSpec interface{}) (kubermaticv1.ProviderType, error)

Types

type MachineBuilder added in v2.22.0

type MachineBuilder struct {
	// contains filtered or unexported fields
}

func NewBuilder added in v2.22.0

func NewBuilder() *MachineBuilder

func (*MachineBuilder) AddSSHKey added in v2.22.0

func (*MachineBuilder) AddSSHPublicKey added in v2.22.0

func (b *MachineBuilder) AddSSHPublicKey(pubKeys ...string) *MachineBuilder

func (*MachineBuilder) BuildCloudProviderSpec added in v2.22.0

func (b *MachineBuilder) BuildCloudProviderSpec() (interface{}, error)

func (*MachineBuilder) BuildProviderConfig added in v2.22.0

func (b *MachineBuilder) BuildProviderConfig() (*providerconfig.Config, error)

func (*MachineBuilder) BuildProviderSpec added in v2.22.0

func (b *MachineBuilder) BuildProviderSpec() (*clusterv1alpha1.ProviderSpec, error)

func (*MachineBuilder) WithCloudProvider added in v2.22.0

func (b *MachineBuilder) WithCloudProvider(cloudProvider kubermaticv1.ProviderType) *MachineBuilder

func (*MachineBuilder) WithCloudProviderSpec added in v2.22.0

func (b *MachineBuilder) WithCloudProviderSpec(cpSpec interface{}) *MachineBuilder

func (*MachineBuilder) WithCluster added in v2.22.0

func (b *MachineBuilder) WithCluster(cluster *kubermaticv1.Cluster) *MachineBuilder

func (*MachineBuilder) WithDatacenter added in v2.22.0

func (b *MachineBuilder) WithDatacenter(datacenter *kubermaticv1.Datacenter) *MachineBuilder

func (*MachineBuilder) WithDatacenterName added in v2.22.0

func (b *MachineBuilder) WithDatacenterName(datacenterName string) *MachineBuilder

func (*MachineBuilder) WithNetworkConfig added in v2.22.0

func (b *MachineBuilder) WithNetworkConfig(networkConfig *providerconfig.NetworkConfig) *MachineBuilder

func (*MachineBuilder) WithOperatingSystemSpec added in v2.22.0

func (b *MachineBuilder) WithOperatingSystemSpec(osSpec interface{}) *MachineBuilder

WithOperatingSystemSpec works great when combined with the convenient [OS]Builder helpers in this package.

func (*MachineBuilder) WithSeed added in v2.22.0

func (b *MachineBuilder) WithSeed(seed *kubermaticv1.Seed) *MachineBuilder

WithSeed should only be used in conjunction with WithDatacenterName(). Alternatively, use WithDatacenter() to specify the datacenter directly.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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