azure

package
v1.24.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagClusterName = "KubernetesCluster"
	// Use dash (_) as a splitter. Other CSPs use slash (/), but slash is not
	// allowed as a tag key in Azure.
	TagNameRolePrefix        = "k8s.io_role_"
	TagRoleMaster            = "master"
	TagNameEtcdClusterPrefix = "k8s.io_etcd_"
)

Variables

This section is empty.

Functions

func ZoneToAvailabilityZoneNumber added in v1.21.3

func ZoneToAvailabilityZoneNumber(zone string) (string, error)

ZoneToAvailabilityZoneNumber extracts the availability zone number from a zone of the form <location>-<available-zone-number>..

func ZoneToLocation

func ZoneToLocation(zone string) (string, error)

ZoneToLocation extracts the location from a zone of the form <location>-<available-zone-number>..

Types

type AzureAPITarget

type AzureAPITarget struct {
	Cloud AzureCloud
}

AzureAPITarget is a target whose purpose is to provide access AzureCloud.

func NewAzureAPITarget

func NewAzureAPITarget(cloud AzureCloud) *AzureAPITarget

NewAzureAPITarget returns a new AzureAPITarget.

func (*AzureAPITarget) Finish

func (t *AzureAPITarget) Finish(taskMap map[string]fi.Task) error

Finish is called by a lifecycle drive to finish the lifecycle of the target.

func (*AzureAPITarget) ProcessDeletions

func (t *AzureAPITarget) ProcessDeletions() bool

ProcessDeletions returns true if we should delete resources.

type AzureCloud

type AzureCloud interface {
	fi.Cloud
	AddClusterTags(tags map[string]*string)
	FindVNetInfo(id, resourceGroup string) (*fi.VPCInfo, error)
	SubscriptionID() string
	ResourceGroup() ResourceGroupsClient
	VirtualNetwork() VirtualNetworksClient
	Subnet() SubnetsClient
	RouteTable() RouteTablesClient
	VMScaleSet() VMScaleSetsClient
	VMScaleSetVM() VMScaleSetVMsClient
	Disk() DisksClient
	RoleAssignment() RoleAssignmentsClient
	NetworkInterface() NetworkInterfacesClient
	LoadBalancer() LoadBalancersClient
	PublicIPAddress() PublicIPAddressesClient
}

AzureCloud provides clients to make API calls to Azure.

func NewAzureCloud

func NewAzureCloud(subscriptionID, location string, tags map[string]string) (AzureCloud, error)

NewAzureCloud creates a new AzureCloud.

type DisksClient

type DisksClient interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName, diskName string, parameters compute.Disk) error
	List(ctx context.Context, resourceGroupName string) ([]compute.Disk, error)
	Delete(ctx context.Context, resourceGroupName, diskname string) error
}

DisksClient is a client for managing VM Scale Set.

type LoadBalancersClient

type LoadBalancersClient interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName, loadBalancerName string, parameters network.LoadBalancer) error
	List(ctx context.Context, resourceGroupName string) ([]network.LoadBalancer, error)
	Delete(ctx context.Context, resourceGroupName, loadBalancerName string) error
}

LoadBalancersClient is a client for connecting to the kubernetes api.

type NetworkInterfacesClient

type NetworkInterfacesClient interface {
	ListScaleSetsNetworkInterfaces(ctx context.Context, resourceGroupName, vmssName string) ([]network.Interface, error)
}

NetworkInterfacesClient is a client for managing Network Interfaces.

type PublicIPAddressesClient

type PublicIPAddressesClient interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName, publicIPAddressName string, parameters network.PublicIPAddress) error
	List(ctx context.Context, resourceGroupName string) ([]network.PublicIPAddress, error)
	Delete(ctx context.Context, resourceGroupName, publicIPAddressName string) error
}

PublicIPAddressesClient is a client for public ip addresses.

type ResourceGroupsClient

type ResourceGroupsClient interface {
	CreateOrUpdate(ctx context.Context, name string, parameters resources.Group) error
	List(ctx context.Context, filter string) ([]resources.Group, error)
	Delete(ctx context.Context, name string) error
}

ResourceGroupsClient is a client for managing Resource Groups.

type RoleAssignmentsClient

type RoleAssignmentsClient interface {
	Create(ctx context.Context, scope, roleAssignmentName string, parameters authz.RoleAssignmentCreateParameters) (*authz.RoleAssignment, error)
	List(ctx context.Context, resourceGroupName string) ([]authz.RoleAssignment, error)
	Delete(ctx context.Context, scope, raName string) error
}

RoleAssignmentsClient is a client for managing Role Assignments

type RouteTablesClient

type RouteTablesClient interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName, routeTableName string, parameters network.RouteTable) error
	List(ctx context.Context, resourceGroupName string) ([]network.RouteTable, error)
	Delete(ctx context.Context, resourceGroupName, vnetName string) error
}

RouteTablesClient is a client for managing Virtual Networks.

type SubnetsClient

type SubnetsClient interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName, virtualNetworkName, subnetName string, parameters network.Subnet) error
	List(ctx context.Context, resourceGroupName, virtualNetworkName string) ([]network.Subnet, error)
	Delete(ctx context.Context, resourceGroupName, vnetName, subnetName string) error
}

SubnetsClient is a client for managing Subnets.

type VMScaleSetVMsClient

type VMScaleSetVMsClient interface {
	List(ctx context.Context, resourceGroupName, vmssName string) ([]compute.VirtualMachineScaleSetVM, error)
}

VMScaleSetVMsClient is a client for managing VMs in VM Scale Sets.

type VMScaleSetsClient

type VMScaleSetsClient interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName, vmScaleSetName string, parameters compute.VirtualMachineScaleSet) (*compute.VirtualMachineScaleSet, error)
	List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachineScaleSet, error)
	Delete(ctx context.Context, resourceGroupName, vmssName string) error
}

VMScaleSetsClient is a client for managing VM Scale Set.

type VirtualNetworksClient

type VirtualNetworksClient interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName, virtualNetworkName string, parameters network.VirtualNetwork) error
	List(ctx context.Context, resourceGroupName string) ([]network.VirtualNetwork, error)
	Delete(ctx context.Context, resourceGroupName, vnetName string) error
}

VirtualNetworksClient is a client for managing Virtual Networks.

Jump to

Keyboard shortcuts

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