azuretasks

package
v1.31.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationSecurityGroup added in v1.28.0

type ApplicationSecurityGroup struct {
	Name          *string
	ID            *string
	Lifecycle     fi.Lifecycle
	ResourceGroup *ResourceGroup

	Tags map[string]*string
}

ApplicationSecurityGroup is an Azure Cloud Application Security Group +kops:fitask

func (*ApplicationSecurityGroup) CheckChanges added in v1.28.0

func (*ApplicationSecurityGroup) CheckChanges(a, e, changes *ApplicationSecurityGroup) error

CheckChanges returns an error if a change is not allowed.

func (*ApplicationSecurityGroup) CompareWithID added in v1.28.0

func (asg *ApplicationSecurityGroup) CompareWithID() *string

CompareWithID returns the Name of the Application Security Group

func (*ApplicationSecurityGroup) Find added in v1.28.0

Find discovers the Application Security Group in the cloud provider

func (*ApplicationSecurityGroup) GetLifecycle added in v1.28.0

func (o *ApplicationSecurityGroup) GetLifecycle() fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*ApplicationSecurityGroup) GetName added in v1.28.0

func (o *ApplicationSecurityGroup) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*ApplicationSecurityGroup) Normalize added in v1.28.0

func (asg *ApplicationSecurityGroup) Normalize(c *fi.CloudupContext) error

func (*ApplicationSecurityGroup) RenderAzure added in v1.28.0

RenderAzure creates or updates a Application Security Group.

func (*ApplicationSecurityGroup) Run added in v1.28.0

Run implements fi.Task.Run.

func (*ApplicationSecurityGroup) SetLifecycle added in v1.28.0

func (o *ApplicationSecurityGroup) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*ApplicationSecurityGroup) String added in v1.28.0

func (o *ApplicationSecurityGroup) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

type Disk

type Disk struct {
	Name      *string
	Lifecycle fi.Lifecycle

	ResourceGroup *ResourceGroup
	SizeGB        *int32
	Tags          map[string]*string
	Zones         []*string
}

Disk is an Azure Managed Disk. +kops:fitask

func (*Disk) CheckChanges

func (*Disk) CheckChanges(a, e, changes *Disk) error

CheckChanges returns an error if a change is not allowed.

func (*Disk) CompareWithID

func (d *Disk) CompareWithID() *string

CompareWithID returns the Name of the Disk.

func (*Disk) Find

func (d *Disk) Find(c *fi.CloudupContext) (*Disk, error)

Find discovers the Disk in the cloud provider.

func (*Disk) GetLifecycle

func (o *Disk) GetLifecycle() fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*Disk) GetName

func (o *Disk) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*Disk) Normalize added in v1.26.0

func (d *Disk) Normalize(c *fi.CloudupContext) error

func (*Disk) RenderAzure

func (*Disk) RenderAzure(t *azure.AzureAPITarget, a, e, changes *Disk) error

RenderAzure creates or updates a Disk.

func (*Disk) Run

func (d *Disk) Run(c *fi.CloudupContext) error

Run implements fi.Task.Run.

func (*Disk) SetLifecycle

func (o *Disk) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*Disk) String

func (o *Disk) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

type LoadBalancer

type LoadBalancer struct {
	Name          *string
	Lifecycle     fi.Lifecycle
	ResourceGroup *ResourceGroup
	Subnet        *Subnet

	// External is set to true when the loadbalancer is used for external traffic
	External *bool

	Tags map[string]*string

	// WellKnownServices indicates which services are supported by this resource.
	// This field is internal and is not rendered to the cloud.
	WellKnownServices []wellknownservices.WellKnownService
}

LoadBalancer is an Azure Cloud LoadBalancer +kops:fitask

func (*LoadBalancer) CheckChanges

func (*LoadBalancer) CheckChanges(a, e, changes *LoadBalancer) error

CheckChanges returns an error if a change is not allowed.

func (*LoadBalancer) CompareWithID

func (lb *LoadBalancer) CompareWithID() *string

CompareWithID returns the Name of the LoadBalancer

func (*LoadBalancer) Find

func (lb *LoadBalancer) Find(c *fi.CloudupContext) (*LoadBalancer, error)

Find discovers the LoadBalancer in the cloud provider

func (*LoadBalancer) FindAddresses added in v1.28.0

func (lb *LoadBalancer) FindAddresses(c *fi.CloudupContext) ([]string, error)

func (*LoadBalancer) GetLifecycle

func (o *LoadBalancer) GetLifecycle() fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*LoadBalancer) GetName

func (o *LoadBalancer) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*LoadBalancer) GetWellKnownServices added in v1.29.0

func (lb *LoadBalancer) GetWellKnownServices() []wellknownservices.WellKnownService

GetWellKnownServices implements fi.HasAddress::GetWellKnownServices. It indicates which services we support with this load balancer.

func (*LoadBalancer) Normalize added in v1.26.0

func (lb *LoadBalancer) Normalize(c *fi.CloudupContext) error

func (*LoadBalancer) RenderAzure

func (*LoadBalancer) RenderAzure(t *azure.AzureAPITarget, a, e, changes *LoadBalancer) error

