Documentation ¶
Index ¶
- type Disk
- func (*Disk) CheckChanges(a, e, changes *Disk) error
- func (d *Disk) CompareWithID() *string
- func (d *Disk) Find(c *fi.Context) (*Disk, error)
- func (o *Disk) GetLifecycle() *fi.Lifecycle
- func (o *Disk) GetName() *string
- func (*Disk) RenderAzure(t *azure.AzureAPITarget, a, e, changes *Disk) error
- func (d *Disk) Run(c *fi.Context) error
- func (o *Disk) SetLifecycle(lifecycle fi.Lifecycle)
- func (o *Disk) SetName(name string)
- func (o *Disk) String() string
- func (o *Disk) UnmarshalJSON(data []byte) error
- type LoadBalancer
- func (*LoadBalancer) CheckChanges(a, e, changes *LoadBalancer) error
- func (lb *LoadBalancer) CompareWithID() *string
- func (lb *LoadBalancer) Find(c *fi.Context) (*LoadBalancer, error)
- func (o *LoadBalancer) GetLifecycle() *fi.Lifecycle
- func (o *LoadBalancer) GetName() *string
- func (lb *LoadBalancer) IsForAPIServer() bool
- func (*LoadBalancer) RenderAzure(t *azure.AzureAPITarget, a, e, changes *LoadBalancer) error
- func (lb *LoadBalancer) Run(c *fi.Context) error
- func (o *LoadBalancer) SetLifecycle(lifecycle fi.Lifecycle)
- func (o *LoadBalancer) SetName(name string)
- func (o *LoadBalancer) String() string
- func (o *LoadBalancer) UnmarshalJSON(data []byte) error
- type MockAzureCloud
- func (c *MockAzureCloud) AddClusterTags(tags map[string]*string)
- func (c *MockAzureCloud) DNS() (dnsprovider.Interface, error)
- func (c *MockAzureCloud) DeleteGroup(g *cloudinstances.CloudInstanceGroup) error
- func (c *MockAzureCloud) DeleteInstance(i *cloudinstances.CloudInstance) error
- func (c *MockAzureCloud) DetachInstance(i *cloudinstances.CloudInstance) error
- func (c *MockAzureCloud) Disk() azure.DisksClient
- func (c *MockAzureCloud) FindClusterStatus(cluster *kops.Cluster) (*kops.ClusterStatus, error)
- func (c *MockAzureCloud) FindVPCInfo(id string) (*fi.VPCInfo, error)
- func (c *MockAzureCloud) GetApiIngressStatus(cluster *kops.Cluster) ([]kops.ApiIngressStatus, error)
- func (c *MockAzureCloud) GetCloudGroups(cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, ...) (map[string]*cloudinstances.CloudInstanceGroup, error)
- func (c *MockAzureCloud) LoadBalancer() azure.LoadBalancersClient
- func (c *MockAzureCloud) NetworkInterface() azure.NetworkInterfacesClient
- func (c *MockAzureCloud) ProviderID() kops.CloudProviderID
- func (c *MockAzureCloud) Region() string
- func (c *MockAzureCloud) ResourceGroup() azure.ResourceGroupsClient
- func (c *MockAzureCloud) RoleAssignment() azure.RoleAssignmentsClient
- func (c *MockAzureCloud) RouteTable() azure.RouteTablesClient
- func (c *MockAzureCloud) Subnet() azure.SubnetsClient
- func (c *MockAzureCloud) SubscriptionID() string
- func (c *MockAzureCloud) VMScaleSet() azure.VMScaleSetsClient
- func (c *MockAzureCloud) VMScaleSetVM() azure.VMScaleSetVMsClient
- func (c *MockAzureCloud) VirtualNetwork() azure.VirtualNetworksClient
- type MockDisksClient
- func (c *MockDisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName, diskName string, ...) error
- func (c *MockDisksClient) Delete(ctx context.Context, resourceGroupName, diskName string) error
- func (c *MockDisksClient) List(ctx context.Context, resourceGroupName string) ([]compute.Disk, error)
- type MockLoadBalancersClient
- func (c *MockLoadBalancersClient) CreateOrUpdate(ctx context.Context, resourceGroupName, loadBalancerName string, ...) error
- func (c *MockLoadBalancersClient) Delete(ctx context.Context, scope, lbName string) error
- func (c *MockLoadBalancersClient) List(ctx context.Context, resourceGroupName string) ([]network.LoadBalancer, error)
- type MockNetworkInterfacesClient
- type MockResourceGroupsClient
- func (c *MockResourceGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, parameters resources.Group) error
- func (c *MockResourceGroupsClient) Delete(ctx context.Context, name string) error
- func (c *MockResourceGroupsClient) List(ctx context.Context, filter string) ([]resources.Group, error)
- type MockRoleAssignmentsClient
- func (c *MockRoleAssignmentsClient) Create(ctx context.Context, scope string, roleAssignmentName string, ...) (*authz.RoleAssignment, error)
- func (c *MockRoleAssignmentsClient) Delete(ctx context.Context, scope, raName string) error
- func (c *MockRoleAssignmentsClient) List(ctx context.Context, resourceGroupName string) ([]authz.RoleAssignment, error)
- type MockRouteTablesClient
- func (c *MockRouteTablesClient) CreateOrUpdate(ctx context.Context, resourceGroupName, routeTableName string, ...) error
- func (c *MockRouteTablesClient) Delete(ctx context.Context, resourceGroupName, routeTableName string) error
- func (c *MockRouteTablesClient) List(ctx context.Context, resourceGroupName string) ([]network.RouteTable, error)
- type MockSubnetsClient
- func (c *MockSubnetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName, virtualNetworkName, subnetName string, ...) error
- func (c *MockSubnetsClient) Delete(ctx context.Context, resourceGroupName, vnetName, subnetName string) error
- func (c *MockSubnetsClient) List(ctx context.Context, resourceGroupName, virtualNetworkName string) ([]network.Subnet, error)
- type MockVMScaleSetVMsClient
- type MockVMScaleSetsClient
- func (c *MockVMScaleSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName, vmScaleSetName string, ...) (*compute.VirtualMachineScaleSet, error)
- func (c *MockVMScaleSetsClient) Delete(ctx context.Context, resourceGroupName, vmssName string) error
- func (c *MockVMScaleSetsClient) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachineScaleSet, error)
- type MockVirtualNetworksClient
- func (c *MockVirtualNetworksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, ...) error
- func (c *MockVirtualNetworksClient) Delete(ctx context.Context, resourceGroupName, vnetName string) error
- func (c *MockVirtualNetworksClient) List(ctx context.Context, resourceGroupName string) ([]network.VirtualNetwork, error)
- type ResourceGroup
- func (*ResourceGroup) CheckChanges(a, e, changes *ResourceGroup) error
- func (r *ResourceGroup) CompareWithID() *string
- func (r *ResourceGroup) Find(c *fi.Context) (*ResourceGroup, error)
- func (o *ResourceGroup) GetLifecycle() *fi.Lifecycle
- func (o *ResourceGroup) GetName() *string
- func (*ResourceGroup) RenderAzure(t *azure.AzureAPITarget, a, e, changes *ResourceGroup) error
- func (r *ResourceGroup) Run(c *fi.Context) error
- func (o *ResourceGroup) SetLifecycle(lifecycle fi.Lifecycle)
- func (o *ResourceGroup) SetName(name string)
- func (o *ResourceGroup) String() string
- func (o *ResourceGroup) UnmarshalJSON(data []byte) error
- type RoleAssignment
- func (r *RoleAssignment) CheckChanges(a, e, changes *RoleAssignment) error
- func (r *RoleAssignment) CompareWithID() *string
- func (r *RoleAssignment) Find(c *fi.Context) (*RoleAssignment, error)
- func (o *RoleAssignment) GetLifecycle() *fi.Lifecycle
- func (o *RoleAssignment) GetName() *string
- func (*RoleAssignment) RenderAzure(t *azure.AzureAPITarget, a, e, changes *RoleAssignment) error
- func (r *RoleAssignment) Run(c *fi.Context) error
- func (o *RoleAssignment) SetLifecycle(lifecycle fi.Lifecycle)
- func (o *RoleAssignment) SetName(name string)
- func (o *RoleAssignment) String() string
- func (o *RoleAssignment) UnmarshalJSON(data []byte) error
- type RouteTable
- func (*RouteTable) CheckChanges(a, e, changes *RouteTable) error
- func (r *RouteTable) CompareWithID() *string
- func (r *RouteTable) Find(c *fi.Context) (*RouteTable, error)
- func (o *RouteTable) GetLifecycle() *fi.Lifecycle
- func (o *RouteTable) GetName() *string
- func (*RouteTable) RenderAzure(t *azure.AzureAPITarget, a, e, changes *RouteTable) error
- func (r *RouteTable) Run(c *fi.Context) error
- func (o *RouteTable) SetLifecycle(lifecycle fi.Lifecycle)
- func (o *RouteTable) SetName(name string)
- func (o *RouteTable) String() string
- func (o *RouteTable) UnmarshalJSON(data []byte) error
- type Subnet
- func (*Subnet) CheckChanges(a, e, changes *Subnet) error
- func (s *Subnet) CompareWithID() *string
- func (s *Subnet) Find(c *fi.Context) (*Subnet, error)
- func (o *Subnet) GetLifecycle() *fi.Lifecycle
- func (o *Subnet) GetName() *string
- func (*Subnet) RenderAzure(t *azure.AzureAPITarget, a, e, changes *Subnet) error
- func (s *Subnet) Run(c *fi.Context) error
- func (o *Subnet) SetLifecycle(lifecycle fi.Lifecycle)
- func (o *Subnet) SetName(name string)
- func (o *Subnet) String() string
- func (o *Subnet) UnmarshalJSON(data []byte) error
- type SubnetID
- type VMScaleSet
- func (s *VMScaleSet) CheckChanges(a, e, changes *VMScaleSet) error
- func (s *VMScaleSet) CompareWithID() *string
- func (s *VMScaleSet) Find(c *fi.Context) (*VMScaleSet, error)
- func (o *VMScaleSet) GetLifecycle() *fi.Lifecycle
- func (o *VMScaleSet) GetName() *string
- func (s *VMScaleSet) RenderAzure(t *azure.AzureAPITarget, a, e, changes *VMScaleSet) error
- func (s *VMScaleSet) Run(c *fi.Context) error
- func (o *VMScaleSet) SetLifecycle(lifecycle fi.Lifecycle)
- func (o *VMScaleSet) SetName(name string)
- func (o *VMScaleSet) String() string
- func (o *VMScaleSet) UnmarshalJSON(data []byte) error
- type VMScaleSetStorageProfile
- type VirtualNetwork
- func (*VirtualNetwork) CheckChanges(a, e, changes *VirtualNetwork) error
- func (n *VirtualNetwork) CompareWithID() *string
- func (n *VirtualNetwork) Find(c *fi.Context) (*VirtualNetwork, error)
- func (o *VirtualNetwork) GetLifecycle() *fi.Lifecycle
- func (o *VirtualNetwork) GetName() *string
- func (*VirtualNetwork) RenderAzure(t *azure.AzureAPITarget, a, e, changes *VirtualNetwork) error
- func (n *VirtualNetwork) Run(c *fi.Context) error
- func (o *VirtualNetwork) SetLifecycle(lifecycle fi.Lifecycle)
- func (o *VirtualNetwork) SetName(name string)
- func (o *VirtualNetwork) String() string
- func (o *VirtualNetwork) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Disk ¶
type Disk struct { Name *string Lifecycle *fi.Lifecycle ResourceGroup *ResourceGroup SizeGB *int32 Tags map[string]*string }
Disk is an Azure Managed Disk.
func (*Disk) CheckChanges ¶
CheckChanges returns an error if a change is not allowed.
func (*Disk) CompareWithID ¶
CompareWithID returns the Name of the Disk.
func (*Disk) GetLifecycle ¶
GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle
func (*Disk) RenderAzure ¶
func (*Disk) RenderAzure(t *azure.AzureAPITarget, a, e, changes *Disk) error
RenderAzure creates or updates a Disk.
func (*Disk) SetLifecycle ¶
SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle
func (*Disk) String ¶
String is the stringer function for the task, producing readable output using fi.TaskAsString
func (*Disk) UnmarshalJSON ¶
UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
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 ForAPIServer bool }
LoadBalancer is an Azure Cloud LoadBalancer
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.Context) (*LoadBalancer, error)
Find discovers the LoadBalancer in the cloud provider
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) IsForAPIServer ¶
func (lb *LoadBalancer) IsForAPIServer() bool
IsForAPIServer for api server.
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.Context) 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) SetName ¶
func (o *LoadBalancer) SetName(name string)
SetName sets the Name of the object, implementing fi.SetName
func (*LoadBalancer) String ¶
func (o *LoadBalancer) String() string
String is the stringer function for the task, producing readable output using fi.TaskAsString
func (*LoadBalancer) UnmarshalJSON ¶
func (o *LoadBalancer) UnmarshalJSON(data []byte) error
UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
type MockAzureCloud ¶
type MockAzureCloud struct { Location string ResourceGroupsClient *MockResourceGroupsClient VirtualNetworksClient *MockVirtualNetworksClient SubnetsClient *MockSubnetsClient RouteTablesClient *MockRouteTablesClient VMScaleSetsClient *MockVMScaleSetsClient VMScaleSetVMsClient *MockVMScaleSetVMsClient DisksClient *MockDisksClient RoleAssignmentsClient *MockRoleAssignmentsClient NetworkInterfacesClient *MockNetworkInterfacesClient LoadBalancersClient *MockLoadBalancersClient }
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) DNS ¶
func (c *MockAzureCloud) DNS() (dnsprovider.Interface, error)
DNS returns the DNS provider.
func (*MockAzureCloud) DeleteGroup ¶
func (c *MockAzureCloud) DeleteGroup(g *cloudinstances.CloudInstanceGroup) error
DeleteGroup deletes the group.
func (*MockAzureCloud) DeleteInstance ¶
func (c *MockAzureCloud) DeleteInstance(i *cloudinstances.CloudInstance) error
DeleteInstance deletes the instance.
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) FindVPCInfo ¶
func (c *MockAzureCloud) FindVPCInfo(id string) (*fi.VPCInfo, error)
FindVPCInfo returns the VPCInfo.
func (*MockAzureCloud) GetApiIngressStatus ¶
func (c *MockAzureCloud) GetApiIngressStatus(cluster *kops.Cluster) ([]kops.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) NetworkInterface ¶
func (c *MockAzureCloud) NetworkInterface() azure.NetworkInterfacesClient
NetworkInterface returns the network interface client.
func (*MockAzureCloud) ProviderID ¶
func (c *MockAzureCloud) ProviderID() kops.CloudProviderID
ProviderID returns the provider ID.
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 ¶
MockDisksClient is a mock implementation of disk client.
func (*MockDisksClient) CreateOrUpdate ¶
func (c *MockDisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName, diskName string, parameters compute.Disk) error
CreateOrUpdate creates or updates a disk.
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) 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) List ¶
func (c *MockLoadBalancersClient) List(ctx context.Context, resourceGroupName string) ([]network.LoadBalancer, error)
List returns a slice of loadbalancer.
type MockNetworkInterfacesClient ¶
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 MockResourceGroupsClient ¶
MockResourceGroupsClient is a mock implementation of resource group client.
func (*MockResourceGroupsClient) CreateOrUpdate ¶
func (c *MockResourceGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, parameters resources.Group) error
CreateOrUpdate creates or updates a resource group.
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 ¶
func (c *MockRoleAssignmentsClient) List(ctx context.Context, resourceGroupName string) ([]authz.RoleAssignment, error)
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) 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 MockSubnetsClient ¶
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) error
CreateOrUpdate creates or updates a subnet.
type MockVMScaleSetVMsClient ¶
type MockVMScaleSetVMsClient struct {
VMs map[string]compute.VirtualMachineScaleSetVM
}
MockVMScaleSetVMsClient is a mock implementation of VM Scale Set VM client.
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) 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) 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 ResourceGroup ¶
type ResourceGroup struct { Name *string Lifecycle *fi.Lifecycle Tags map[string]*string // owned by kops. The resource group will not be deleted when // a cluster is destroyed. Shared *bool }
ResourceGroup is an Azure resource group.
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 ¶
func (r *ResourceGroup) Find(c *fi.Context) (*ResourceGroup, error)
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) 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.Context) 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) SetName ¶
func (o *ResourceGroup) SetName(name string)
SetName sets the Name of the object, implementing fi.SetName
func (*ResourceGroup) String ¶
func (o *ResourceGroup) String() string
String is the stringer function for the task, producing readable output using fi.TaskAsString
func (*ResourceGroup) UnmarshalJSON ¶
func (o *ResourceGroup) UnmarshalJSON(data []byte) error
UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
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 ResourceGroup *ResourceGroup VMScaleSet *VMScaleSet ID *string RoleDefID *string }
RoleAssignment is an Azure Role Assignment.
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 ¶
func (r *RoleAssignment) Find(c *fi.Context) (*RoleAssignment, error)
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 ¶
func (r *RoleAssignment) Run(c *fi.Context) error
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) SetName ¶
func (o *RoleAssignment) SetName(name string)
SetName sets the Name of the object, implementing fi.SetName
func (*RoleAssignment) String ¶
func (o *RoleAssignment) String() string
String is the stringer function for the task, producing readable output using fi.TaskAsString
func (*RoleAssignment) UnmarshalJSON ¶
func (o *RoleAssignment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
type RouteTable ¶
type RouteTable struct { Name *string Lifecycle *fi.Lifecycle ResourceGroup *ResourceGroup Tags map[string]*string }
RouteTable is an Azure Route Table.
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.Context) (*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) RenderAzure ¶
func (*RouteTable) RenderAzure(t *azure.AzureAPITarget, a, e, changes *RouteTable) error
RenderAzure creates or updates a Route Table.
func (*RouteTable) SetLifecycle ¶
func (o *RouteTable) SetLifecycle(lifecycle fi.Lifecycle)
SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle
func (*RouteTable) SetName ¶
func (o *RouteTable) SetName(name string)
SetName sets the Name of the object, implementing fi.SetName
func (*RouteTable) String ¶
func (o *RouteTable) String() string
String is the stringer function for the task, producing readable output using fi.TaskAsString
func (*RouteTable) UnmarshalJSON ¶
func (o *RouteTable) UnmarshalJSON(data []byte) error
UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
type Subnet ¶
type Subnet struct { Name *string Lifecycle *fi.Lifecycle ResourceGroup *ResourceGroup VirtualNetwork *VirtualNetwork CIDR *string }
Subnet is an Azure subnet.
func (*Subnet) CheckChanges ¶
CheckChanges returns an error if a change is not allowed.
func (*Subnet) CompareWithID ¶
CompareWithID returns the Name of the VM Scale Set.
func (*Subnet) GetLifecycle ¶
GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle
func (*Subnet) RenderAzure ¶
func (*Subnet) RenderAzure(t *azure.AzureAPITarget, a, e, changes *Subnet) error
RenderAzure creates or updates a subnet.
func (*Subnet) SetLifecycle ¶
SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle
func (*Subnet) String ¶
String is the stringer function for the task, producing readable output using fi.TaskAsString
func (*Subnet) UnmarshalJSON ¶
UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
type SubnetID ¶
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 ¶
ParseSubnetID parses a given subnet ID string and returns a SubnetID.
type VMScaleSet ¶
type VMScaleSet struct { Name *string Lifecycle *fi.Lifecycle ResourceGroup *ResourceGroup VirtualNetwork *VirtualNetwork Subnet *Subnet 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 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 // CustomData is the user data configuration CustomData fi.Resource Tags map[string]*string PrincipalID *string }
VMScaleSet is an Azure VM Scale Set.
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.Context) (*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) RenderAzure ¶
func (s *VMScaleSet) RenderAzure(t *azure.AzureAPITarget, a, e, changes *VMScaleSet) error
RenderAzure creates or updates a VM Scale Set.
func (*VMScaleSet) SetLifecycle ¶
func (o *VMScaleSet) SetLifecycle(lifecycle fi.Lifecycle)
SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle
func (*VMScaleSet) SetName ¶
func (o *VMScaleSet) SetName(name string)
SetName sets the Name of the object, implementing fi.SetName
func (*VMScaleSet) String ¶
func (o *VMScaleSet) String() string
String is the stringer function for the task, producing readable output using fi.TaskAsString
func (*VMScaleSet) UnmarshalJSON ¶
func (o *VMScaleSet) UnmarshalJSON(data []byte) error
UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
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 ¶
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 }
VirtualNetwork is an Azure Virtual Network.
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 ¶
func (n *VirtualNetwork) Find(c *fi.Context) (*VirtualNetwork, error)
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) RenderAzure ¶
func (*VirtualNetwork) RenderAzure(t *azure.AzureAPITarget, a, e, changes *VirtualNetwork) error
RenderAzure creates or updates a Virtual Network.
func (*VirtualNetwork) Run ¶
func (n *VirtualNetwork) Run(c *fi.Context) error
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) SetName ¶
func (o *VirtualNetwork) SetName(name string)
SetName sets the Name of the object, implementing fi.SetName
func (*VirtualNetwork) String ¶
func (o *VirtualNetwork) String() string
String is the stringer function for the task, producing readable output using fi.TaskAsString
func (*VirtualNetwork) UnmarshalJSON ¶
func (o *VirtualNetwork) UnmarshalJSON(data []byte) error
UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string