azure

package
v0.0.0-...-607a5b3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

View Source
const CloudProviderName = "azure"

CloudProviderName is the value used for the --cloud-provider flag

Variables

This section is empty.

Functions

func NewCloud

func NewCloud(configReader io.Reader) (cloudprovider.Interface, error)

NewCloud returns a Cloud with initialized clients

Types

type Cloud

type Cloud struct {
	Config
	Environment           azure.Environment
	InterfacesClient      network.InterfacesClient
	SecurityGroupsClient  network.SecurityGroupsClient
	VirtualMachinesClient compute.VirtualMachinesClient
}

Cloud holds the config and clients

func (*Cloud) EnsureFirewall

func (az *Cloud) EnsureFirewall(ctx context.Context, service *apiv1.Service, hostnames []string) error

EnsureFirewall creates and/or update firewall rules.

func (*Cloud) EnsureFirewallDeleted

func (az *Cloud) EnsureFirewallDeleted(ctx context.Context, service *apiv1.Service) error

EnsureFirewallDeleted deletes the specified firewall rules if those exist, returning nil if the firewall rules specified either didn't exist or was successfully deleted.

func (*Cloud) Firewall

func (az *Cloud) Firewall() (cloudprovider.Firewall, bool)

Firewall returns a firewall interface. Also returns true if the interface is supported, false otherwise.

func (*Cloud) ProviderName

func (az *Cloud) ProviderName() string

ProviderName returns the cloud provider ID.

type Config

type Config struct {
	Cloud                      string `json:"cloud" yaml:"cloud"`
	TenantID                   string `json:"tenantId" yaml:"tenantId"`
	SubscriptionID             string `json:"subscriptionId" yaml:"subscriptionId"`
	ResourceGroup              string `json:"resourceGroup" yaml:"resourceGroup"`
	Location                   string `json:"location" yaml:"location"`
	VnetName                   string `json:"vnetName" yaml:"vnetName"`
	SubnetName                 string `json:"subnetName" yaml:"subnetName"`
	SecurityGroupName          string `json:"securityGroupName" yaml:"securityGroupName"`
	RouteTableName             string `json:"routeTableName" yaml:"routeTableName"`
	PrimaryAvailabilitySetName string `json:"primaryAvailabilitySetName" yaml:"primaryAvailabilitySetName"`

	AADClientID     string `json:"aadClientId" yaml:"aadClientId"`
	AADClientSecret string `json:"aadClientSecret" yaml:"aadClientSecret"`
	AADTenantID     string `json:"aadTenantId" yaml:"aadTenantId"`
}

Config holds the configuration parsed from the --cloud-config flag

Jump to

Keyboard shortcuts

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