RenderAzure creates or updates a Loadbalancer.

func (*LoadBalancer) Run

func (lb *LoadBalancer) Run(c *fi.CloudupContext) error

Run implements fi.Task.Run.

func (*LoadBalancer) SetLifecycle

func (o *LoadBalancer) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*LoadBalancer) String

func (o *LoadBalancer) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

type MockApplicationSecurityGroupsClient added in v1.28.0

type MockApplicationSecurityGroupsClient struct {
	ASGs map[string]*network.ApplicationSecurityGroup
}

MockApplicationSecurityGroupsClient is a mock implementation of Application Security Group client.

func (*MockApplicationSecurityGroupsClient) CreateOrUpdate added in v1.28.0

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

CreateOrUpdate creates or updates a Application Security Group.

func (*MockApplicationSecurityGroupsClient) Delete added in v1.28.0

func (c *MockApplicationSecurityGroupsClient) Delete(ctx context.Context, resourceGroupName, asgName string) error

Delete deletes a specified Application Security Group.

func (*MockApplicationSecurityGroupsClient) Get added in v1.28.0

Get Returns a specified Application Security Group.

func (*MockApplicationSecurityGroupsClient) List added in v1.28.0

List returns a slice of Application Security Groups.

type MockAzureCloud

type MockAzureCloud struct {
	Location                        string
	ResourceGroupsClient            *MockResourceGroupsClient
	VirtualNetworksClient           *MockVirtualNetworksClient
	SubnetsClient                   *MockSubnetsClient
	RouteTablesClient               *MockRouteTablesClient
	NetworkSecurityGroupsClient     *MockNetworkSecurityGroupsClient
	ApplicationSecurityGroupsClient *MockApplicationSecurityGroupsClient
	VMScaleSetsClient               *MockVMScaleSetsClient
	VMScaleSetVMsClient             *MockVMScaleSetVMsClient
	DisksClient                     *MockDisksClient
	RoleAssignmentsClient           *MockRoleAssignmentsClient
	NetworkInterfacesClient         *MockNetworkInterfacesClient
	LoadBalancersClient             *MockLoadBalancersClient
	PublicIPAddressesClient         *MockPublicIPAddressesClient
	NatGatewaysClient               *MockNatGatewaysClient
	StorageAccountsClient           *MockStorageAccountsClient
}

MockAzureCloud is a mock implementation of AzureCloud.

func NewMockAzureCloud

func NewMockAzureCloud(location string) *MockAzureCloud

NewMockAzureCloud returns a new MockAzureCloud.

func (*MockAzureCloud) AddClusterTags

func (c *MockAzureCloud) AddClusterTags(tags map[string]*string)

AddClusterTags add the cluster tag to the given tag map.

func (*MockAzureCloud) ApplicationSecurityGroup added in v1.28.0

func (c *MockAzureCloud) ApplicationSecurityGroup() azure.ApplicationSecurityGroupsClient

ApplicationSecurityGroup returns the Application Security Group client.

func (*MockAzureCloud) DNS

DNS returns the DNS provider.

func (*MockAzureCloud) DeleteGroup

DeleteGroup deletes the group.

func (*MockAzureCloud) DeleteInstance

func (c *MockAzureCloud) DeleteInstance(i *cloudinstances.CloudInstance) error

DeleteInstance deletes the instance.

func (*MockAzureCloud) DeregisterInstance added in v1.24.0

func (c *MockAzureCloud) DeregisterInstance(i *cloudinstances.CloudInstance) error

func (*MockAzureCloud) DetachInstance

func (c *MockAzureCloud) DetachInstance(i *cloudinstances.CloudInstance) error

DetachInstance detaches the instance.

func (*MockAzureCloud) Disk

func (c *MockAzureCloud) Disk() azure.DisksClient

Disk returns the disk client.

func (*MockAzureCloud) FindClusterStatus

func (c *MockAzureCloud) FindClusterStatus(cluster *kops.Cluster) (*kops.ClusterStatus, error)

FindClusterStatus discovers the status of the cluster, by looking for the tagged etcd volumes

func (*MockAzureCloud) FindStorageAccountInfo added in v1.30.0

func (c *MockAzureCloud) FindStorageAccountInfo(name string) (*armstorage.Account, error)

FindStorageAccountInfo returns the storage account info.

func (*MockAzureCloud) FindVNetInfo added in v1.21.3

func (c *MockAzureCloud) FindVNetInfo(id, resourceGroup string) (*fi.VPCInfo, error)

FindVNetInfo returns the VPCInfo.

func (*MockAzureCloud) FindVPCInfo

func (c *MockAzureCloud) FindVPCInfo(id string) (*fi.VPCInfo, error)

FindVPCInfo returns the VPCInfo.

func (*MockAzureCloud) GetApiIngressStatus

func (c *MockAzureCloud) GetApiIngressStatus(cluster *kops.Cluster) ([]fi.ApiIngressStatus, error)

GetApiIngressStatus returns the status of API ingress.

func (*MockAzureCloud) GetCloudGroups

