azure

package
v1.28.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 24 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_"
	TagRoleControlPlane      = "control_plane"
	TagRoleMaster            = "master"
	TagNameEtcdClusterPrefix = "k8s.io_etcd_"
)
View Source
const AzureAuthenticationTokenPrefix = "x-azure-id "

Variables

This section is empty.

Functions

func NewAzureAuthenticator added in v1.28.0

func NewAzureAuthenticator() (bootstrap.Authenticator, error)

func NewAzureVerifier added in v1.28.0

func NewAzureVerifier(ctx context.Context, opt *AzureVerifierOptions) (bootstrap.Verifier, error)

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 ApplicationSecurityGroupID added in v1.28.0

type ApplicationSecurityGroupID struct {
	SubscriptionID               string
	ResourceGroupName            string
	ApplicationSecurityGroupName string
}

ApplicationSecurityGroupID contains the resource ID/names required to construct a ApplicationSecurityGroup ID.

func ParseApplicationSecurityGroupID added in v1.28.0

func ParseApplicationSecurityGroupID(s string) (*ApplicationSecurityGroupID, error)

ParseApplicationSecurityGroupID parses a given ApplicationSecurityGroup ID string and returns a ApplicationSecurityGroup ID.

func (*ApplicationSecurityGroupID) String added in v1.28.0

func (s *ApplicationSecurityGroupID) String() string

String returns the ApplicationSecurityGroup ID in the path format.

type ApplicationSecurityGroupsClient added in v1.28.0

type ApplicationSecurityGroupsClient interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName, applicationSecurityGroupName string, parameters network.ApplicationSecurityGroup) (*network.ApplicationSecurityGroup, error)
	List(ctx context.Context, resourceGroupName string) ([]network.ApplicationSecurityGroup, error)
	Delete(ctx context.Context, resourceGroupName, applicationSecurityGroupName string) error
}

ApplicationSecurityGroupsClient is a client for managing Application Security Groups.

type ApplicationSecurityGroupsClientImpl added in v1.28.0

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

func (*ApplicationSecurityGroupsClientImpl) CreateOrUpdate added in v1.28.0

func (c *ApplicationSecurityGroupsClientImpl) CreateOrUpdate(ctx context.Context, resourceGroupName, applicationSecurityGroupName string, parameters network.ApplicationSecurityGroup) (*network.ApplicationSecurityGroup, error)

func (*ApplicationSecurityGroupsClientImpl) Delete added in v1.28.0

func (c *ApplicationSecurityGroupsClientImpl) Delete(ctx context.Context, resourceGroupName, applicationSecurityGroupName string) error

func (*ApplicationSecurityGroupsClientImpl) List added in v1.28.0

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) DefaultCheckExisting added in v1.26.0

func (t *AzureAPITarget) DefaultCheckExisting() bool

func (*AzureAPITarget) Finish

func (t *AzureAPITarget) Finish(taskMap map[string]fi.CloudupTask) 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
	NetworkSecurityGroup() NetworkSecurityGroupsClient
	ApplicationSecurityGroup() ApplicationSecurityGroupsClient
	VMScaleSet() VMScaleSetsClient
	VMScaleSetVM() VMScaleSetVMsClient
	Disk() DisksClient
	RoleAssignment() RoleAssignmentsClient
	NetworkInterface() NetworkInterfacesClient
	LoadBalancer() LoadBalancersClient
	PublicIPAddress() PublicIPAddressesClient
	NatGateway() NatGatewaysClient
}

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 AzureVerifierOptions added in v1.28.0

type AzureVerifierOptions struct {
	ClusterName string `json:"clusterName,omitempty"`
}

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 LoadBalancerID added in v1.28.0

type LoadBalancerID struct {
	SubscriptionID    string
	ResourceGroupName string
	LoadBalancerName  string
}

LoadBalancerID contains the resource ID/names required to construct a load balancer ID.

func ParseLoadBalancerID added in v1.28.0

func ParseLoadBalancerID(lb string) (*LoadBalancerID, error)

ParseLoadBalancerID parses a given load balancer ID string and returns a LoadBalancerID.

func (*LoadBalancerID) String added in v1.28.0

func (lb *LoadBalancerID) String() string

String returns the load balancer ID in the path format.

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)
	Get(ctx context.Context, resourceGroupName string, loadBalancerName string) (*network.LoadBalancer, error)
	Delete(ctx context.Context, resourceGroupName, loadBalancerName string) error
}

LoadBalancersClient is a client for connecting to the kubernetes api.

type NatGatewaysClient added in v1.28.0

