hetzner

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHetznerCloudProvider

func NewHetznerCloudProvider() cloud.CloudProvider

Types

type CreateVSwitchResponseBody added in v0.16.0

type CreateVSwitchResponseBody struct {
	ID int `json:"id"`

	Name   string `json:"name"`
	VLANID int    `json:"vlan"`

	Cancelled bool `json:"cancelled"`
}

type FailoverIPDetails added in v0.12.0

type FailoverIPDetails struct {
	ActiveServerIP string `json:"active_server_ip"`
}

type GetFailoverIPDetailsResponse added in v0.12.0

type GetFailoverIPDetailsResponse struct {
	Failover FailoverIPDetails `json:"failover"`
}

type Hetzner

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

func (*Hetzner) ConnectVSwitchWithHCloudNetwork added in v0.16.0

func (h *Hetzner) ConnectVSwitchWithHCloudNetwork(ctx context.Context)

When using Hetzner Bare Metal, we need to establish private connectivity between the Hetzner Network in HCloud and the Hetzner Bare Metal servers. As of now, CAPH doesn't allow us to use a pre-created HCloud Network. So, we need to sync the capi-cluster ArgoCD App, and wait for CAPH to create the HCloud Network. We can then pick up its ID from the HetznerCluster resource.

func (*Hetzner) CreateVSwitch added in v0.16.0

func (h *Hetzner) CreateVSwitch(ctx context.Context)

A VSwitch is used to establish private connectivity between Hetzner Bare Metal servers (and an HCloud Network, when spinning up a Hetzner hybrid cluster). This function is responsible for creating that VSwitch, if it doesn't already exist.

func (*Hetzner) GetLatestBackupName

func (*Hetzner) GetLatestBackupName(ctx context.Context) string

func (*Hetzner) GetVMSpecs

func (h *Hetzner) GetVMSpecs(ctx context.Context, machineType string) *cloud.VMSpec

func (*Hetzner) PointFailoverIPToInitMasterNode added in v0.12.0

func (h *Hetzner) PointFailoverIPToInitMasterNode(ctx context.Context)

func (*Hetzner) SetupDisasterRecovery

func (*Hetzner) SetupDisasterRecovery(ctx context.Context)

func (*Hetzner) UpdateCapiClusterValuesFileWithCloudSpecificDetails

func (*Hetzner) UpdateCapiClusterValuesFileWithCloudSpecificDetails(ctx context.Context,
	capiClusterValuesFilePath string,
	_updates any,
)

func (*Hetzner) UpdateMachineTemplate

func (*Hetzner) UpdateMachineTemplate(
	ctx context.Context,
	clusterClient client.Client,
	_updates any,
)

type ListVSwitchResponseBody added in v0.16.0

type ListVSwitchResponseBody = []struct {
	ID int `json:"id"`

	Name   string `json:"name"`
	VLANID int    `json:"vlan"`

	Cancelled bool `json:"cancelled"`
}

Jump to

Keyboard shortcuts

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