func (c *MockAzureCloud) GetCloudGroups(
	cluster *kops.Cluster,
	instancegroups []*kops.InstanceGroup,
	warnUnmatched bool,
	nodes []v1.Node,
) (map[string]*cloudinstances.CloudInstanceGroup, error)

GetCloudGroups returns cloud instance groups.

func (*MockAzureCloud) LoadBalancer

func (c *MockAzureCloud) LoadBalancer() azure.LoadBalancersClient

LoadBalancer returns the loadbalancer client.

func (*MockAzureCloud) NatGateway added in v1.28.0

func (c *MockAzureCloud) NatGateway() azure.NatGatewaysClient

NatGateway returns the nat gateway client.

func (*MockAzureCloud) NetworkInterface

func (c *MockAzureCloud) NetworkInterface() azure.NetworkInterfacesClient

NetworkInterface returns the network interface client.

func (*MockAzureCloud) NetworkSecurityGroup added in v1.28.0

func (c *MockAzureCloud) NetworkSecurityGroup() azure.NetworkSecurityGroupsClient

NetworkSecurityGroup returns the Network Security Group client.

func (*MockAzureCloud) ProviderID

func (c *MockAzureCloud) ProviderID() kops.CloudProviderID

ProviderID returns the provider ID.

func (*MockAzureCloud) PublicIPAddress

func (c *MockAzureCloud) PublicIPAddress() azure.PublicIPAddressesClient

PublicIPAddress returns the public ip address client.

func (*MockAzureCloud) Region

func (c *MockAzureCloud) Region() string

Region returns the region.

func (*MockAzureCloud) ResourceGroup

func (c *MockAzureCloud) ResourceGroup() azure.ResourceGroupsClient

ResourceGroup returns the resource group client.

func (*MockAzureCloud) RoleAssignment

func (c *MockAzureCloud) RoleAssignment() azure.RoleAssignmentsClient

RoleAssignment returns the role assignment client.

func (*MockAzureCloud) RouteTable

func (c *MockAzureCloud) RouteTable() azure.RouteTablesClient

RouteTable returns the route table client.

func (*MockAzureCloud) Subnet

func (c *MockAzureCloud) Subnet() azure.SubnetsClient

Subnet returns the subnet client.

func (*MockAzureCloud) SubscriptionID

func (c *MockAzureCloud) SubscriptionID() string

SubscriptionID returns the subscription ID.

func (*MockAzureCloud) VMScaleSet

func (c *MockAzureCloud) VMScaleSet() azure.VMScaleSetsClient

VMScaleSet returns the VM Scale Set client.

func (*MockAzureCloud) VMScaleSetVM

func (c *MockAzureCloud) VMScaleSetVM() azure.VMScaleSetVMsClient

VMScaleSetVM returns the VM Scale Set VM client.

func (*MockAzureCloud) VirtualNetwork

func (c *MockAzureCloud) VirtualNetwork() azure.VirtualNetworksClient

VirtualNetwork returns the virtual network client.

type MockDisksClient

type MockDisksClient struct {
	Disks map[string]*compute.Disk
}

MockDisksClient is a mock implementation of disk client.

func (*MockDisksClient) CreateOrUpdate

func (c *MockDisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName, diskName string, parameters compute.Disk) (*compute.Disk, error)

CreateOrUpdate creates or updates a disk.

func (*MockDisksClient) Delete

func (c *MockDisksClient) Delete(ctx context.Context, resourceGroupName, diskName string) error

Delete deletes a specified disk.

func (*MockDisksClient) List

func (c *MockDisksClient) List(ctx context.Context, resourceGroupName string) ([]*compute.Disk, error)

List returns a slice of disks.

type MockLoadBalancersClient

type MockLoadBalancersClient struct {
	LBs map[string]*network.LoadBalancer
}

MockLoadBalancersClient is a mock implementation of role assignment client.

func (*MockLoadBalancersClient) CreateOrUpdate

func (c *MockLoadBalancersClient) CreateOrUpdate(ctx context.Context, resourceGroupName, loadBalancerName string, parameters network.LoadBalancer) (*network.LoadBalancer, error)

CreateOrUpdate creates a new loadbalancer.

func (*MockLoadBalancersClient) Delete

func (c *MockLoadBalancersClient) Delete(ctx context.Context, scope, lbName string) error

Delete deletes a specified loadbalancer.

func (*MockLoadBalancersClient) Get added in v1.28.0

func (c *MockLoadBalancersClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string) (*network.LoadBalancer, error)

Get returns a loadbalancer.

func (*MockLoadBalancersClient) List

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

List returns a slice of loadbalancer.

type MockNatGatewaysClient added in v1.28.0

type MockNatGatewaysClient struct {
	NGWs map[string]*network.NatGateway
}

MockNatGatewaysClient is a mock implementation of Nat Gateway client.

func (*MockNatGatewaysClient) CreateOrUpdate added in v1.28.0

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

CreateOrUpdate creates or updates a Nat Gateway.

func (*MockNatGatewaysClient) Delete added in v1.28.0

func (c *MockNatGatewaysClient) Delete(ctx context.Context, resourceGroupName, ngwName string) error

Delete deletes a specified Nat Gateway.

