azuredev

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datacenter

type Datacenter struct {
	AzureCli          *azsdk.ClientSet
	KubeCli           kubernetes.Interface
	Kubectl           kube.KubectlFunc
	Logger            *slog.Logger
	Name              string
	Location          string
	WorkerNodeCIDR    string
	PeerWithCluster   bool
	ClusterDetails    *cluster.ClusterDetails
	DataDir           cluster.DataDir
	ExtraMachinePools []MachinePool

	SSHBastion                    bool
	SSHBastionVMSize              string
	SSHBastionDisableDirectAccess bool
}

func (*Datacenter) ApplyDatacenterSite

func (d *Datacenter) ApplyDatacenterSite(ctx context.Context) error

func (*Datacenter) ApplyDatacenterSitePool

func (d *Datacenter) ApplyDatacenterSitePool(ctx context.Context, mp MachinePool) error

func (*Datacenter) ApplySSHBastion

func (d *Datacenter) ApplySSHBastion(ctx context.Context, workerSSHKeyPair *infra.SSHKeyPair) error

ApplySSHBastion provisions a single-instance VMSS bastion pool that serves as an SSH jump host for the datacenter site. The bastion reuses the same SSH key pair as the worker pools and is placed in the same subnet. After provisioning, an SSH config file is written to the forge data directory.

type Inventory

type Inventory struct {
	Machines []Machine
	// Bastion is the SSH bastion (jump host) machine, if one exists.
	// It is separated from the regular Machines list so callers can
	// handle it independently.
	Bastion *Machine
}

type InventoryGetter

type InventoryGetter struct {
	AzureCli          *azsdk.ClientSet
	ResourceGroupName string
	LoadBalancerName  string
	SSHBackendPort    int32
}

func (*InventoryGetter) Get

func (g *InventoryGetter) Get(ctx context.Context) (*Inventory, error)

Get returns the machine inventory by querying the load balancer's inbound NAT rule port mappings. Machines in bastion backend pools are separated into the Inventory.Bastion field.

func (*InventoryGetter) GetDirect

func (g *InventoryGetter) GetDirect(ctx context.Context) (*Inventory, error)

GetDirect returns the machine inventory by querying VMSS instances directly for their private IP addresses. This is used when workers have no inbound NAT rules (i.e. direct access is disabled). The bastion's public IP is resolved from the "<resourceGroup>-bastion" public IP resource.

type Machine

type Machine struct {
	Name      string
	IPAddress string
	Port      int
}

type MachinePool

type MachinePool struct {
	Name              string
	Count             int
	Size              string
	UserData          string
	SSHUser           string
	SSHKeyPair        *infra.SSHKeyPair
	BackendPort       int32
	FrontendPortStart int32
	FrontendPortEnd   int32
}

Jump to

Keyboard shortcuts

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