type NatGatewaysClient interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName, natGatewayName string, parameters network.NatGateway) (*network.NatGateway, error)
	List(ctx context.Context, resourceGroupName string) ([]network.NatGateway, error)
	Delete(ctx context.Context, resourceGroupName, natGatewayName string) error
}

NatGatewaysClient is a client for managing Nat Gateways.

type NatGatewaysClientImpl added in v1.28.0

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

func (*NatGatewaysClientImpl) CreateOrUpdate added in v1.28.0

func (c *NatGatewaysClientImpl) CreateOrUpdate(ctx context.Context, resourceGroupName, natGatewayName string, parameters network.NatGateway) (*network.NatGateway, error)

func (*NatGatewaysClientImpl) Delete added in v1.28.0

func (c *NatGatewaysClientImpl) Delete(ctx context.Context, resourceGroupName, natGatewayName string) error

func (*NatGatewaysClientImpl) List added in v1.28.0

func (c *NatGatewaysClientImpl) List(ctx context.Context, resourceGroupName string) ([]network.NatGateway, error)

type NetworkInterfacesClient

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

NetworkInterfacesClient is a client for managing Network Interfaces.

type NetworkSecurityGroupID added in v1.28.0

type NetworkSecurityGroupID struct {
	SubscriptionID           string
	ResourceGroupName        string
	NetworkSecurityGroupName string
}

NetworkSecurityGroupID contains the resource ID/names required to construct a NetworkSecurityGroup ID.

func ParseNetworkSecurityGroupID added in v1.28.0

func ParseNetworkSecurityGroupID(s string) (*NetworkSecurityGroupID, error)

ParseNetworkSecurityGroupID parses a given NetworkSecurityGroup ID string and returns a NetworkSecurityGroup ID.

func (*NetworkSecurityGroupID) String added in v1.28.0

func (s *NetworkSecurityGroupID) String() string

String returns the NetworkSecurityGroup ID in the path format.

type NetworkSecurityGroupsClient added in v1.28.0

type NetworkSecurityGroupsClient interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName, NetworkSecurityGroupName string, parameters network.SecurityGroup) (*network.SecurityGroup, error)
	List(ctx context.Context, resourceGroupName string) ([]network.SecurityGroup, error)
	Delete(ctx context.Context, resourceGroupName, NetworkSecurityGroupName string) error
}

NetworkSecurityGroupsClient is a client for managing Network Security Groups.

type NetworkSecurityGroupsClientImpl added in v1.28.0

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

func (*NetworkSecurityGroupsClientImpl) CreateOrUpdate added in v1.28.0

func (c *NetworkSecurityGroupsClientImpl) CreateOrUpdate(ctx context.Context, resourceGroupName, NetworkSecurityGroupName string, parameters network.SecurityGroup) (*network.SecurityGroup, error)

func (*NetworkSecurityGroupsClientImpl) Delete added in v1.28.0

func (c *NetworkSecurityGroupsClientImpl) Delete(ctx context.Context, resourceGroupName, NetworkSecurityGroupName string) error

func (*NetworkSecurityGroupsClientImpl) List added in v1.28.0

func (c *NetworkSecurityGroupsClientImpl) List(ctx context.Context, resourceGroupName string) ([]network.SecurityGroup, error)

type PublicIPAddressID added in v1.28.0

type PublicIPAddressID struct {
	SubscriptionID      string
	ResourceGroupName   string
	PublicIPAddressName string
}

PublicIPAddressID contains the resource ID/names required to construct a PublicIPAddress ID.

func ParsePublicIPAddressID added in v1.28.0

func ParsePublicIPAddressID(s string) (*PublicIPAddressID, error)

ParsePublicIPAddressID parses a given PublicIPAddress ID string and returns a PublicIPAddress ID.

func (*PublicIPAddressID) String added in v1.28.0

func (s *PublicIPAddressID) String() string

String returns the PublicIPAddress ID in the path format.

type PublicIPAddressesClient

type PublicIPAddressesClient interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName, publicIPAddressName string, parameters network.PublicIPAddress) (*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 SubnetID added in v1.28.0

type SubnetID struct {
	SubscriptionID     string
	ResourceGroupName  string
	VirtualNetworkName string
	SubnetName         string
}

SubnetID contains the resource ID/names required to construct a subnet ID.

func ParseSubnetID added in v1.28.0

func ParseSubnetID(s string) (*SubnetID, error)

ParseSubnetID parses a given subnet ID string and returns a SubnetID.

func (*SubnetID) String added in v1.28.0

func (s *SubnetID) String() string

String returns the subnet ID in the path format.

type SubnetsClient

type SubnetsClient interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName, virtualNetworkName, subnetName string, parameters network.Subnet) (*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)
	Get(ctx context.Context, resourceGroupName string, vmssName 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