func (*MockNatGatewaysClient) Get added in v1.28.0

func (c *MockNatGatewaysClient) Get(ctx context.Context, resourceGroupName string, ngwName string) (*network.NatGateway, error)

Get Returns a specified Nat Gateway.

func (*MockNatGatewaysClient) List added in v1.28.0

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

List returns a slice of Nat Gateways.

type MockNetworkInterfacesClient

type MockNetworkInterfacesClient struct {
	NIs map[string]*network.Interface
}

MockNetworkInterfacesClient is a mock implementation of network interfaces client.

func (*MockNetworkInterfacesClient) ListScaleSetsNetworkInterfaces

func (c *MockNetworkInterfacesClient) ListScaleSetsNetworkInterfaces(ctx context.Context, resourceGroupName, vmssName string) ([]*network.Interface, error)

List returns a slice of VM Scale Set Network Interfaces.

type MockNetworkSecurityGroupsClient added in v1.28.0

type MockNetworkSecurityGroupsClient struct {
	NSGs map[string]*network.SecurityGroup
}

MockNetworkSecurityGroupsClient is a mock implementation of Network Security Group client.

func (*MockNetworkSecurityGroupsClient) CreateOrUpdate added in v1.28.0

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

CreateOrUpdate creates or updates a Network Security Group.

func (*MockNetworkSecurityGroupsClient) Delete added in v1.28.0

func (c *MockNetworkSecurityGroupsClient) Delete(ctx context.Context, resourceGroupName, nsgName string) error

Delete deletes a specified Network Security Group.

func (*MockNetworkSecurityGroupsClient) Get added in v1.28.0

func (c *MockNetworkSecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, nsgName string) (*network.SecurityGroup, error)

Get Returns a specified Network Security Group.

func (*MockNetworkSecurityGroupsClient) List added in v1.28.0

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

List returns a slice of Network Security Groups.

type MockPublicIPAddressesClient

type MockPublicIPAddressesClient struct {
	PubIPs map[string]*network.PublicIPAddress
}

MockPublicIPAddressesClient is a mock implementation of role assignment client.

func (*MockPublicIPAddressesClient) CreateOrUpdate

func (c *MockPublicIPAddressesClient) CreateOrUpdate(ctx context.Context, resourceGroupName, publicIPAddressName string, parameters network.PublicIPAddress) (*network.PublicIPAddress, error)

CreateOrUpdate creates a new public ip address.

func (*MockPublicIPAddressesClient) Delete

func (c *MockPublicIPAddressesClient) Delete(ctx context.Context, scope, publicIPAddressName string) error

Delete deletes a specified public ip address.

func (*MockPublicIPAddressesClient) List

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

List returns a slice of public ip address.

type MockResourceGroupsClient

type MockResourceGroupsClient struct {
	RGs map[string]*resources.ResourceGroup
}

MockResourceGroupsClient is a mock implementation of resource group client.

func (*MockResourceGroupsClient) CreateOrUpdate

func (c *MockResourceGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, parameters resources.ResourceGroup) error

CreateOrUpdate creates or updates a resource group.

func (*MockResourceGroupsClient) Delete

func (c *MockResourceGroupsClient) Delete(ctx context.Context, name string) error

Delete deletes a specified resource group.

func (*MockResourceGroupsClient) List

List returns a slice of resource groups.

type MockRoleAssignmentsClient

type MockRoleAssignmentsClient struct {
	RAs map[string]*authz.RoleAssignment
}

MockRoleAssignmentsClient is a mock implementation of role assignment client.

func (*MockRoleAssignmentsClient) Create

func (c *MockRoleAssignmentsClient) Create(
	ctx context.Context,
	scope string,
	roleAssignmentName string,
	parameters authz.RoleAssignmentCreateParameters,
) (*authz.RoleAssignment, error)

Create creates a new role assignment.

func (*MockRoleAssignmentsClient) Delete

func (c *MockRoleAssignmentsClient) Delete(ctx context.Context, scope, raName string) error

Delete deletes a specified role assignment.

func (*MockRoleAssignmentsClient) List

List returns a slice of role assignments.

type MockRouteTablesClient

type MockRouteTablesClient struct {
	RTs map[string]*network.RouteTable
}

MockRouteTablesClient is a mock implementation of a route table client.

func (*MockRouteTablesClient) CreateOrUpdate

func (c *MockRouteTablesClient) CreateOrUpdate(ctx context.Context, resourceGroupName, routeTableName string, parameters network.RouteTable) (*network.RouteTable, error)

CreateOrUpdate creates or updates a route table.

func (*MockRouteTablesClient) Delete

func (c *MockRouteTablesClient) Delete(ctx context.Context, resourceGroupName, routeTableName string) error

Delete deletes a specified routeTable.

func (*MockRouteTablesClient) List

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

List returns a slice of route tables.

type MockStorageAccountsClient added in v1.30.0

type MockStorageAccountsClient struct {
	SAs map[string]*armstorage.Account
}

MockStorageAccountsClient is a mock implementation of Nat Gateway client.

func (*MockStorageAccountsClient) List added in v1.30.0

List returns a slice of Storage Accounts.

type MockSubnetsClient

