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 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.