type MockSubnetsClient struct {
	Subnets map[string]*network.Subnet
}

MockSubnetsClient is a mock implementation of a subnet client.

func (*MockSubnetsClient) CreateOrUpdate

func (c *MockSubnetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName, virtualNetworkName, subnetName string, parameters network.Subnet) (*network.Subnet, error)

CreateOrUpdate creates or updates a subnet.

func (*MockSubnetsClient) Delete

func (c *MockSubnetsClient) Delete(ctx context.Context, resourceGroupName, vnetName, subnetName string) error

Delete deletes a specified subnet.

func (*MockSubnetsClient) List

func (c *MockSubnetsClient) List(ctx context.Context, resourceGroupName, virtualNetworkName string) ([]*network.Subnet, error)

List returns a slice of subnets.

type MockVMScaleSetVMsClient

type MockVMScaleSetVMsClient struct {
	VMs map[string]*compute.VirtualMachineScaleSetVM
}

MockVMScaleSetVMsClient is a mock implementation of VM Scale Set VM client.

func (*MockVMScaleSetVMsClient) Delete added in v1.30.0

func (c *MockVMScaleSetVMsClient) Delete(ctx context.Context, resourceGroupName, vmssName, instanceID string) error

Delete deletes a VM Scale Set VMs.

func (*MockVMScaleSetVMsClient) List

func (c *MockVMScaleSetVMsClient) List(ctx context.Context, resourceGroupName, vmssName string) ([]*compute.VirtualMachineScaleSetVM, error)

List returns a slice of VM Scale Set VMs.

type MockVMScaleSetsClient

type MockVMScaleSetsClient struct {
	VMSSes map[string]*compute.VirtualMachineScaleSet
}

MockVMScaleSetsClient is a mock implementation of VM Scale Set client.

func (*MockVMScaleSetsClient) CreateOrUpdate

func (c *MockVMScaleSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName, vmScaleSetName string, parameters compute.VirtualMachineScaleSet) (*compute.VirtualMachineScaleSet, error)

CreateOrUpdate creates or updates a VM Scale Set.

func (*MockVMScaleSetsClient) Delete

func (c *MockVMScaleSetsClient) Delete(ctx context.Context, resourceGroupName, vmssName string) error

Delete deletes a specified VM Scale Set.

func (*MockVMScaleSetsClient) Get added in v1.26.0

func (c *MockVMScaleSetsClient) Get(ctx context.Context, resourceGroupName string, vmssName string) (*compute.VirtualMachineScaleSet, error)

Get Returns a specified VM Scale Set.

func (*MockVMScaleSetsClient) List

func (c *MockVMScaleSetsClient) List(ctx context.Context, resourceGroupName string) ([]*compute.VirtualMachineScaleSet, error)

List returns a slice of VM Scale Sets.

type MockVirtualNetworksClient

type MockVirtualNetworksClient struct {
	VNets map[string]*network.VirtualNetwork
}

MockVirtualNetworksClient is a mock implementation of virtual network client.

func (*MockVirtualNetworksClient) CreateOrUpdate

func (c *MockVirtualNetworksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters network.VirtualNetwork) (*network.VirtualNetwork, error)

CreateOrUpdate creates or updates a virtual network.

func (*MockVirtualNetworksClient) Delete

func (c *MockVirtualNetworksClient) Delete(ctx context.Context, resourceGroupName, vnetName string) error

Delete deletes a specified virtual network.

func (*MockVirtualNetworksClient) List

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

List returns a slice of virtual networks.

type NatGateway added in v1.28.0

type NatGateway struct {
	Name      *string
	Lifecycle fi.Lifecycle

	ID                *string
	PublicIPAddresses []*PublicIPAddress
	ResourceGroup     *ResourceGroup

	Tags map[string]*string
}

NatGateway is an Azure Nat Gateway +kops:fitask

func (*NatGateway) CheckChanges added in v1.28.0

func (*NatGateway) CheckChanges(a, e, changes *NatGateway) error

CheckChanges returns an error if a change is not allowed.

func (*NatGateway) CompareWithID added in v1.28.0

func (ngw *NatGateway) CompareWithID() *string

CompareWithID returns the Name of the Nat Gateway

func (*NatGateway) Find added in v1.28.0

func (ngw *NatGateway) Find(c *fi.CloudupContext) (*NatGateway, error)

Find discovers the Nat Gateway in the cloud provider

func (*NatGateway) GetLifecycle added in v1.28.0

func (o *NatGateway) GetLifecycle() fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*NatGateway) GetName added in v1.28.0

func (o *NatGateway) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*NatGateway) Normalize added in v1.28.0

func (ngw *NatGateway) Normalize(c *fi.CloudupContext) error

func (*NatGateway) RenderAzure added in v1.28.0

func (*NatGateway) RenderAzure(t *azure.AzureAPITarget, a, e, changes *NatGateway) error

RenderAzure creates or updates a Nat Gateway.

func (*NatGateway) Run added in v1.28.0

func (ngw *NatGateway) Run(c *fi.CloudupContext) error

Run implements fi.Task.Run.

func (*NatGateway) SetLifecycle added in v1.28.0

func (o *NatGateway) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*NatGateway) String added in v1.28.0

func (o *NatGateway) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

type NetworkSecurityGroup added in v1.28.0

type NetworkSecurityGroup struct {
	Name          *string
	ID            *string
	Lifecycle     fi.Lifecycle
	ResourceGroup *ResourceGroup

	SecurityRules []*NetworkSecurityRule

	Tags map[string]*string
}

NetworkSecurityGroup is an Azure Cloud Network Security Group +kops:fitask

func (*NetworkSecurityGroup) CheckChanges added in v1.28.0

func (*NetworkSecurityGroup) CheckChanges(a, e, changes *NetworkSecurityGroup) error

CheckChanges returns an error if a change is not allowed.

func (*NetworkSecurityGroup) CompareWithID added in v1.28.0

func (nsg *NetworkSecurityGroup) CompareWithID() *string

CompareWithID returns the Name of the Network Security Group

func (*NetworkSecurityGroup) Find added in v1.28.0

Find discovers the Network Security Group in the cloud provider

func (*NetworkSecurityGroup) GetLifecycle added in v1.28.0

func (o *NetworkSecurityGroup) GetLifecycle() fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*NetworkSecurityGroup) GetName added in v1.28.0

func (o *NetworkSecurityGroup) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*NetworkSecurityGroup) Normalize added in v1.28.0

func (nsg *NetworkSecurityGroup) Normalize(c *fi.CloudupContext) error

func (*NetworkSecurityGroup) RenderAzure added in v1.28.0

func (*NetworkSecurityGroup) RenderAzure(t *azure.AzureAPITarget, a, e, changes *NetworkSecurityGroup) error

RenderAzure creates or updates a Network Security Group.

func (*NetworkSecurityGroup) Run added in v1.28.0

Run implements fi.Task.Run.

func (*NetworkSecurityGroup) SetLifecycle added in v1.28.0

func (o *NetworkSecurityGroup) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*NetworkSecurityGroup) String added in v1.28.0

func (o *NetworkSecurityGroup) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

type NetworkSecurityRule added in v1.28.0

type NetworkSecurityRule struct {
	Name                                     *string
	Priority                                 *int32
	Access                                   network.SecurityRuleAccess
	Direction                                network.SecurityRuleDirection
	Protocol                                 network.SecurityRuleProtocol
	SourceAddressPrefix                      *string
	SourceAddressPrefixes                    []*string
	SourceApplicationSecurityGroupNames      []*string
	SourcePortRange                          *string
	DestinationAddressPrefixes               []*string
	DestinationAddressPrefix                 *string
	DestinationApplicationSecurityGroupNames []*string
	DestinationPortRange                     *string
}

NetworkSecurityRule represents a NetworkSecurityGroup rule.

func (*NetworkSecurityRule) GetDependencies added in v1.28.0

func (e *NetworkSecurityRule) GetDependencies(tasks map[string]fi.CloudupTask) []fi.CloudupTask

type PublicIPAddress

type PublicIPAddress struct {
	Name      *string
	Lifecycle fi.Lifecycle

	ID            *string
	ResourceGroup *ResourceGroup

	Tags map[string]*string
}

PublicIPAddress is an Azure Cloud Public IP Address +kops:fitask

func (*PublicIPAddress) CheckChanges

func (*PublicIPAddress) CheckChanges(a, e, changes *PublicIPAddress) error

CheckChanges returns an error if a change is not allowed.

func (*PublicIPAddress) CompareWithID

func (p *PublicIPAddress) CompareWithID() *string

CompareWithID returns the Name of the Public IP Address

func (*PublicIPAddress) Find

Find discovers the Public IP Address in the cloud provider

func (*PublicIPAddress) GetLifecycle

func (o *PublicIPAddress) GetLifecycle() fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*PublicIPAddress) GetName

func (o *PublicIPAddress) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*PublicIPAddress) Normalize added in v1.26.0

func (p *PublicIPAddress) Normalize(c *fi.CloudupContext) error

func (*PublicIPAddress) RenderAzure

func (*PublicIPAddress) RenderAzure(t *azure.AzureAPITarget, a, e, changes *PublicIPAddress) error

RenderAzure creates or updates a Public IP Address.

func (*PublicIPAddress) Run

Run implements fi.Task.Run.

func (*PublicIPAddress) SetLifecycle

func (o *PublicIPAddress) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*PublicIPAddress) String

func (o *PublicIPAddress) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

type ResourceGroup

type ResourceGroup struct {
	Name      *string
	Lifecycle fi.Lifecycle
	Tags      map[string]*string
	// Shared is set to true if the resource group is not solely
	// owned by kops. The resource group will not be deleted when
	// a cluster is destroyed.
	Shared *bool
}

ResourceGroup is an Azure resource group. +kops:fitask

func (*ResourceGroup) CheckChanges

func (*ResourceGroup) CheckChanges(a, e, changes *ResourceGroup) error

CheckChanges returns an error if a change is not allowed.

func (*ResourceGroup) CompareWithID

func (r *ResourceGroup) CompareWithID() *string

CompareWithID returns the Name of the VM Scale Set.

func (*ResourceGroup) Find

Find discovers the ResourceGroup in the cloud provider.

func (*ResourceGroup) GetLifecycle

func (o *ResourceGroup) GetLifecycle() fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*ResourceGroup) GetName

func (o *ResourceGroup) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*ResourceGroup) Normalize added in v1.26.0

func (r *ResourceGroup) Normalize(c *fi.CloudupContext) error

func (*ResourceGroup) RenderAzure

func (*ResourceGroup) RenderAzure(t *azure.AzureAPITarget, a, e, changes *ResourceGroup) error

RenderAzure creates or updates a resource group.

func (*ResourceGroup) Run

func (r *ResourceGroup) Run(c *fi.CloudupContext) error

Run implements fi.Task.Run.

func (*ResourceGroup) SetLifecycle

func (o *ResourceGroup) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*ResourceGroup) String

func (o *ResourceGroup) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

type RoleAssignment

type RoleAssignment struct {
	// Name is the name of the RoleAssignment task. This is
	// different from a name of Role Assignment, which is GUID.
	// As kops cannot give a fixed name to the Role Assignment
	// name generated from kops cluster config, we keep a task
	// name and a Role Assignment name separate.
	Name      *string
	Lifecycle fi.Lifecycle

	Scope      *string
	VMScaleSet *VMScaleSet
	ID         *string
	RoleDefID  *string
}

RoleAssignment is an Azure Role Assignment. +kops:fitask

func (*RoleAssignment) CheckChanges

func (r *RoleAssignment) CheckChanges(a, e, changes *RoleAssignment) error

CheckChanges returns an error if a change is not allowed.

func (*RoleAssignment) CompareWithID

func (r *RoleAssignment) CompareWithID() *string

CompareWithID returns the Name of the VM Scale Set.

func (*RoleAssignment) Find

Find discovers the RoleAssignment in the cloud provider.

func (*RoleAssignment) GetLifecycle

func (o *RoleAssignment) GetLifecycle() fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*RoleAssignment) GetName

func (o *RoleAssignment) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*RoleAssignment) RenderAzure

func (*RoleAssignment) RenderAzure(t *azure.AzureAPITarget, a, e, changes *RoleAssignment) error

RenderAzure creates or updates a Role Assignment.

func (*RoleAssignment) Run

Run implements fi.Task.Run.

func (*RoleAssignment) SetLifecycle

func (o *RoleAssignment) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*RoleAssignment) String

func (o *RoleAssignment) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

type RouteTable

type RouteTable struct {
	Name          *string
	Lifecycle     fi.Lifecycle
	ResourceGroup *ResourceGroup
	Tags          map[string]*string
	Shared        *bool
}

RouteTable is an Azure Route Table. +kops:fitask

func (*RouteTable) CheckChanges

func (*RouteTable) CheckChanges(a, e, changes *RouteTable) error

CheckChanges returns an error if a change is not allowed.

func (*RouteTable) CompareWithID

func (r *RouteTable) CompareWithID() *string

CompareWithID returns the Name of the VM Scale Set.

func (*RouteTable) Find

func (r *RouteTable) Find(c *fi.CloudupContext) (*RouteTable, error)

Find discovers the RouteTable in the cloud provider.

func (*RouteTable) GetLifecycle

func (o *RouteTable) GetLifecycle() fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*RouteTable) GetName

func (o *RouteTable) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*RouteTable) Normalize added in v1.26.0

func (r *RouteTable) Normalize(c *fi.CloudupContext) error

func (*RouteTable) RenderAzure

func (*RouteTable) RenderAzure(t *azure.AzureAPITarget, a, e, changes *RouteTable) error

RenderAzure creates or updates a Route Table.

func (*RouteTable) Run

func (r *RouteTable) Run(c *fi.CloudupContext) error

Run implements fi.Task.Run.

func (*RouteTable) SetLifecycle

func (o *RouteTable) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*RouteTable) String

func (o *RouteTable) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

type Subnet

type Subnet struct {
	Name      *string
	Lifecycle fi.Lifecycle

	ID                   *string
	ResourceGroup        *ResourceGroup
	VirtualNetwork       *VirtualNetwork
	NatGateway           *NatGateway
	NetworkSecurityGroup *NetworkSecurityGroup

	CIDR   *string
	Shared *bool
}

Subnet is an Azure subnet. +kops:fitask

func (*Subnet) CheckChanges

func (*Subnet) CheckChanges(a, e, changes *Subnet) error

CheckChanges returns an error if a change is not allowed.

func (*Subnet) CompareWithID

func (s *Subnet) CompareWithID() *string

CompareWithID returns the Name of the VM Scale Set.

func (*Subnet) Find

func (s *Subnet) Find(c *fi.CloudupContext) (*Subnet, error)

Find discovers the Subnet in the cloud provider.

func (*Subnet) GetLifecycle

func (o *Subnet) GetLifecycle() fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*Subnet) GetName

func (o *Subnet) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*Subnet) RenderAzure

func (*Subnet) RenderAzure(t *azure.AzureAPITarget, a, e, changes *Subnet) error

RenderAzure creates or updates a subnet.

func (*Subnet) Run

func (s *Subnet) Run(c *fi.CloudupContext) error

Run implements fi.Task.Run.

func (*Subnet) SetLifecycle

func (o *Subnet) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*Subnet) String

func (o *Subnet) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

type VMScaleSet

type VMScaleSet struct {
	Name      *string
	Lifecycle fi.Lifecycle

	ResourceGroup             *ResourceGroup
	VirtualNetwork            *VirtualNetwork
	Subnet                    *Subnet
	ApplicationSecurityGroups []*ApplicationSecurityGroup
	StorageProfile            *VMScaleSetStorageProfile
	// RequirePublicIP is set to true when VMs require public IPs.
	RequirePublicIP *bool
	// LoadBalancer is the Load Balancer object the VMs will use.
	LoadBalancer *LoadBalancer
	// SKUName specifies the SKU of the VM Scale Set
	SKUName *string
	// Capacity specifies the number of virtual machines the VM Scale Set.
	Capacity *int64
	// ComputerNamePrefix is the prefix of each VM name of the form <prefix><base-36-instance-id>.
	// See https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-instance-ids.
	ComputerNamePrefix *string
	// AdmnUser specifies the name of the administrative account.
	AdminUser    *string
	SSHPublicKey *string
	// UserData is the user data configuration
	UserData    fi.Resource
	Tags        map[string]*string
	Zones       []*string
	PrincipalID *string
}

VMScaleSet is an Azure VM Scale Set. +kops:fitask

func (*VMScaleSet) CheckChanges

func (s *VMScaleSet) CheckChanges(a, e, changes *VMScaleSet) error

CheckChanges returns an error if a change is not allowed.

func (*VMScaleSet) CompareWithID

func (s *VMScaleSet) CompareWithID() *string

CompareWithID returns the Name of the VM Scale Set.

func (*VMScaleSet) Find

func (s *VMScaleSet) Find(c *fi.CloudupContext) (*VMScaleSet, error)

Find discovers the VMScaleSet in the cloud provider.

func (*VMScaleSet) GetLifecycle

func (o *VMScaleSet) GetLifecycle() fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*VMScaleSet) GetName

func (o *VMScaleSet) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*VMScaleSet) Normalize added in v1.26.0

func (s *VMScaleSet) Normalize(c *fi.CloudupContext) error

func (*VMScaleSet) RenderAzure

func (s *VMScaleSet) RenderAzure(t *azure.AzureAPITarget, a, e, changes *VMScaleSet) error

RenderAzure creates or updates a VM Scale Set.

func (*VMScaleSet) Run

func (s *VMScaleSet) Run(c *fi.CloudupContext) error

Run implements fi.Task.Run.

func (*VMScaleSet) SetLifecycle

func (o *VMScaleSet) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*VMScaleSet) String

func (o *VMScaleSet) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

type VMScaleSetStorageProfile

type VMScaleSetStorageProfile struct {
	*compute.VirtualMachineScaleSetStorageProfile
}

VMScaleSetStorageProfile wraps *compute.VirtualMachineScaleSetStorageProfile and implements fi.HasDependencies.

If we don't implement the interface and directly use compute.VirtualMachineScaleSetStorageProfile in VMScaleSet, the topological sort on VMScaleSet will fail as StorageProfile doesn't implement a proper interface.

func (*VMScaleSetStorageProfile) GetDependencies

func (p *VMScaleSetStorageProfile) GetDependencies(tasks map[string]fi.CloudupTask) []fi.CloudupTask

GetDependencies returns a slice of tasks on which the tasks depends on.

type VirtualNetwork

type VirtualNetwork struct {
	Name      *string
	Lifecycle fi.Lifecycle

	ResourceGroup *ResourceGroup
	CIDR          *string
	Tags          map[string]*string
	Shared        *bool
}

VirtualNetwork is an Azure Virtual Network. +kops:fitask

func (*VirtualNetwork) CheckChanges

func (*VirtualNetwork) CheckChanges(a, e, changes *VirtualNetwork) error

CheckChanges returns an error if a change is not allowed.

func (*VirtualNetwork) CompareWithID

func (n *VirtualNetwork) CompareWithID() *string

CompareWithID returns the Name of the VM Scale Set.

func (*VirtualNetwork) Find

Find discovers the VirtualNetwork in the cloud provider.

func (*VirtualNetwork) GetLifecycle

func (o *VirtualNetwork) GetLifecycle() fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*VirtualNetwork) GetName

func (o *VirtualNetwork) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*VirtualNetwork) Normalize added in v1.26.0

func (n *VirtualNetwork) Normalize(c *fi.CloudupContext) error

func (*VirtualNetwork) RenderAzure

func (*VirtualNetwork) RenderAzure(t *azure.AzureAPITarget, a, e, changes *VirtualNetwork) error

RenderAzure creates or updates a Virtual Network.

func (*VirtualNetwork) Run

Run implements fi.Task.Run.

func (*VirtualNetwork) SetLifecycle

func (o *VirtualNetwork) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*VirtualNetwork) String

func (o *VirtualNetwork) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

Jump to

Keyboard shortcuts

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