Documentation ¶
Overview ¶
Package provider is a generated GoMock package.
Package provider is a generated GoMock package.
Package provider is an implementation of CloudProvider Interface, LoadBalancer and Instances for Azure.
Index ¶
- Constants
- Variables
- func ConvertResourceGroupNameToLower(resourceID string) (string, error)
- func FilterNonExistingDisks(ctx context.Context, clientFactory azclient.ClientFactory, ...) []*armcompute.DataDisk
- func IntInSlice(i int, list []int) bool
- func MakeCRC32(str string) string
- func MapRouteNameToNodeName(ipv6DualStackEnabled bool, routeName string) types.NodeName
- func NewCloud(ctx context.Context, clientBuilder cloudprovider.ControllerClientBuilder, ...) (cloudprovider.Interface, error)
- func NewCloudFromConfigFile(ctx context.Context, clientBuilder cloudprovider.ControllerClientBuilder, ...) (cloudprovider.Interface, error)
- func NewCloudFromSecret(ctx context.Context, clientBuilder cloudprovider.ControllerClientBuilder, ...) (cloudprovider.Interface, error)
- func StringInSlice(s string, list []string) bool
- type AttachDiskOptions
- type AvailabilitySetEntry
- type AzureResourceLocker
- type BackendPool
- type Cloud
- func (az *Cloud) AddSSHKeyToAllInstances(_ context.Context, _ string, _ []byte) error
- func (az *Cloud) Clusters() (cloudprovider.Clusters, bool)
- func (az *Cloud) CreateOrUpdateInterface(ctx context.Context, service *v1.Service, nic *armnetwork.Interface) error
- func (az *Cloud) CreateOrUpdateLB(ctx context.Context, service *v1.Service, lb armnetwork.LoadBalancer) error
- func (az *Cloud) CreateOrUpdateLBBackendPool(ctx context.Context, lbName string, backendPool *armnetwork.BackendAddressPool) error
- func (az *Cloud) CreateOrUpdatePIP(service *v1.Service, pipResourceGroup string, pip *armnetwork.PublicIPAddress) error
- func (az *Cloud) CreateOrUpdateVMSS(resourceGroupName string, VMScaleSetName string, ...) error
- func (az *Cloud) CreateRoute(ctx context.Context, clusterName string, _ string, ...) error
- func (az *Cloud) CurrentNodeName(_ context.Context, hostname string) (types.NodeName, error)
- func (az *Cloud) DeleteLB(ctx context.Context, service *v1.Service, lbName string) error
- func (az *Cloud) DeleteLBBackendPool(ctx context.Context, lbName, backendPoolName string) error
- func (az *Cloud) DeletePublicIP(service *v1.Service, pipResourceGroup string, pipName string) error
- func (az *Cloud) DeleteRoute(_ context.Context, clusterName string, kubeRoute *cloudprovider.Route) error
- func (az *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (lbStatus *v1.LoadBalancerStatus, err error)
- func (az *Cloud) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) (err error)
- func (az *Cloud) Event(obj runtime.Object, eventType, reason, message string)
- func (az *Cloud) GetActiveZones() (*utilsets.IgnoreCaseSet, error)
- func (az *Cloud) GetIPForMachineWithRetry(ctx context.Context, name types.NodeName) (string, string, error)
- func (az *Cloud) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
- func (az *Cloud) GetLoadBalancerName(_ context.Context, _ string, service *v1.Service) string
- func (az *Cloud) GetLocation() string
- func (az *Cloud) GetNodeNames() (*utilsets.IgnoreCaseSet, error)
- func (az *Cloud) GetNodeResourceGroup(nodeName string) (string, error)
- func (az *Cloud) GetNodeVMSet(ctx context.Context, nodeName types.NodeName, crt azcache.AzureCacheReadType) (VMSet, error)
- func (az *Cloud) GetPlatformSubFaultDomain(ctx context.Context) (string, error)
- func (az *Cloud) GetResourceGroups() (*utilsets.IgnoreCaseSet, error)
- func (az *Cloud) GetUnmanagedNodes() (*utilsets.IgnoreCaseSet, error)
- func (az *Cloud) GetVMNameByIPConfigurationName(ctx context.Context, nicResourceGroup, nicName string) (string, error)
- func (az *Cloud) GetVirtualMachineWithRetry(ctx context.Context, name types.NodeName, crt azcache.AzureCacheReadType) (*armcompute.VirtualMachine, error)
- func (az *Cloud) GetZone(ctx context.Context) (cloudprovider.Zone, error)
- func (az *Cloud) GetZoneByNodeName(ctx context.Context, nodeName types.NodeName) (cloudprovider.Zone, error)
- func (az *Cloud) GetZoneByProviderID(ctx context.Context, providerID string) (cloudprovider.Zone, error)
- func (az *Cloud) GetZoneID(zoneLabel string) string
- func (az *Cloud) HasClusterID() bool
- func (az *Cloud) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, _ <-chan struct{})
- func (az *Cloud) InitializeCloudFromConfig(ctx context.Context, config *config.Config, _, callFromCCM bool) error
- func (az *Cloud) InstanceExists(ctx context.Context, node *v1.Node) (bool, error)
- func (az *Cloud) InstanceExistsByProviderID(ctx context.Context, providerID string) (bool, error)
- func (az *Cloud) InstanceID(ctx context.Context, name types.NodeName) (string, error)
- func (az *Cloud) InstanceMetadata(ctx context.Context, node *v1.Node) (*cloudprovider.InstanceMetadata, error)
- func (az *Cloud) InstanceShutdown(ctx context.Context, node *v1.Node) (bool, error)
- func (az *Cloud) InstanceShutdownByProviderID(ctx context.Context, providerID string) (bool, error)
- func (az *Cloud) InstanceType(ctx context.Context, name types.NodeName) (string, error)
- func (az *Cloud) InstanceTypeByProviderID(ctx context.Context, providerID string) (string, error)
- func (az *Cloud) Instances() (cloudprovider.Instances, bool)
- func (az *Cloud) InstancesV2() (cloudprovider.InstancesV2, bool)
- func (az *Cloud) IsNodeUnmanaged(nodeName string) (bool, error)
- func (az *Cloud) IsNodeUnmanagedByProviderID(providerID string) bool
- func (az *Cloud) ListLB(ctx context.Context, service *v1.Service) ([]*armnetwork.LoadBalancer, error)
- func (az *Cloud) ListManagedLBs(ctx context.Context, service *v1.Service, nodes []*v1.Node, clusterName string) ([]*armnetwork.LoadBalancer, error)
- func (az *Cloud) ListRoutes(ctx context.Context, clusterName string) ([]*cloudprovider.Route, error)
- func (az *Cloud) ListVirtualMachines(ctx context.Context, resourceGroup string) ([]*armcompute.VirtualMachine, error)
- func (az *Cloud) LoadBalancer() (cloudprovider.LoadBalancer, bool)
- func (az *Cloud) MigrateToIPBasedBackendPoolAndWaitForCompletion(ctx context.Context, lbName string, backendPoolNames []string, ...) error
- func (az *Cloud) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error)
- func (az *Cloud) NodeAddressesByProviderID(ctx context.Context, providerID string) ([]v1.NodeAddress, error)
- func (az *Cloud) ProviderName() string
- func (az *Cloud) RequestBackoff() (resourceRequestBackoff wait.Backoff)
- func (az *Cloud) Routes() (cloudprovider.Routes, bool)
- func (az *Cloud) SetInformers(informerFactory informers.SharedInformerFactory)
- func (az *Cloud) ShouldNodeExcludedFromLoadBalancer(nodeName string) (bool, error)
- func (az *Cloud) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error
- func (az *Cloud) Zones() (cloudprovider.Zones, bool)
- type ComputeMetadata
- type ExtendedLocation
- type FlexScaleSet
- func (fs *FlexScaleSet) AttachDisk(ctx context.Context, nodeName types.NodeName, ...) error
- func (fs *FlexScaleSet) DeleteCacheForNode(ctx context.Context, nodeName string) error
- func (fs *FlexScaleSet) DetachDisk(ctx context.Context, nodeName types.NodeName, diskMap map[string]string, ...) error
- func (fs *FlexScaleSet) EnsureBackendPoolDeleted(ctx context.Context, service *v1.Service, backendPoolIDs []string, ...) (bool, error)
- func (fs *FlexScaleSet) EnsureBackendPoolDeletedFromVMSets(ctx context.Context, vmssNamesMap map[string]bool, backendPoolIDs []string) error
- func (fs *FlexScaleSet) EnsureHostInPool(ctx context.Context, service *v1.Service, nodeName types.NodeName, ...) (string, string, string, *armcompute.VirtualMachineScaleSetVM, error)
- func (fs *FlexScaleSet) EnsureHostsInPool(ctx context.Context, service *v1.Service, nodes []*v1.Node, ...) error
- func (fs *FlexScaleSet) GetAgentPoolVMSetNames(ctx context.Context, nodes []*v1.Node) ([]*string, error)
- func (fs *FlexScaleSet) GetDataDisks(ctx context.Context, nodeName types.NodeName, crt azcache.AzureCacheReadType) ([]*armcompute.DataDisk, *string, error)
- func (fs *FlexScaleSet) GetIPByNodeName(ctx context.Context, name string) (string, string, error)
- func (fs *FlexScaleSet) GetInstanceIDByNodeName(ctx context.Context, name string) (string, error)
- func (fs *FlexScaleSet) GetInstanceTypeByNodeName(ctx context.Context, name string) (string, error)
- func (fs *FlexScaleSet) GetNodeCIDRMasksByProviderID(ctx context.Context, providerID string) (int, int, error)
- func (fs *FlexScaleSet) GetNodeNameByIPConfigurationID(ctx context.Context, ipConfigurationID string) (string, string, error)
- func (fs *FlexScaleSet) GetNodeNameByProviderID(ctx context.Context, providerID string) (types.NodeName, error)
- func (fs *FlexScaleSet) GetNodeVMSetName(ctx context.Context, node *v1.Node) (string, error)
- func (fs *FlexScaleSet) GetPowerStatusByNodeName(ctx context.Context, name string) (powerState string, err error)
- func (fs *FlexScaleSet) GetPrimaryInterface(ctx context.Context, nodeName string) (*armnetwork.Interface, error)
- func (fs *FlexScaleSet) GetPrimaryVMSetName() string
- func (fs *FlexScaleSet) GetPrivateIPsByNodeName(ctx context.Context, name string) ([]string, error)
- func (fs *FlexScaleSet) GetProvisioningStateByNodeName(ctx context.Context, name string) (provisioningState string, err error)
- func (fs *FlexScaleSet) GetVMSetNames(ctx context.Context, service *v1.Service, nodes []*v1.Node) ([]*string, error)
- func (fs *FlexScaleSet) GetZoneByNodeName(ctx context.Context, name string) (cloudprovider.Zone, error)
- func (fs *FlexScaleSet) RefreshCaches() error
- func (fs *FlexScaleSet) UpdateVM(ctx context.Context, nodeName types.NodeName) error
- type IPAddress
- type InstanceMetadata
- type InstanceMetadataService
- type LoadBalancerMetadata
- type LoadbalancerProfile
- type MockBackendPool
- func (m *MockBackendPool) CleanupVMSetFromBackendPoolByCondition(ctx context.Context, slb *armnetwork.LoadBalancer, service *v1.Service, ...) (*armnetwork.LoadBalancer, error)
- func (m *MockBackendPool) EXPECT() *MockBackendPoolMockRecorder
- func (m *MockBackendPool) EnsureHostsInPool(ctx context.Context, service *v1.Service, nodes []*v1.Node, ...) error
- func (m *MockBackendPool) GetBackendPrivateIPs(ctx context.Context, clusterName string, service *v1.Service, ...) ([]string, []string)
- func (m *MockBackendPool) ReconcileBackendPools(ctx context.Context, clusterName string, service *v1.Service, ...) (bool, bool, *armnetwork.LoadBalancer, error)
- type MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall
- func (c *MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall) Do(...) *MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall
- func (c *MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall) DoAndReturn(...) *MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall
- func (c *MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall) Return(arg0 *armnetwork.LoadBalancer, arg1 error) *MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall
- type MockBackendPoolEnsureHostsInPoolCall
- type MockBackendPoolGetBackendPrivateIPsCall
- func (c *MockBackendPoolGetBackendPrivateIPsCall) Do(...) *MockBackendPoolGetBackendPrivateIPsCall
- func (c *MockBackendPoolGetBackendPrivateIPsCall) DoAndReturn(...) *MockBackendPoolGetBackendPrivateIPsCall
- func (c *MockBackendPoolGetBackendPrivateIPsCall) Return(arg0, arg1 []string) *MockBackendPoolGetBackendPrivateIPsCall
- type MockBackendPoolMockRecorder
- func (mr *MockBackendPoolMockRecorder) CleanupVMSetFromBackendPoolByCondition(ctx, slb, service, nodes, clusterName, shouldRemoveVMSetFromSLB any) *MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall
- func (mr *MockBackendPoolMockRecorder) EnsureHostsInPool(ctx, service, nodes, backendPoolID, vmSetName, clusterName, lbName, ... any) *MockBackendPoolEnsureHostsInPoolCall
- func (mr *MockBackendPoolMockRecorder) GetBackendPrivateIPs(ctx, clusterName, service, lb any) *MockBackendPoolGetBackendPrivateIPsCall
- func (mr *MockBackendPoolMockRecorder) ReconcileBackendPools(ctx, clusterName, service, lb any) *MockBackendPoolReconcileBackendPoolsCall
- type MockBackendPoolReconcileBackendPoolsCall
- func (c *MockBackendPoolReconcileBackendPoolsCall) Do(...) *MockBackendPoolReconcileBackendPoolsCall
- func (c *MockBackendPoolReconcileBackendPoolsCall) DoAndReturn(...) *MockBackendPoolReconcileBackendPoolsCall
- func (c *MockBackendPoolReconcileBackendPoolsCall) Return(arg0, arg1 bool, arg2 *armnetwork.LoadBalancer, arg3 error) *MockBackendPoolReconcileBackendPoolsCall
- type MockVMSet
- func (m *MockVMSet) AttachDisk(ctx context.Context, nodeName types.NodeName, ...) error
- func (m *MockVMSet) DeleteCacheForNode(ctx context.Context, nodeName string) error
- func (m *MockVMSet) DetachDisk(ctx context.Context, nodeName types.NodeName, diskMap map[string]string, ...) error
- func (m *MockVMSet) EXPECT() *MockVMSetMockRecorder
- func (m *MockVMSet) EnsureBackendPoolDeleted(ctx context.Context, service *v1.Service, backendPoolIDs []string, ...) (bool, error)
- func (m *MockVMSet) EnsureBackendPoolDeletedFromVMSets(ctx context.Context, vmSetNamesMap map[string]bool, backendPoolIDs []string) error
- func (m *MockVMSet) EnsureHostInPool(ctx context.Context, service *v1.Service, nodeName types.NodeName, ...) (string, string, string, *v6.VirtualMachineScaleSetVM, error)
- func (m *MockVMSet) EnsureHostsInPool(ctx context.Context, service *v1.Service, nodes []*v1.Node, ...) error
- func (m *MockVMSet) GetAgentPoolVMSetNames(ctx context.Context, nodes []*v1.Node) ([]*string, error)
- func (m *MockVMSet) GetDataDisks(ctx context.Context, nodeName types.NodeName, crt cache.AzureCacheReadType) ([]*v6.DataDisk, *string, error)
- func (m *MockVMSet) GetIPByNodeName(ctx context.Context, name string) (string, string, error)
- func (m *MockVMSet) GetInstanceIDByNodeName(ctx context.Context, name string) (string, error)
- func (m *MockVMSet) GetInstanceTypeByNodeName(ctx context.Context, name string) (string, error)
- func (m *MockVMSet) GetNodeCIDRMasksByProviderID(ctx context.Context, providerID string) (int, int, error)
- func (m *MockVMSet) GetNodeNameByIPConfigurationID(ctx context.Context, ipConfigurationID string) (string, string, error)
- func (m *MockVMSet) GetNodeNameByProviderID(ctx context.Context, providerID string) (types.NodeName, error)
- func (m *MockVMSet) GetNodeVMSetName(ctx context.Context, node *v1.Node) (string, error)
- func (m *MockVMSet) GetPowerStatusByNodeName(ctx context.Context, name string) (string, error)
- func (m *MockVMSet) GetPrimaryInterface(ctx context.Context, nodeName string) (*v60.Interface, error)
- func (m *MockVMSet) GetPrimaryVMSetName() string
- func (m *MockVMSet) GetPrivateIPsByNodeName(ctx context.Context, name string) ([]string, error)
- func (m *MockVMSet) GetProvisioningStateByNodeName(ctx context.Context, name string) (string, error)
- func (m *MockVMSet) GetVMSetNames(ctx context.Context, service *v1.Service, nodes []*v1.Node) ([]*string, error)
- func (m *MockVMSet) GetZoneByNodeName(ctx context.Context, name string) (cloud_provider.Zone, error)
- func (m *MockVMSet) RefreshCaches() error
- func (m *MockVMSet) UpdateVM(ctx context.Context, nodeName types.NodeName) error
- type MockVMSetAttachDiskCall
- func (c *MockVMSetAttachDiskCall) Do(f func(context.Context, types.NodeName, map[string]*AttachDiskOptions) error) *MockVMSetAttachDiskCall
- func (c *MockVMSetAttachDiskCall) DoAndReturn(f func(context.Context, types.NodeName, map[string]*AttachDiskOptions) error) *MockVMSetAttachDiskCall
- func (c *MockVMSetAttachDiskCall) Return(arg0 error) *MockVMSetAttachDiskCall
- type MockVMSetDeleteCacheForNodeCall
- func (c *MockVMSetDeleteCacheForNodeCall) Do(f func(context.Context, string) error) *MockVMSetDeleteCacheForNodeCall
- func (c *MockVMSetDeleteCacheForNodeCall) DoAndReturn(f func(context.Context, string) error) *MockVMSetDeleteCacheForNodeCall
- func (c *MockVMSetDeleteCacheForNodeCall) Return(arg0 error) *MockVMSetDeleteCacheForNodeCall
- type MockVMSetDetachDiskCall
- func (c *MockVMSetDetachDiskCall) Do(f func(context.Context, types.NodeName, map[string]string, bool) error) *MockVMSetDetachDiskCall
- func (c *MockVMSetDetachDiskCall) DoAndReturn(f func(context.Context, types.NodeName, map[string]string, bool) error) *MockVMSetDetachDiskCall
- func (c *MockVMSetDetachDiskCall) Return(arg0 error) *MockVMSetDetachDiskCall
- type MockVMSetEnsureBackendPoolDeletedCall
- func (c *MockVMSetEnsureBackendPoolDeletedCall) Do(...) *MockVMSetEnsureBackendPoolDeletedCall
- func (c *MockVMSetEnsureBackendPoolDeletedCall) DoAndReturn(...) *MockVMSetEnsureBackendPoolDeletedCall
- func (c *MockVMSetEnsureBackendPoolDeletedCall) Return(arg0 bool, arg1 error) *MockVMSetEnsureBackendPoolDeletedCall
- type MockVMSetEnsureBackendPoolDeletedFromVMSetsCall
- func (c *MockVMSetEnsureBackendPoolDeletedFromVMSetsCall) Do(f func(context.Context, map[string]bool, []string) error) *MockVMSetEnsureBackendPoolDeletedFromVMSetsCall
- func (c *MockVMSetEnsureBackendPoolDeletedFromVMSetsCall) DoAndReturn(f func(context.Context, map[string]bool, []string) error) *MockVMSetEnsureBackendPoolDeletedFromVMSetsCall
- func (c *MockVMSetEnsureBackendPoolDeletedFromVMSetsCall) Return(arg0 error) *MockVMSetEnsureBackendPoolDeletedFromVMSetsCall
- type MockVMSetEnsureHostInPoolCall
- func (c *MockVMSetEnsureHostInPoolCall) Do(...) *MockVMSetEnsureHostInPoolCall
- func (c *MockVMSetEnsureHostInPoolCall) DoAndReturn(...) *MockVMSetEnsureHostInPoolCall
- func (c *MockVMSetEnsureHostInPoolCall) Return(arg0, arg1, arg2 string, arg3 *v6.VirtualMachineScaleSetVM, arg4 error) *MockVMSetEnsureHostInPoolCall
- type MockVMSetEnsureHostsInPoolCall
- func (c *MockVMSetEnsureHostsInPoolCall) Do(f func(context.Context, *v1.Service, []*v1.Node, string, string) error) *MockVMSetEnsureHostsInPoolCall
- func (c *MockVMSetEnsureHostsInPoolCall) DoAndReturn(f func(context.Context, *v1.Service, []*v1.Node, string, string) error) *MockVMSetEnsureHostsInPoolCall
- func (c *MockVMSetEnsureHostsInPoolCall) Return(arg0 error) *MockVMSetEnsureHostsInPoolCall
- type MockVMSetGetAgentPoolVMSetNamesCall
- func (c *MockVMSetGetAgentPoolVMSetNamesCall) Do(f func(context.Context, []*v1.Node) ([]*string, error)) *MockVMSetGetAgentPoolVMSetNamesCall
- func (c *MockVMSetGetAgentPoolVMSetNamesCall) DoAndReturn(f func(context.Context, []*v1.Node) ([]*string, error)) *MockVMSetGetAgentPoolVMSetNamesCall
- func (c *MockVMSetGetAgentPoolVMSetNamesCall) Return(arg0 []*string, arg1 error) *MockVMSetGetAgentPoolVMSetNamesCall
- type MockVMSetGetDataDisksCall
- type MockVMSetGetIPByNodeNameCall
- func (c *MockVMSetGetIPByNodeNameCall) Do(f func(context.Context, string) (string, string, error)) *MockVMSetGetIPByNodeNameCall
- func (c *MockVMSetGetIPByNodeNameCall) DoAndReturn(f func(context.Context, string) (string, string, error)) *MockVMSetGetIPByNodeNameCall
- func (c *MockVMSetGetIPByNodeNameCall) Return(arg0, arg1 string, arg2 error) *MockVMSetGetIPByNodeNameCall
- type MockVMSetGetInstanceIDByNodeNameCall
- func (c *MockVMSetGetInstanceIDByNodeNameCall) Do(f func(context.Context, string) (string, error)) *MockVMSetGetInstanceIDByNodeNameCall
- func (c *MockVMSetGetInstanceIDByNodeNameCall) DoAndReturn(f func(context.Context, string) (string, error)) *MockVMSetGetInstanceIDByNodeNameCall
- func (c *MockVMSetGetInstanceIDByNodeNameCall) Return(arg0 string, arg1 error) *MockVMSetGetInstanceIDByNodeNameCall
- type MockVMSetGetInstanceTypeByNodeNameCall
- func (c *MockVMSetGetInstanceTypeByNodeNameCall) Do(f func(context.Context, string) (string, error)) *MockVMSetGetInstanceTypeByNodeNameCall
- func (c *MockVMSetGetInstanceTypeByNodeNameCall) DoAndReturn(f func(context.Context, string) (string, error)) *MockVMSetGetInstanceTypeByNodeNameCall
- func (c *MockVMSetGetInstanceTypeByNodeNameCall) Return(arg0 string, arg1 error) *MockVMSetGetInstanceTypeByNodeNameCall
- type MockVMSetGetNodeCIDRMasksByProviderIDCall
- func (c *MockVMSetGetNodeCIDRMasksByProviderIDCall) Do(f func(context.Context, string) (int, int, error)) *MockVMSetGetNodeCIDRMasksByProviderIDCall
- func (c *MockVMSetGetNodeCIDRMasksByProviderIDCall) DoAndReturn(f func(context.Context, string) (int, int, error)) *MockVMSetGetNodeCIDRMasksByProviderIDCall
- func (c *MockVMSetGetNodeCIDRMasksByProviderIDCall) Return(arg0, arg1 int, arg2 error) *MockVMSetGetNodeCIDRMasksByProviderIDCall
- type MockVMSetGetNodeNameByIPConfigurationIDCall
- func (c *MockVMSetGetNodeNameByIPConfigurationIDCall) Do(f func(context.Context, string) (string, string, error)) *MockVMSetGetNodeNameByIPConfigurationIDCall
- func (c *MockVMSetGetNodeNameByIPConfigurationIDCall) DoAndReturn(f func(context.Context, string) (string, string, error)) *MockVMSetGetNodeNameByIPConfigurationIDCall
- func (c *MockVMSetGetNodeNameByIPConfigurationIDCall) Return(arg0, arg1 string, arg2 error) *MockVMSetGetNodeNameByIPConfigurationIDCall
- type MockVMSetGetNodeNameByProviderIDCall
- func (c *MockVMSetGetNodeNameByProviderIDCall) Do(f func(context.Context, string) (types.NodeName, error)) *MockVMSetGetNodeNameByProviderIDCall
- func (c *MockVMSetGetNodeNameByProviderIDCall) DoAndReturn(f func(context.Context, string) (types.NodeName, error)) *MockVMSetGetNodeNameByProviderIDCall
- func (c *MockVMSetGetNodeNameByProviderIDCall) Return(arg0 types.NodeName, arg1 error) *MockVMSetGetNodeNameByProviderIDCall
- type MockVMSetGetNodeVMSetNameCall
- func (c *MockVMSetGetNodeVMSetNameCall) Do(f func(context.Context, *v1.Node) (string, error)) *MockVMSetGetNodeVMSetNameCall
- func (c *MockVMSetGetNodeVMSetNameCall) DoAndReturn(f func(context.Context, *v1.Node) (string, error)) *MockVMSetGetNodeVMSetNameCall
- func (c *MockVMSetGetNodeVMSetNameCall) Return(arg0 string, arg1 error) *MockVMSetGetNodeVMSetNameCall
- type MockVMSetGetPowerStatusByNodeNameCall
- func (c *MockVMSetGetPowerStatusByNodeNameCall) Do(f func(context.Context, string) (string, error)) *MockVMSetGetPowerStatusByNodeNameCall
- func (c *MockVMSetGetPowerStatusByNodeNameCall) DoAndReturn(f func(context.Context, string) (string, error)) *MockVMSetGetPowerStatusByNodeNameCall
- func (c *MockVMSetGetPowerStatusByNodeNameCall) Return(arg0 string, arg1 error) *MockVMSetGetPowerStatusByNodeNameCall
- type MockVMSetGetPrimaryInterfaceCall
- func (c *MockVMSetGetPrimaryInterfaceCall) Do(f func(context.Context, string) (*v60.Interface, error)) *MockVMSetGetPrimaryInterfaceCall
- func (c *MockVMSetGetPrimaryInterfaceCall) DoAndReturn(f func(context.Context, string) (*v60.Interface, error)) *MockVMSetGetPrimaryInterfaceCall
- func (c *MockVMSetGetPrimaryInterfaceCall) Return(arg0 *v60.Interface, arg1 error) *MockVMSetGetPrimaryInterfaceCall
- type MockVMSetGetPrimaryVMSetNameCall
- type MockVMSetGetPrivateIPsByNodeNameCall
- func (c *MockVMSetGetPrivateIPsByNodeNameCall) Do(f func(context.Context, string) ([]string, error)) *MockVMSetGetPrivateIPsByNodeNameCall
- func (c *MockVMSetGetPrivateIPsByNodeNameCall) DoAndReturn(f func(context.Context, string) ([]string, error)) *MockVMSetGetPrivateIPsByNodeNameCall
- func (c *MockVMSetGetPrivateIPsByNodeNameCall) Return(arg0 []string, arg1 error) *MockVMSetGetPrivateIPsByNodeNameCall
- type MockVMSetGetProvisioningStateByNodeNameCall
- func (c *MockVMSetGetProvisioningStateByNodeNameCall) Do(f func(context.Context, string) (string, error)) *MockVMSetGetProvisioningStateByNodeNameCall
- func (c *MockVMSetGetProvisioningStateByNodeNameCall) DoAndReturn(f func(context.Context, string) (string, error)) *MockVMSetGetProvisioningStateByNodeNameCall
- func (c *MockVMSetGetProvisioningStateByNodeNameCall) Return(arg0 string, arg1 error) *MockVMSetGetProvisioningStateByNodeNameCall
- type MockVMSetGetVMSetNamesCall
- func (c *MockVMSetGetVMSetNamesCall) Do(f func(context.Context, *v1.Service, []*v1.Node) ([]*string, error)) *MockVMSetGetVMSetNamesCall
- func (c *MockVMSetGetVMSetNamesCall) DoAndReturn(f func(context.Context, *v1.Service, []*v1.Node) ([]*string, error)) *MockVMSetGetVMSetNamesCall
- func (c *MockVMSetGetVMSetNamesCall) Return(availabilitySetNames []*string, err error) *MockVMSetGetVMSetNamesCall
- type MockVMSetGetZoneByNodeNameCall
- func (c *MockVMSetGetZoneByNodeNameCall) Do(f func(context.Context, string) (cloud_provider.Zone, error)) *MockVMSetGetZoneByNodeNameCall
- func (c *MockVMSetGetZoneByNodeNameCall) DoAndReturn(f func(context.Context, string) (cloud_provider.Zone, error)) *MockVMSetGetZoneByNodeNameCall
- func (c *MockVMSetGetZoneByNodeNameCall) Return(arg0 cloud_provider.Zone, arg1 error) *MockVMSetGetZoneByNodeNameCall
- type MockVMSetMockRecorder
- func (mr *MockVMSetMockRecorder) AttachDisk(ctx, nodeName, diskMap any) *MockVMSetAttachDiskCall
- func (mr *MockVMSetMockRecorder) DeleteCacheForNode(ctx, nodeName any) *MockVMSetDeleteCacheForNodeCall
- func (mr *MockVMSetMockRecorder) DetachDisk(ctx, nodeName, diskMap, forceDetach any) *MockVMSetDetachDiskCall
- func (mr *MockVMSetMockRecorder) EnsureBackendPoolDeleted(...) *MockVMSetEnsureBackendPoolDeletedCall
- func (mr *MockVMSetMockRecorder) EnsureBackendPoolDeletedFromVMSets(ctx, vmSetNamesMap, backendPoolIDs any) *MockVMSetEnsureBackendPoolDeletedFromVMSetsCall
- func (mr *MockVMSetMockRecorder) EnsureHostInPool(ctx, service, nodeName, backendPoolID, vmSetName any) *MockVMSetEnsureHostInPoolCall
- func (mr *MockVMSetMockRecorder) EnsureHostsInPool(ctx, service, nodes, backendPoolID, vmSetName any) *MockVMSetEnsureHostsInPoolCall
- func (mr *MockVMSetMockRecorder) GetAgentPoolVMSetNames(ctx, nodes any) *MockVMSetGetAgentPoolVMSetNamesCall
- func (mr *MockVMSetMockRecorder) GetDataDisks(ctx, nodeName, crt any) *MockVMSetGetDataDisksCall
- func (mr *MockVMSetMockRecorder) GetIPByNodeName(ctx, name any) *MockVMSetGetIPByNodeNameCall
- func (mr *MockVMSetMockRecorder) GetInstanceIDByNodeName(ctx, name any) *MockVMSetGetInstanceIDByNodeNameCall
- func (mr *MockVMSetMockRecorder) GetInstanceTypeByNodeName(ctx, name any) *MockVMSetGetInstanceTypeByNodeNameCall
- func (mr *MockVMSetMockRecorder) GetNodeCIDRMasksByProviderID(ctx, providerID any) *MockVMSetGetNodeCIDRMasksByProviderIDCall
- func (mr *MockVMSetMockRecorder) GetNodeNameByIPConfigurationID(ctx, ipConfigurationID any) *MockVMSetGetNodeNameByIPConfigurationIDCall
- func (mr *MockVMSetMockRecorder) GetNodeNameByProviderID(ctx, providerID any) *MockVMSetGetNodeNameByProviderIDCall
- func (mr *MockVMSetMockRecorder) GetNodeVMSetName(ctx, node any) *MockVMSetGetNodeVMSetNameCall
- func (mr *MockVMSetMockRecorder) GetPowerStatusByNodeName(ctx, name any) *MockVMSetGetPowerStatusByNodeNameCall
- func (mr *MockVMSetMockRecorder) GetPrimaryInterface(ctx, nodeName any) *MockVMSetGetPrimaryInterfaceCall
- func (mr *MockVMSetMockRecorder) GetPrimaryVMSetName() *MockVMSetGetPrimaryVMSetNameCall
- func (mr *MockVMSetMockRecorder) GetPrivateIPsByNodeName(ctx, name any) *MockVMSetGetPrivateIPsByNodeNameCall
- func (mr *MockVMSetMockRecorder) GetProvisioningStateByNodeName(ctx, name any) *MockVMSetGetProvisioningStateByNodeNameCall
- func (mr *MockVMSetMockRecorder) GetVMSetNames(ctx, service, nodes any) *MockVMSetGetVMSetNamesCall
- func (mr *MockVMSetMockRecorder) GetZoneByNodeName(ctx, name any) *MockVMSetGetZoneByNodeNameCall
- func (mr *MockVMSetMockRecorder) RefreshCaches() *MockVMSetRefreshCachesCall
- func (mr *MockVMSetMockRecorder) UpdateVM(ctx, nodeName any) *MockVMSetUpdateVMCall
- type MockVMSetRefreshCachesCall
- type MockVMSetUpdateVMCall
- type NetworkData
- type NetworkInterface
- type NetworkMetadata
- type NonVmssUniformNodesEntry
- type PublicIPMetadata
- type ScaleSet
- func (ss *ScaleSet) AttachDisk(ctx context.Context, nodeName types.NodeName, ...) error
- func (ss *ScaleSet) DeleteCacheForNode(ctx context.Context, nodeName string) error
- func (ss *ScaleSet) DetachDisk(ctx context.Context, nodeName types.NodeName, diskMap map[string]string, ...) error
- func (ss *ScaleSet) EnsureBackendPoolDeleted(ctx context.Context, service *v1.Service, backendPoolIDs []string, ...) (bool, error)
- func (ss *ScaleSet) EnsureBackendPoolDeletedFromVMSets(ctx context.Context, vmssNamesMap map[string]bool, backendPoolIDs []string) error
- func (ss *ScaleSet) EnsureHostInPool(ctx context.Context, _ *v1.Service, nodeName types.NodeName, ...) (string, string, string, *armcompute.VirtualMachineScaleSetVM, error)
- func (ss *ScaleSet) EnsureHostsInPool(ctx context.Context, service *v1.Service, nodes []*v1.Node, ...) error
- func (ss *ScaleSet) GetAgentPoolVMSetNames(ctx context.Context, nodes []*v1.Node) ([]*string, error)
- func (ss *ScaleSet) GetDataDisks(ctx context.Context, nodeName types.NodeName, crt azcache.AzureCacheReadType) ([]*armcompute.DataDisk, *string, error)
- func (ss *ScaleSet) GetIPByNodeName(ctx context.Context, nodeName string) (string, string, error)
- func (ss *ScaleSet) GetInstanceIDByNodeName(ctx context.Context, name string) (string, error)
- func (ss *ScaleSet) GetInstanceTypeByNodeName(ctx context.Context, name string) (string, error)
- func (ss *ScaleSet) GetNodeCIDRMasksByProviderID(ctx context.Context, providerID string) (int, int, error)
- func (ss *ScaleSet) GetNodeNameByIPConfigurationID(ctx context.Context, ipConfigurationID string) (string, string, error)
- func (ss *ScaleSet) GetNodeNameByProviderID(ctx context.Context, providerID string) (types.NodeName, error)
- func (ss *ScaleSet) GetNodeVMSetName(ctx context.Context, node *v1.Node) (string, error)
- func (ss *ScaleSet) GetPowerStatusByNodeName(ctx context.Context, name string) (powerState string, err error)
- func (ss *ScaleSet) GetPrimaryInterface(ctx context.Context, nodeName string) (*armnetwork.Interface, error)
- func (ss *ScaleSet) GetPrimaryVMSetName() string
- func (ss *ScaleSet) GetPrivateIPsByNodeName(ctx context.Context, nodeName string) ([]string, error)
- func (ss *ScaleSet) GetProvisioningStateByNodeName(ctx context.Context, name string) (provisioningState string, err error)
- func (ss *ScaleSet) GetVMSetNames(ctx context.Context, service *v1.Service, nodes []*v1.Node) ([]*string, error)
- func (ss *ScaleSet) GetZoneByNodeName(ctx context.Context, name string) (cloudprovider.Zone, error)
- func (ss *ScaleSet) RefreshCaches() error
- func (ss *ScaleSet) UpdateVM(ctx context.Context, nodeName types.NodeName) error
- func (ss *ScaleSet) VMSSBatchSize(ctx context.Context, vmssName string) (int, error)
- type Subnet
- type VMManagementType
- type VMSSEntry
- type VMSSVirtualMachineEntry
- type VMSet
Constants ¶
const ( IPVersionIPv6 bool = true IPVersionIPv4 bool = false )
const ( // WriteAcceleratorEnabled support for Azure Write Accelerator on Azure Disks // https://docs.microsoft.com/azure/virtual-machines/windows/how-to-enable-write-accelerator WriteAcceleratorEnabled = "writeacceleratorenabled" )
Variables ¶
var ( // ErrorNotVmssInstance indicates an instance is not belonging to any vmss. ErrorNotVmssInstance = errors.New("not a vmss instance") ErrScaleSetNotFound = errors.New("scale set not found") )
var ErrorVmssIDIsEmpty = errors.New("VMSS ID is empty")
ErrorVmssIDIsEmpty indicates the vmss id is empty.
Functions ¶
func ConvertResourceGroupNameToLower ¶ added in v1.25.0
ConvertResourceGroupNameToLower converts the resource group name in the resource ID to be lowered.
func FilterNonExistingDisks ¶ added in v1.29.0
func FilterNonExistingDisks(ctx context.Context, clientFactory azclient.ClientFactory, unfilteredDisks []*armcompute.DataDisk) []*armcompute.DataDisk
func IntInSlice ¶ added in v1.28.0
IntInSlice checks if an int is in a list
func MapRouteNameToNodeName ¶ added in v1.0.0
MapRouteNameToNodeName is used with mapNodeNameToRouteName. See comment on mapNodeNameToRouteName for detailed usage.
func NewCloud ¶
func NewCloud(ctx context.Context, clientBuilder cloudprovider.ControllerClientBuilder, config *azureconfig.Config, callFromCCM bool) (cloudprovider.Interface, error)
NewCloud returns a Cloud with initialized clients
func NewCloudFromConfigFile ¶ added in v1.0.1
func NewCloudFromConfigFile(ctx context.Context, clientBuilder cloudprovider.ControllerClientBuilder, configFilePath string, calFromCCM bool) (cloudprovider.Interface, error)
func NewCloudFromSecret ¶ added in v1.0.0
func NewCloudFromSecret(ctx context.Context, clientBuilder cloudprovider.ControllerClientBuilder, secretName, secretNamespace, cloudConfigKey string) (cloudprovider.Interface, error)
func StringInSlice ¶ added in v1.28.0
StringInSlice check if string in a list
Types ¶
type AttachDiskOptions ¶
type AttachDiskOptions struct { CachingMode armcompute.CachingTypes DiskName string DiskEncryptionSetID string WriteAcceleratorEnabled bool Lun int32 }
AttachDiskOptions attach disk options
type AvailabilitySetEntry ¶ added in v1.1.27
type AvailabilitySetEntry struct { VMAS *armcompute.AvailabilitySet ResourceGroup string }
type AzureResourceLocker ¶ added in v1.32.0
type AzureResourceLocker struct { *Cloud // contains filtered or unexported fields }
func NewAzureResourceLocker ¶ added in v1.32.0
func NewAzureResourceLocker( cloud *Cloud, holder, leaseName, leaseNamespace string, leaseDurationSeconds int32, ) *AzureResourceLocker
type BackendPool ¶ added in v1.23.0
type BackendPool interface { // EnsureHostsInPool ensures the nodes join the backend pool of the load balancer EnsureHostsInPool(ctx context.Context, service *v1.Service, nodes []*v1.Node, backendPoolID, vmSetName, clusterName, lbName string, backendPool *armnetwork.BackendAddressPool) error // CleanupVMSetFromBackendPoolByCondition removes nodes of the unwanted vmSet from the lb backend pool. // This is needed in two scenarios: // 1. When migrating from single SLB to multiple SLBs, the existing // SLB's backend pool contains nodes from different agent pools, while we only want the // nodes from the primary agent pool to join the backend pool. // 2. When migrating from dedicated SLB to shared SLB (or vice versa), we should move the vmSet from // one SLB to another one. CleanupVMSetFromBackendPoolByCondition(ctx context.Context, slb *armnetwork.LoadBalancer, service *v1.Service, nodes []*v1.Node, clusterName string, shouldRemoveVMSetFromSLB func(string) bool) (*armnetwork.LoadBalancer, error) // ReconcileBackendPools creates the inbound backend pool if it is not existed, and removes nodes that are supposed to be // excluded from the load balancers. ReconcileBackendPools(ctx context.Context, clusterName string, service *v1.Service, lb *armnetwork.LoadBalancer) (bool, bool, *armnetwork.LoadBalancer, error) // GetBackendPrivateIPs returns the private IPs of LoadBalancer's backend pool GetBackendPrivateIPs(ctx context.Context, clusterName string, service *v1.Service, lb *armnetwork.LoadBalancer) ([]string, []string) }
type Cloud ¶
type Cloud struct { azureconfig.Config Environment *azclient.Environment ComputeClientFactory azclient.ClientFactory NetworkClientFactory azclient.ClientFactory AuthProvider *azclient.AuthProvider ResourceRequestBackoff wait.Backoff Metadata *InstanceMetadataService VMSet VMSet LoadBalancerBackendPool BackendPool KubeClient clientset.Interface // contains filtered or unexported fields }
Cloud holds the config and clients
func GetTestCloud ¶
func GetTestCloud(ctrl *gomock.Controller) (az *Cloud)
GetTestCloud returns a fake azure cloud for unit tests in Azure related CSI drivers
func GetTestCloudWithExtendedLocation ¶ added in v0.7.1
func GetTestCloudWithExtendedLocation(ctrl *gomock.Controller) (az *Cloud)
GetTestCloudWithExtendedLocation returns a fake azure cloud for unit tests in Azure related CSI drivers with extended location.
func (*Cloud) AddSSHKeyToAllInstances ¶
AddSSHKeyToAllInstances adds an SSH public key as a legal identity for all instances expected format for the key is standard ssh-keygen format: <protocol> <blob>
func (*Cloud) Clusters ¶
func (az *Cloud) Clusters() (cloudprovider.Clusters, bool)
Clusters returns a clusters interface. Also returns true if the interface is supported, false otherwise.
func (*Cloud) CreateOrUpdateInterface ¶
func (az *Cloud) CreateOrUpdateInterface(ctx context.Context, service *v1.Service, nic *armnetwork.Interface) error
CreateOrUpdateInterface invokes az.NetworkClientFactory.GetInterfaceClient().CreateOrUpdate with exponential backoff retry
func (*Cloud) CreateOrUpdateLB ¶
func (az *Cloud) CreateOrUpdateLB(ctx context.Context, service *v1.Service, lb armnetwork.LoadBalancer) error
CreateOrUpdateLB invokes az.NetworkClientFactory.GetLoadBalancerClient().CreateOrUpdate with exponential backoff retry
func (*Cloud) CreateOrUpdateLBBackendPool ¶ added in v1.23.0
func (*Cloud) CreateOrUpdatePIP ¶
func (az *Cloud) CreateOrUpdatePIP(service *v1.Service, pipResourceGroup string, pip *armnetwork.PublicIPAddress) error
CreateOrUpdatePIP invokes az.NetworkClientFactory.GetPublicIPAddressClient().CreateOrUpdate with exponential backoff retry
func (*Cloud) CreateOrUpdateVMSS ¶
func (az *Cloud) CreateOrUpdateVMSS(resourceGroupName string, VMScaleSetName string, parameters armcompute.VirtualMachineScaleSet) error
CreateOrUpdateVMSS invokes az.ComputeClientFactory.GetVirtualMachineScaleSetClient().Update().
func (*Cloud) CreateRoute ¶
func (az *Cloud) CreateRoute(ctx context.Context, clusterName string, _ string, kubeRoute *cloudprovider.Route) error
CreateRoute creates the described managed route route.Name will be ignored, although the cloud-provider may use nameHint to create a more user-meaningful name. implements cloudprovider.Routes.CreateRoute
func (*Cloud) CurrentNodeName ¶
CurrentNodeName returns the name of the node we are currently running on. On Azure this is the hostname, so we just return the hostname.
func (*Cloud) DeleteLB ¶
DeleteLB invokes az.NetworkClientFactory.GetLoadBalancerClient().Delete with exponential backoff retry
func (*Cloud) DeleteLBBackendPool ¶ added in v1.23.4
func (*Cloud) DeletePublicIP ¶
DeletePublicIP invokes az.NetworkClientFactory.GetPublicIPAddressClient().Delete with exponential backoff retry
func (*Cloud) DeleteRoute ¶
func (az *Cloud) DeleteRoute(_ context.Context, clusterName string, kubeRoute *cloudprovider.Route) error
DeleteRoute deletes the specified managed route Route should be as returned by ListRoutes implements cloudprovider.Routes.DeleteRoute
func (*Cloud) EnsureLoadBalancer ¶
func (az *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (lbStatus *v1.LoadBalancerStatus, err error)
EnsureLoadBalancer creates a new load balancer 'name', or updates the existing one. Returns the status of the balancer Implementations must treat the *v1.Service and *v1.Node parameters as read-only and not modify them. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager.
Implementations may return a (possibly wrapped) api.RetryError to enforce backing off at a fixed duration. This can be used for cases like when the load balancer is not ready yet (e.g., it is still being provisioned) and polling at a fixed rate is preferred over backing off exponentially in order to minimize latency.
func (*Cloud) EnsureLoadBalancerDeleted ¶
func (az *Cloud) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) (err error)
EnsureLoadBalancerDeleted deletes the specified load balancer if it exists, returning nil if the load balancer specified either didn't exist or was successfully deleted. This construction is useful because many cloud providers' load balancers have multiple underlying components, meaning a Get could say that the LB doesn't exist even if some part of it is still laying around. Implementations must treat the *v1.Service parameter as read-only and not modify it. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager
func (*Cloud) GetActiveZones ¶
func (az *Cloud) GetActiveZones() (*utilsets.IgnoreCaseSet, error)
GetActiveZones returns all the zones in which k8s nodes are currently running.
func (*Cloud) GetIPForMachineWithRetry ¶
func (az *Cloud) GetIPForMachineWithRetry(ctx context.Context, name types.NodeName) (string, string, error)
GetIPForMachineWithRetry invokes az.getIPForMachine with exponential backoff retry
func (*Cloud) GetLoadBalancer ¶
func (az *Cloud) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
GetLoadBalancer returns whether the specified load balancer exists, and if so, what its status is. Implementations must treat the *v1.Service parameter as read-only and not modify it. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager. TODO: Break this up into different interfaces (LB, etc) when we have more than one type of service
func (*Cloud) GetLoadBalancerName ¶
GetLoadBalancerName returns the name of the load balancer. Implementations must treat the *v1.Service parameter as read-only and not modify it.
func (*Cloud) GetLocation ¶
GetLocation returns the location in which k8s cluster is currently running.
func (*Cloud) GetNodeNames ¶ added in v0.7.3
func (az *Cloud) GetNodeNames() (*utilsets.IgnoreCaseSet, error)
GetNodeNames returns a set of all node names in the k8s cluster.
func (*Cloud) GetNodeResourceGroup ¶
GetNodeResourceGroup gets resource group for given node.
func (*Cloud) GetNodeVMSet ¶ added in v1.29.0
func (az *Cloud) GetNodeVMSet(ctx context.Context, nodeName types.NodeName, crt azcache.AzureCacheReadType) (VMSet, error)
getNodeVMSet gets the VMSet interface based on config.VMType and the real virtual machine type.
func (*Cloud) GetPlatformSubFaultDomain ¶ added in v0.7.13
GetPlatformSubFaultDomain returns the PlatformSubFaultDomain from IMDS if set.
func (*Cloud) GetResourceGroups ¶
func (az *Cloud) GetResourceGroups() (*utilsets.IgnoreCaseSet, error)
GetResourceGroups returns a set of resource groups that all nodes are running on.
func (*Cloud) GetUnmanagedNodes ¶
func (az *Cloud) GetUnmanagedNodes() (*utilsets.IgnoreCaseSet, error)
GetUnmanagedNodes returns a list of nodes not managed by Azure cloud provider (e.g. on-prem nodes).
func (*Cloud) GetVMNameByIPConfigurationName ¶ added in v1.25.21
func (*Cloud) GetVirtualMachineWithRetry ¶
func (az *Cloud) GetVirtualMachineWithRetry(ctx context.Context, name types.NodeName, crt azcache.AzureCacheReadType) (*armcompute.VirtualMachine, error)
GetVirtualMachineWithRetry invokes az.getVirtualMachine with exponential backoff retry
func (*Cloud) GetZone ¶
GetZone returns the Zone containing the current availability zone and locality region that the program is running in. DEPRECATED: Zones is deprecated in favor of retrieving zone/region information from InstancesV2. This interface will not be called if InstancesV2 is enabled. If the node is not running with availability zones, then it will fall back to fault domain.
func (*Cloud) GetZoneByNodeName ¶
func (az *Cloud) GetZoneByNodeName(ctx context.Context, nodeName types.NodeName) (cloudprovider.Zone, error)
GetZoneByNodeName implements Zones.GetZoneByNodeName This is particularly useful in external cloud providers where the kubelet does not initialize node data. DEPRECATED: Zones is deprecated in favor of retrieving zone/region information from InstancesV2. This interface will not be called if InstancesV2 is enabled.
func (*Cloud) GetZoneByProviderID ¶
func (az *Cloud) GetZoneByProviderID(ctx context.Context, providerID string) (cloudprovider.Zone, error)
GetZoneByProviderID implements Zones.GetZoneByProviderID This is particularly useful in external cloud providers where the kubelet does not initialize node data. DEPRECATED: Zones is deprecated in favor of retrieving zone/region information from InstancesV2. This interface will not be called if InstancesV2 is enabled.
func (*Cloud) HasClusterID ¶
HasClusterID returns true if the cluster has a clusterID
func (*Cloud) Initialize ¶
func (az *Cloud) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, _ <-chan struct{})
Initialize passes a Kubernetes clientBuilder interface to the cloud provider
func (*Cloud) InitializeCloudFromConfig ¶
func (az *Cloud) InitializeCloudFromConfig(ctx context.Context, config *config.Config, _, callFromCCM bool) error
InitializeCloudFromConfig initializes the Cloud from config.
func (*Cloud) InstanceExists ¶ added in v0.7.1
InstanceExists returns true if the instance for the given node exists according to the cloud provider. Use the node.name or node.spec.providerID field to find the node in the cloud provider.
func (*Cloud) InstanceExistsByProviderID ¶
InstanceExistsByProviderID returns true if the instance with the given provider id still exists and is running. If false is returned with no error, the instance will be immediately deleted by the cloud controller manager.
func (*Cloud) InstanceID ¶
InstanceID returns the cloud provider ID of the specified instance. Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound)
func (*Cloud) InstanceMetadata ¶ added in v0.7.1
func (az *Cloud) InstanceMetadata(ctx context.Context, node *v1.Node) (*cloudprovider.InstanceMetadata, error)
InstanceMetadata returns the instance's metadata. The values returned in InstanceMetadata are translated into specific fields in the Node object on registration. Use the node.name or node.spec.providerID field to find the node in the cloud provider.
func (*Cloud) InstanceShutdown ¶ added in v0.7.1
InstanceShutdown returns true if the instance is shutdown according to the cloud provider. Use the node.name or node.spec.providerID field to find the node in the cloud provider.
func (*Cloud) InstanceShutdownByProviderID ¶
InstanceShutdownByProviderID returns true if the instance is in safe state to detach volumes
func (*Cloud) InstanceType ¶
InstanceType returns the type of the specified instance. Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound) (Implementer Note): This is used by kubelet. Kubelet will label the node. Real log from kubelet: Adding node label from cloud provider: beta.kubernetes.io/instance-type=[value]
func (*Cloud) InstanceTypeByProviderID ¶
InstanceTypeByProviderID returns the cloudprovider instance type of the node with the specified unique providerID This method will not be called from the node that is requesting this ID. i.e. metadata service and other local methods cannot be used here
func (*Cloud) Instances ¶
func (az *Cloud) Instances() (cloudprovider.Instances, bool)
Instances returns an instances interface. Also returns true if the interface is supported, false otherwise.
func (*Cloud) InstancesV2 ¶
func (az *Cloud) InstancesV2() (cloudprovider.InstancesV2, bool)
InstancesV2 is an implementation for instances and should only be implemented by external cloud providers. Implementing InstancesV2 is behaviorally identical to Instances but is optimized to significantly reduce API calls to the cloud provider when registering and syncing nodes. Implementation of this interface will disable calls to the Zones interface. Also returns true if the interface is supported, false otherwise.
func (*Cloud) IsNodeUnmanaged ¶
IsNodeUnmanaged returns true if the node is not managed by Azure cloud provider. Those nodes includes on-prem or VMs from other clouds. They will not be added to load balancer backends. Azure routes and managed disks are also not supported for them.
func (*Cloud) IsNodeUnmanagedByProviderID ¶
IsNodeUnmanagedByProviderID returns true if the node is not managed by Azure cloud provider. All managed node's providerIDs are in format 'azure:///subscriptions/<id>/resourceGroups/<rg>/providers/Microsoft.Compute/.*'
func (*Cloud) ListLB ¶
func (az *Cloud) ListLB(ctx context.Context, service *v1.Service) ([]*armnetwork.LoadBalancer, error)
ListLB invokes az.NetworkClientFactory.GetLoadBalancerClient().List with exponential backoff retry
func (*Cloud) ListManagedLBs ¶ added in v0.7.9
func (az *Cloud) ListManagedLBs(ctx context.Context, service *v1.Service, nodes []*v1.Node, clusterName string) ([]*armnetwork.LoadBalancer, error)
ListManagedLBs invokes az.NetworkClientFactory.GetLoadBalancerClient().List and filter out those that are not managed by cloud provider azure or not associated to a managed VMSet.
func (*Cloud) ListRoutes ¶
func (az *Cloud) ListRoutes(ctx context.Context, clusterName string) ([]*cloudprovider.Route, error)
ListRoutes lists all managed routes that belong to the specified clusterName implements cloudprovider.Routes.ListRoutes
func (*Cloud) ListVirtualMachines ¶
func (az *Cloud) ListVirtualMachines(ctx context.Context, resourceGroup string) ([]*armcompute.VirtualMachine, error)
ListVirtualMachines invokes az.ComputeClientFactory.GetVirtualMachineScaleSetClient().List with exponential backoff retry
func (*Cloud) LoadBalancer ¶
func (az *Cloud) LoadBalancer() (cloudprovider.LoadBalancer, bool)
LoadBalancer returns a balancer interface. Also returns true if the interface is supported, false otherwise.
func (*Cloud) MigrateToIPBasedBackendPoolAndWaitForCompletion ¶ added in v1.24.21
func (az *Cloud) MigrateToIPBasedBackendPoolAndWaitForCompletion( ctx context.Context, lbName string, backendPoolNames []string, nicsCountMap map[string]int, ) error
MigrateToIPBasedBackendPoolAndWaitForCompletion use the migration API to migrate from NIC-based to IP-based LB backend pools. It also makes sure the number of IP addresses in the backend pools is expected.
func (*Cloud) NodeAddresses ¶
NodeAddresses returns the addresses of the specified instance.
func (*Cloud) NodeAddressesByProviderID ¶
func (az *Cloud) NodeAddressesByProviderID(ctx context.Context, providerID string) ([]v1.NodeAddress, error)
NodeAddressesByProviderID returns the node addresses of an instances with the specified unique providerID This method will not be called from the node that is requesting this ID. i.e. metadata service and other local methods cannot be used here
func (*Cloud) ProviderName ¶
ProviderName returns the cloud provider ID.
func (*Cloud) RequestBackoff ¶
RequestBackoff if backoff is disabled in cloud provider it returns a new Backoff object steps = 1 This is to make sure that the requested command executes at least once
func (*Cloud) Routes ¶
func (az *Cloud) Routes() (cloudprovider.Routes, bool)
Routes returns a routes interface along with whether the interface is supported.
func (*Cloud) SetInformers ¶
func (az *Cloud) SetInformers(informerFactory informers.SharedInformerFactory)
SetInformers sets informers for Azure cloud provider.
func (*Cloud) ShouldNodeExcludedFromLoadBalancer ¶
ShouldNodeExcludedFromLoadBalancer returns true if node is unmanaged, in external resource group or labeled with "node.kubernetes.io/exclude-from-external-load-balancers".
func (*Cloud) UpdateLoadBalancer ¶
func (az *Cloud) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error
UpdateLoadBalancer updates hosts under the specified load balancer. Implementations must treat the *v1.Service and *v1.Node parameters as read-only and not modify them. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager
func (*Cloud) Zones ¶
func (az *Cloud) Zones() (cloudprovider.Zones, bool)
Zones returns a zones interface. Also returns true if the interface is supported, false otherwise. DEPRECATED: Zones is deprecated in favor of retrieving zone/region information from InstancesV2. This interface will not be called if InstancesV2 is enabled.
type ComputeMetadata ¶
type ComputeMetadata struct { Environment string `json:"azEnvironment,omitempty"` SKU string `json:"SKU,omitempty"` Name string `json:"name,omitempty"` Zone string `json:"zone,omitempty"` VMSize string `json:"vmSize,omitempty"` OSType string `json:"osType,omitempty"` Location string `json:"location,omitempty"` FaultDomain string `json:"platformFaultDomain,omitempty"` PlatformSubFaultDomain string `json:"platformSubFaultDomain,omitempty"` UpdateDomain string `json:"platformUpdateDomain,omitempty"` ResourceGroup string `json:"resourceGroupName,omitempty"` VMScaleSetName string `json:"vmScaleSetName,omitempty"` SubscriptionID string `json:"subscriptionId,omitempty"` ResourceID string `json:"resourceId,omitempty"` }
ComputeMetadata represents compute information
type ExtendedLocation ¶ added in v0.7.3
type ExtendedLocation struct { // Name - The name of the extended location. Name string `json:"name,omitempty"` // Type - The type of the extended location. Type string `json:"type,omitempty"` }
ExtendedLocation contains additional info about the location of resources.
type FlexScaleSet ¶ added in v1.25.0
type FlexScaleSet struct { *Cloud // contains filtered or unexported fields }
FlexScaleSet implements VMSet interface for Azure Flexible VMSS.
func NewTestFlexScaleSet ¶ added in v1.25.0
func NewTestFlexScaleSet(ctrl *gomock.Controller) (*FlexScaleSet, error)
func (*FlexScaleSet) AttachDisk ¶ added in v1.25.0
func (fs *FlexScaleSet) AttachDisk(ctx context.Context, nodeName types.NodeName, diskMap map[string]*AttachDiskOptions) error
AttachDisk attaches a disk to vm
func (*FlexScaleSet) DeleteCacheForNode ¶ added in v1.25.2
func (fs *FlexScaleSet) DeleteCacheForNode(ctx context.Context, nodeName string) error
func (*FlexScaleSet) DetachDisk ¶ added in v1.25.0
func (fs *FlexScaleSet) DetachDisk(ctx context.Context, nodeName types.NodeName, diskMap map[string]string, forceDetach bool) error
DetachDisk detaches a disk from VM
func (*FlexScaleSet) EnsureBackendPoolDeleted ¶ added in v1.25.0
func (fs *FlexScaleSet) EnsureBackendPoolDeleted(ctx context.Context, service *v1.Service, backendPoolIDs []string, vmSetName string, backendAddressPools []*armnetwork.BackendAddressPool, deleteFromVMSet bool) (bool, error)
EnsureBackendPoolDeleted ensures the loadBalancer backendAddressPools deleted from the specified nodes.
func (*FlexScaleSet) EnsureBackendPoolDeletedFromVMSets ¶ added in v1.25.0
func (fs *FlexScaleSet) EnsureBackendPoolDeletedFromVMSets(ctx context.Context, vmssNamesMap map[string]bool, backendPoolIDs []string) error
EnsureBackendPoolDeletedFromVMSets ensures the loadBalancer backendAddressPools deleted from the specified VMSS Flex
func (*FlexScaleSet) EnsureHostInPool ¶ added in v1.25.0
func (fs *FlexScaleSet) EnsureHostInPool(ctx context.Context, service *v1.Service, nodeName types.NodeName, backendPoolID string, vmSetNameOfLB string) (string, string, string, *armcompute.VirtualMachineScaleSetVM, error)
EnsureHostInPool ensures the given VM's Primary NIC's Primary IP Configuration is participating in the specified LoadBalancer Backend Pool, which returns (resourceGroup, vmasName, instanceID, vmssVM, error).
func (*FlexScaleSet) EnsureHostsInPool ¶ added in v1.25.0
func (fs *FlexScaleSet) EnsureHostsInPool(ctx context.Context, service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetNameOfLB string) error
EnsureHostsInPool ensures the given Node's primary IP configurations are participating in the specified LoadBalancer Backend Pool.
func (*FlexScaleSet) GetAgentPoolVMSetNames ¶ added in v1.25.0
func (fs *FlexScaleSet) GetAgentPoolVMSetNames(ctx context.Context, nodes []*v1.Node) ([]*string, error)
GetAgentPoolVMSetNames returns all vmSet names according to the nodes
func (*FlexScaleSet) GetDataDisks ¶ added in v1.25.0
func (fs *FlexScaleSet) GetDataDisks(ctx context.Context, nodeName types.NodeName, crt azcache.AzureCacheReadType) ([]*armcompute.DataDisk, *string, error)
GetDataDisks gets a list of data disks attached to the node.
func (*FlexScaleSet) GetIPByNodeName ¶ added in v1.25.0
GetIPByNodeName gets machine private IP and public IP by node name.
func (*FlexScaleSet) GetInstanceIDByNodeName ¶ added in v1.25.0
GetInstanceIDByNodeName gets the cloud provider ID by node name. It must return ("", cloudprovider.InstanceNotFound) if the instance does not exist or is no longer running.
func (*FlexScaleSet) GetInstanceTypeByNodeName ¶ added in v1.25.0
GetInstanceTypeByNodeName gets the instance type by node name.
func (*FlexScaleSet) GetNodeCIDRMasksByProviderID ¶ added in v1.25.0
func (fs *FlexScaleSet) GetNodeCIDRMasksByProviderID(ctx context.Context, providerID string) (int, int, error)
GetNodeCIDRMaskByProviderID returns the node CIDR subnet mask by provider ID.
func (*FlexScaleSet) GetNodeNameByIPConfigurationID ¶ added in v1.25.0
func (fs *FlexScaleSet) GetNodeNameByIPConfigurationID(ctx context.Context, ipConfigurationID string) (string, string, error)
GetNodeNameByIPConfigurationID gets the nodeName and vmSetName by IP configuration ID.
func (*FlexScaleSet) GetNodeNameByProviderID ¶ added in v1.25.0
func (fs *FlexScaleSet) GetNodeNameByProviderID(ctx context.Context, providerID string) (types.NodeName, error)
GetNodeNameByProviderID gets the node name by provider ID. providerID example: azure:///subscriptions/sub/resourceGroups/rg/providers/Microsoft.Compute/virtualMachines/flexprofile-mp-0_df53ee36 Different from vmas where vm name is always equal to nodeName, we need to further map vmName to actual nodeName in vmssflex. Note: nodeName is always equal ptr.Derefs.ToLower(*vm.Properties.OSProfile.ComputerName, "")
func (*FlexScaleSet) GetNodeVMSetName ¶ added in v1.25.0
GetNodeVMSetName returns the availability set or vmss name by the node name. It will return empty string when using standalone vms.
func (*FlexScaleSet) GetPowerStatusByNodeName ¶ added in v1.25.0
func (fs *FlexScaleSet) GetPowerStatusByNodeName(ctx context.Context, name string) (powerState string, err error)
GetPowerStatusByNodeName returns the powerState for the specified node.
func (*FlexScaleSet) GetPrimaryInterface ¶ added in v1.25.0
func (fs *FlexScaleSet) GetPrimaryInterface(ctx context.Context, nodeName string) (*armnetwork.Interface, error)
GetPrimaryInterface gets machine primary network interface by node name.
func (*FlexScaleSet) GetPrimaryVMSetName ¶ added in v1.25.0
func (fs *FlexScaleSet) GetPrimaryVMSetName() string
GetPrimaryVMSetName returns the VM set name depending on the configured vmType. It returns config.PrimaryScaleSetName for vmss and config.PrimaryAvailabilitySetName for standard vmType.
func (*FlexScaleSet) GetPrivateIPsByNodeName ¶ added in v1.25.0
GetPrivateIPsByNodeName returns a slice of all private ips assigned to node (ipv6 and ipv4) TODO (khenidak): This should read all nics, not just the primary allowing users to split ipv4/v6 on multiple nics
func (*FlexScaleSet) GetProvisioningStateByNodeName ¶ added in v1.25.0
func (fs *FlexScaleSet) GetProvisioningStateByNodeName(ctx context.Context, name string) (provisioningState string, err error)
GetProvisioningStateByNodeName returns the provisioningState for the specified node.
func (*FlexScaleSet) GetVMSetNames ¶ added in v1.25.0
func (fs *FlexScaleSet) GetVMSetNames(ctx context.Context, service *v1.Service, nodes []*v1.Node) ([]*string, error)
GetVMSetNames selects all possible availability sets or scale sets (depending vmType configured) for service load balancer, if the service has no loadbalancer mode annotation returns the primary VMSet. If service annotation for loadbalancer exists then returns the eligible VMSet. The mode selection annotation would be ignored when using one SLB per cluster.
func (*FlexScaleSet) GetZoneByNodeName ¶ added in v1.25.0
func (fs *FlexScaleSet) GetZoneByNodeName(ctx context.Context, name string) (cloudprovider.Zone, error)
GetZoneByNodeName gets availability zone for the specified node. If the node is not running with availability zone, then it returns fault domain. for details, refer to https://kubernetes-sigs.github.io/cloud-provider-azure/topics/availability-zones/#node-labels
func (*FlexScaleSet) RefreshCaches ¶ added in v1.32.0
func (fs *FlexScaleSet) RefreshCaches() error
RefreshCaches invalidates and renew all related caches.
type IPAddress ¶
type IPAddress struct { PrivateIP string `json:"privateIpAddress"` PublicIP string `json:"publicIpAddress"` }
IPAddress represents IP address information.
type InstanceMetadata ¶
type InstanceMetadata struct { Compute *ComputeMetadata `json:"compute,omitempty"` Network *NetworkMetadata `json:"network,omitempty"` }
InstanceMetadata represents instance information.
type InstanceMetadataService ¶
type InstanceMetadataService struct {
// contains filtered or unexported fields
}
InstanceMetadataService knows how to query the Azure instance metadata server.
func NewInstanceMetadataService ¶
func NewInstanceMetadataService(imdsServer string) (*InstanceMetadataService, error)
NewInstanceMetadataService creates an instance of the InstanceMetadataService accessor object.
func (*InstanceMetadataService) GetMetadata ¶
func (ims *InstanceMetadataService) GetMetadata(ctx context.Context, crt azcache.AzureCacheReadType) (*InstanceMetadata, error)
GetMetadata gets instance metadata from cache. crt determines if we can get data from stalled cache/need fresh if cache expired.
type LoadBalancerMetadata ¶ added in v0.7.3
type LoadBalancerMetadata struct {
LoadBalancer *LoadbalancerProfile `json:"loadbalancer,omitempty"`
}
LoadBalancerMetadata represents load balancer metadata.
type LoadbalancerProfile ¶ added in v0.7.3
type LoadbalancerProfile struct {
PublicIPAddresses []PublicIPMetadata `json:"publicIpAddresses,omitempty"`
}
LoadbalancerProfile represents load balancer profile in IMDS.
type MockBackendPool ¶ added in v1.23.0
type MockBackendPool struct {
// contains filtered or unexported fields
}
MockBackendPool is a mock of BackendPool interface.
func NewMockBackendPool ¶ added in v1.23.0
func NewMockBackendPool(ctrl *gomock.Controller) *MockBackendPool
NewMockBackendPool creates a new mock instance.
func (*MockBackendPool) CleanupVMSetFromBackendPoolByCondition ¶ added in v1.23.0
func (m *MockBackendPool) CleanupVMSetFromBackendPoolByCondition(ctx context.Context, slb *armnetwork.LoadBalancer, service *v1.Service, nodes []*v1.Node, clusterName string, shouldRemoveVMSetFromSLB func(string) bool) (*armnetwork.LoadBalancer, error)
CleanupVMSetFromBackendPoolByCondition mocks base method.
func (*MockBackendPool) EXPECT ¶ added in v1.23.0
func (m *MockBackendPool) EXPECT() *MockBackendPoolMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBackendPool) EnsureHostsInPool ¶ added in v1.23.0
func (m *MockBackendPool) EnsureHostsInPool(ctx context.Context, service *v1.Service, nodes []*v1.Node, backendPoolID, vmSetName, clusterName, lbName string, backendPool *armnetwork.BackendAddressPool) error
EnsureHostsInPool mocks base method.
func (*MockBackendPool) GetBackendPrivateIPs ¶ added in v1.23.15
func (m *MockBackendPool) GetBackendPrivateIPs(ctx context.Context, clusterName string, service *v1.Service, lb *armnetwork.LoadBalancer) ([]string, []string)
GetBackendPrivateIPs mocks base method.
func (*MockBackendPool) ReconcileBackendPools ¶ added in v1.23.0
func (m *MockBackendPool) ReconcileBackendPools(ctx context.Context, clusterName string, service *v1.Service, lb *armnetwork.LoadBalancer) (bool, bool, *armnetwork.LoadBalancer, error)
ReconcileBackendPools mocks base method.
type MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall ¶ added in v1.32.0
MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall wrap *gomock.Call
func (*MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall) Do ¶ added in v1.32.0
func (c *MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall) Do(f func(context.Context, *armnetwork.LoadBalancer, *v1.Service, []*v1.Node, string, func(string) bool) (*armnetwork.LoadBalancer, error)) *MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall
Do rewrite *gomock.Call.Do
func (*MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall) DoAndReturn ¶ added in v1.32.0
func (c *MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall) DoAndReturn(f func(context.Context, *armnetwork.LoadBalancer, *v1.Service, []*v1.Node, string, func(string) bool) (*armnetwork.LoadBalancer, error)) *MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall) Return ¶ added in v1.32.0
func (c *MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall) Return(arg0 *armnetwork.LoadBalancer, arg1 error) *MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall
Return rewrite *gomock.Call.Return
type MockBackendPoolEnsureHostsInPoolCall ¶ added in v1.32.0
MockBackendPoolEnsureHostsInPoolCall wrap *gomock.Call
func (*MockBackendPoolEnsureHostsInPoolCall) Do ¶ added in v1.32.0
func (c *MockBackendPoolEnsureHostsInPoolCall) Do(f func(context.Context, *v1.Service, []*v1.Node, string, string, string, string, *armnetwork.BackendAddressPool) error) *MockBackendPoolEnsureHostsInPoolCall
Do rewrite *gomock.Call.Do
func (*MockBackendPoolEnsureHostsInPoolCall) DoAndReturn ¶ added in v1.32.0
func (c *MockBackendPoolEnsureHostsInPoolCall) DoAndReturn(f func(context.Context, *v1.Service, []*v1.Node, string, string, string, string, *armnetwork.BackendAddressPool) error) *MockBackendPoolEnsureHostsInPoolCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockBackendPoolEnsureHostsInPoolCall) Return ¶ added in v1.32.0
func (c *MockBackendPoolEnsureHostsInPoolCall) Return(arg0 error) *MockBackendPoolEnsureHostsInPoolCall
Return rewrite *gomock.Call.Return
type MockBackendPoolGetBackendPrivateIPsCall ¶ added in v1.32.0
MockBackendPoolGetBackendPrivateIPsCall wrap *gomock.Call
func (*MockBackendPoolGetBackendPrivateIPsCall) Do ¶ added in v1.32.0
func (c *MockBackendPoolGetBackendPrivateIPsCall) Do(f func(context.Context, string, *v1.Service, *armnetwork.LoadBalancer) ([]string, []string)) *MockBackendPoolGetBackendPrivateIPsCall
Do rewrite *gomock.Call.Do
func (*MockBackendPoolGetBackendPrivateIPsCall) DoAndReturn ¶ added in v1.32.0
func (c *MockBackendPoolGetBackendPrivateIPsCall) DoAndReturn(f func(context.Context, string, *v1.Service, *armnetwork.LoadBalancer) ([]string, []string)) *MockBackendPoolGetBackendPrivateIPsCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockBackendPoolGetBackendPrivateIPsCall) Return ¶ added in v1.32.0
func (c *MockBackendPoolGetBackendPrivateIPsCall) Return(arg0, arg1 []string) *MockBackendPoolGetBackendPrivateIPsCall
Return rewrite *gomock.Call.Return
type MockBackendPoolMockRecorder ¶ added in v1.23.0
type MockBackendPoolMockRecorder struct {
// contains filtered or unexported fields
}
MockBackendPoolMockRecorder is the mock recorder for MockBackendPool.
func (*MockBackendPoolMockRecorder) CleanupVMSetFromBackendPoolByCondition ¶ added in v1.23.0
func (mr *MockBackendPoolMockRecorder) CleanupVMSetFromBackendPoolByCondition(ctx, slb, service, nodes, clusterName, shouldRemoveVMSetFromSLB any) *MockBackendPoolCleanupVMSetFromBackendPoolByConditionCall
CleanupVMSetFromBackendPoolByCondition indicates an expected call of CleanupVMSetFromBackendPoolByCondition.
func (*MockBackendPoolMockRecorder) EnsureHostsInPool ¶ added in v1.23.0
func (mr *MockBackendPoolMockRecorder) EnsureHostsInPool(ctx, service, nodes, backendPoolID, vmSetName, clusterName, lbName, backendPool any) *MockBackendPoolEnsureHostsInPoolCall
EnsureHostsInPool indicates an expected call of EnsureHostsInPool.
func (*MockBackendPoolMockRecorder) GetBackendPrivateIPs ¶ added in v1.23.15
func (mr *MockBackendPoolMockRecorder) GetBackendPrivateIPs(ctx, clusterName, service, lb any) *MockBackendPoolGetBackendPrivateIPsCall
GetBackendPrivateIPs indicates an expected call of GetBackendPrivateIPs.
func (*MockBackendPoolMockRecorder) ReconcileBackendPools ¶ added in v1.23.0
func (mr *MockBackendPoolMockRecorder) ReconcileBackendPools(ctx, clusterName, service, lb any) *MockBackendPoolReconcileBackendPoolsCall
ReconcileBackendPools indicates an expected call of ReconcileBackendPools.
type MockBackendPoolReconcileBackendPoolsCall ¶ added in v1.32.0
MockBackendPoolReconcileBackendPoolsCall wrap *gomock.Call
func (*MockBackendPoolReconcileBackendPoolsCall) Do ¶ added in v1.32.0
func (c *MockBackendPoolReconcileBackendPoolsCall) Do(f func(context.Context, string, *v1.Service, *armnetwork.LoadBalancer) (bool, bool, *armnetwork.LoadBalancer, error)) *MockBackendPoolReconcileBackendPoolsCall
Do rewrite *gomock.Call.Do
func (*MockBackendPoolReconcileBackendPoolsCall) DoAndReturn ¶ added in v1.32.0
func (c *MockBackendPoolReconcileBackendPoolsCall) DoAndReturn(f func(context.Context, string, *v1.Service, *armnetwork.LoadBalancer) (bool, bool, *armnetwork.LoadBalancer, error)) *MockBackendPoolReconcileBackendPoolsCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockBackendPoolReconcileBackendPoolsCall) Return ¶ added in v1.32.0
func (c *MockBackendPoolReconcileBackendPoolsCall) Return(arg0, arg1 bool, arg2 *armnetwork.LoadBalancer, arg3 error) *MockBackendPoolReconcileBackendPoolsCall
Return rewrite *gomock.Call.Return
type MockVMSet ¶
type MockVMSet struct {
// contains filtered or unexported fields
}
MockVMSet is a mock of VMSet interface.
func NewMockVMSet ¶
func NewMockVMSet(ctrl *gomock.Controller) *MockVMSet
NewMockVMSet creates a new mock instance.
func (*MockVMSet) AttachDisk ¶
func (m *MockVMSet) AttachDisk(ctx context.Context, nodeName types.NodeName, diskMap map[string]*AttachDiskOptions) error
AttachDisk mocks base method.
func (*MockVMSet) DeleteCacheForNode ¶ added in v1.23.21
DeleteCacheForNode mocks base method.
func (*MockVMSet) DetachDisk ¶
func (m *MockVMSet) DetachDisk(ctx context.Context, nodeName types.NodeName, diskMap map[string]string, forceDetach bool) error
DetachDisk mocks base method.
func (*MockVMSet) EXPECT ¶
func (m *MockVMSet) EXPECT() *MockVMSetMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockVMSet) EnsureBackendPoolDeleted ¶
func (m *MockVMSet) EnsureBackendPoolDeleted(ctx context.Context, service *v1.Service, backendPoolIDs []string, vmSetName string, backendAddressPools []*v60.BackendAddressPool, deleteFromVMSet bool) (bool, error)
EnsureBackendPoolDeleted mocks base method.
func (*MockVMSet) EnsureBackendPoolDeletedFromVMSets ¶ added in v0.7.3
func (m *MockVMSet) EnsureBackendPoolDeletedFromVMSets(ctx context.Context, vmSetNamesMap map[string]bool, backendPoolIDs []string) error
EnsureBackendPoolDeletedFromVMSets mocks base method.
func (*MockVMSet) EnsureHostInPool ¶
func (m *MockVMSet) EnsureHostInPool(ctx context.Context, service *v1.Service, nodeName types.NodeName, backendPoolID, vmSetName string) (string, string, string, *v6.VirtualMachineScaleSetVM, error)
EnsureHostInPool mocks base method.
func (*MockVMSet) EnsureHostsInPool ¶
func (m *MockVMSet) EnsureHostsInPool(ctx context.Context, service *v1.Service, nodes []*v1.Node, backendPoolID, vmSetName string) error
EnsureHostsInPool mocks base method.
func (*MockVMSet) GetAgentPoolVMSetNames ¶ added in v0.7.3
func (m *MockVMSet) GetAgentPoolVMSetNames(ctx context.Context, nodes []*v1.Node) ([]*string, error)
GetAgentPoolVMSetNames mocks base method.
func (*MockVMSet) GetDataDisks ¶
func (m *MockVMSet) GetDataDisks(ctx context.Context, nodeName types.NodeName, crt cache.AzureCacheReadType) ([]*v6.DataDisk, *string, error)
GetDataDisks mocks base method.
func (*MockVMSet) GetIPByNodeName ¶
GetIPByNodeName mocks base method.
func (*MockVMSet) GetInstanceIDByNodeName ¶
GetInstanceIDByNodeName mocks base method.
func (*MockVMSet) GetInstanceTypeByNodeName ¶
GetInstanceTypeByNodeName mocks base method.
func (*MockVMSet) GetNodeCIDRMasksByProviderID ¶ added in v0.7.3
func (m *MockVMSet) GetNodeCIDRMasksByProviderID(ctx context.Context, providerID string) (int, int, error)
GetNodeCIDRMasksByProviderID mocks base method.
func (*MockVMSet) GetNodeNameByIPConfigurationID ¶
func (m *MockVMSet) GetNodeNameByIPConfigurationID(ctx context.Context, ipConfigurationID string) (string, string, error)
GetNodeNameByIPConfigurationID mocks base method.
func (*MockVMSet) GetNodeNameByProviderID ¶
func (m *MockVMSet) GetNodeNameByProviderID(ctx context.Context, providerID string) (types.NodeName, error)
GetNodeNameByProviderID mocks base method.
func (*MockVMSet) GetNodeVMSetName ¶ added in v1.23.0
GetNodeVMSetName mocks base method.
func (*MockVMSet) GetPowerStatusByNodeName ¶
GetPowerStatusByNodeName mocks base method.
func (*MockVMSet) GetPrimaryInterface ¶
func (m *MockVMSet) GetPrimaryInterface(ctx context.Context, nodeName string) (*v60.Interface, error)
GetPrimaryInterface mocks base method.
func (*MockVMSet) GetPrimaryVMSetName ¶
GetPrimaryVMSetName mocks base method.
func (*MockVMSet) GetPrivateIPsByNodeName ¶
GetPrivateIPsByNodeName mocks base method.
func (*MockVMSet) GetProvisioningStateByNodeName ¶ added in v0.7.7
func (m *MockVMSet) GetProvisioningStateByNodeName(ctx context.Context, name string) (string, error)
GetProvisioningStateByNodeName mocks base method.
func (*MockVMSet) GetVMSetNames ¶
func (m *MockVMSet) GetVMSetNames(ctx context.Context, service *v1.Service, nodes []*v1.Node) ([]*string, error)
GetVMSetNames mocks base method.
func (*MockVMSet) GetZoneByNodeName ¶
func (m *MockVMSet) GetZoneByNodeName(ctx context.Context, name string) (cloud_provider.Zone, error)
GetZoneByNodeName mocks base method.
func (*MockVMSet) RefreshCaches ¶ added in v1.32.0
RefreshCaches mocks base method.
type MockVMSetAttachDiskCall ¶ added in v1.32.0
MockVMSetAttachDiskCall wrap *gomock.Call
func (*MockVMSetAttachDiskCall) Do ¶ added in v1.32.0
func (c *MockVMSetAttachDiskCall) Do(f func(context.Context, types.NodeName, map[string]*AttachDiskOptions) error) *MockVMSetAttachDiskCall
Do rewrite *gomock.Call.Do
func (*MockVMSetAttachDiskCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetAttachDiskCall) DoAndReturn(f func(context.Context, types.NodeName, map[string]*AttachDiskOptions) error) *MockVMSetAttachDiskCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetAttachDiskCall) Return ¶ added in v1.32.0
func (c *MockVMSetAttachDiskCall) Return(arg0 error) *MockVMSetAttachDiskCall
Return rewrite *gomock.Call.Return
type MockVMSetDeleteCacheForNodeCall ¶ added in v1.32.0
MockVMSetDeleteCacheForNodeCall wrap *gomock.Call
func (*MockVMSetDeleteCacheForNodeCall) Do ¶ added in v1.32.0
func (c *MockVMSetDeleteCacheForNodeCall) Do(f func(context.Context, string) error) *MockVMSetDeleteCacheForNodeCall
Do rewrite *gomock.Call.Do
func (*MockVMSetDeleteCacheForNodeCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetDeleteCacheForNodeCall) DoAndReturn(f func(context.Context, string) error) *MockVMSetDeleteCacheForNodeCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetDeleteCacheForNodeCall) Return ¶ added in v1.32.0
func (c *MockVMSetDeleteCacheForNodeCall) Return(arg0 error) *MockVMSetDeleteCacheForNodeCall
Return rewrite *gomock.Call.Return
type MockVMSetDetachDiskCall ¶ added in v1.32.0
MockVMSetDetachDiskCall wrap *gomock.Call
func (*MockVMSetDetachDiskCall) Do ¶ added in v1.32.0
func (c *MockVMSetDetachDiskCall) Do(f func(context.Context, types.NodeName, map[string]string, bool) error) *MockVMSetDetachDiskCall
Do rewrite *gomock.Call.Do
func (*MockVMSetDetachDiskCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetDetachDiskCall) DoAndReturn(f func(context.Context, types.NodeName, map[string]string, bool) error) *MockVMSetDetachDiskCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetDetachDiskCall) Return ¶ added in v1.32.0
func (c *MockVMSetDetachDiskCall) Return(arg0 error) *MockVMSetDetachDiskCall
Return rewrite *gomock.Call.Return
type MockVMSetEnsureBackendPoolDeletedCall ¶ added in v1.32.0
MockVMSetEnsureBackendPoolDeletedCall wrap *gomock.Call
func (*MockVMSetEnsureBackendPoolDeletedCall) Do ¶ added in v1.32.0
func (c *MockVMSetEnsureBackendPoolDeletedCall) Do(f func(context.Context, *v1.Service, []string, string, []*v60.BackendAddressPool, bool) (bool, error)) *MockVMSetEnsureBackendPoolDeletedCall
Do rewrite *gomock.Call.Do
func (*MockVMSetEnsureBackendPoolDeletedCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetEnsureBackendPoolDeletedCall) DoAndReturn(f func(context.Context, *v1.Service, []string, string, []*v60.BackendAddressPool, bool) (bool, error)) *MockVMSetEnsureBackendPoolDeletedCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetEnsureBackendPoolDeletedCall) Return ¶ added in v1.32.0
func (c *MockVMSetEnsureBackendPoolDeletedCall) Return(arg0 bool, arg1 error) *MockVMSetEnsureBackendPoolDeletedCall
Return rewrite *gomock.Call.Return
type MockVMSetEnsureBackendPoolDeletedFromVMSetsCall ¶ added in v1.32.0
MockVMSetEnsureBackendPoolDeletedFromVMSetsCall wrap *gomock.Call
func (*MockVMSetEnsureBackendPoolDeletedFromVMSetsCall) Do ¶ added in v1.32.0
func (c *MockVMSetEnsureBackendPoolDeletedFromVMSetsCall) Do(f func(context.Context, map[string]bool, []string) error) *MockVMSetEnsureBackendPoolDeletedFromVMSetsCall
Do rewrite *gomock.Call.Do
func (*MockVMSetEnsureBackendPoolDeletedFromVMSetsCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetEnsureBackendPoolDeletedFromVMSetsCall) DoAndReturn(f func(context.Context, map[string]bool, []string) error) *MockVMSetEnsureBackendPoolDeletedFromVMSetsCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetEnsureBackendPoolDeletedFromVMSetsCall) Return ¶ added in v1.32.0
func (c *MockVMSetEnsureBackendPoolDeletedFromVMSetsCall) Return(arg0 error) *MockVMSetEnsureBackendPoolDeletedFromVMSetsCall
Return rewrite *gomock.Call.Return
type MockVMSetEnsureHostInPoolCall ¶ added in v1.32.0
MockVMSetEnsureHostInPoolCall wrap *gomock.Call
func (*MockVMSetEnsureHostInPoolCall) Do ¶ added in v1.32.0
func (c *MockVMSetEnsureHostInPoolCall) Do(f func(context.Context, *v1.Service, types.NodeName, string, string) (string, string, string, *v6.VirtualMachineScaleSetVM, error)) *MockVMSetEnsureHostInPoolCall
Do rewrite *gomock.Call.Do
func (*MockVMSetEnsureHostInPoolCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetEnsureHostInPoolCall) DoAndReturn(f func(context.Context, *v1.Service, types.NodeName, string, string) (string, string, string, *v6.VirtualMachineScaleSetVM, error)) *MockVMSetEnsureHostInPoolCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetEnsureHostInPoolCall) Return ¶ added in v1.32.0
func (c *MockVMSetEnsureHostInPoolCall) Return(arg0, arg1, arg2 string, arg3 *v6.VirtualMachineScaleSetVM, arg4 error) *MockVMSetEnsureHostInPoolCall
Return rewrite *gomock.Call.Return
type MockVMSetEnsureHostsInPoolCall ¶ added in v1.32.0
MockVMSetEnsureHostsInPoolCall wrap *gomock.Call
func (*MockVMSetEnsureHostsInPoolCall) Do ¶ added in v1.32.0
func (c *MockVMSetEnsureHostsInPoolCall) Do(f func(context.Context, *v1.Service, []*v1.Node, string, string) error) *MockVMSetEnsureHostsInPoolCall
Do rewrite *gomock.Call.Do
func (*MockVMSetEnsureHostsInPoolCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetEnsureHostsInPoolCall) DoAndReturn(f func(context.Context, *v1.Service, []*v1.Node, string, string) error) *MockVMSetEnsureHostsInPoolCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetEnsureHostsInPoolCall) Return ¶ added in v1.32.0
func (c *MockVMSetEnsureHostsInPoolCall) Return(arg0 error) *MockVMSetEnsureHostsInPoolCall
Return rewrite *gomock.Call.Return
type MockVMSetGetAgentPoolVMSetNamesCall ¶ added in v1.32.0
MockVMSetGetAgentPoolVMSetNamesCall wrap *gomock.Call
func (*MockVMSetGetAgentPoolVMSetNamesCall) Do ¶ added in v1.32.0
func (c *MockVMSetGetAgentPoolVMSetNamesCall) Do(f func(context.Context, []*v1.Node) ([]*string, error)) *MockVMSetGetAgentPoolVMSetNamesCall
Do rewrite *gomock.Call.Do
func (*MockVMSetGetAgentPoolVMSetNamesCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetGetAgentPoolVMSetNamesCall) DoAndReturn(f func(context.Context, []*v1.Node) ([]*string, error)) *MockVMSetGetAgentPoolVMSetNamesCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetGetAgentPoolVMSetNamesCall) Return ¶ added in v1.32.0
func (c *MockVMSetGetAgentPoolVMSetNamesCall) Return(arg0 []*string, arg1 error) *MockVMSetGetAgentPoolVMSetNamesCall
Return rewrite *gomock.Call.Return
type MockVMSetGetDataDisksCall ¶ added in v1.32.0
MockVMSetGetDataDisksCall wrap *gomock.Call
func (*MockVMSetGetDataDisksCall) Do ¶ added in v1.32.0
func (c *MockVMSetGetDataDisksCall) Do(f func(context.Context, types.NodeName, cache.AzureCacheReadType) ([]*v6.DataDisk, *string, error)) *MockVMSetGetDataDisksCall
Do rewrite *gomock.Call.Do
func (*MockVMSetGetDataDisksCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetGetDataDisksCall) DoAndReturn(f func(context.Context, types.NodeName, cache.AzureCacheReadType) ([]*v6.DataDisk, *string, error)) *MockVMSetGetDataDisksCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetGetDataDisksCall) Return ¶ added in v1.32.0
func (c *MockVMSetGetDataDisksCall) Return(arg0 []*v6.DataDisk, arg1 *string, arg2 error) *MockVMSetGetDataDisksCall
Return rewrite *gomock.Call.Return
type MockVMSetGetIPByNodeNameCall ¶ added in v1.32.0
MockVMSetGetIPByNodeNameCall wrap *gomock.Call
func (*MockVMSetGetIPByNodeNameCall) Do ¶ added in v1.32.0
func (c *MockVMSetGetIPByNodeNameCall) Do(f func(context.Context, string) (string, string, error)) *MockVMSetGetIPByNodeNameCall
Do rewrite *gomock.Call.Do
func (*MockVMSetGetIPByNodeNameCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetGetIPByNodeNameCall) DoAndReturn(f func(context.Context, string) (string, string, error)) *MockVMSetGetIPByNodeNameCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetGetIPByNodeNameCall) Return ¶ added in v1.32.0
func (c *MockVMSetGetIPByNodeNameCall) Return(arg0, arg1 string, arg2 error) *MockVMSetGetIPByNodeNameCall
Return rewrite *gomock.Call.Return
type MockVMSetGetInstanceIDByNodeNameCall ¶ added in v1.32.0
MockVMSetGetInstanceIDByNodeNameCall wrap *gomock.Call
func (*MockVMSetGetInstanceIDByNodeNameCall) Do ¶ added in v1.32.0
func (c *MockVMSetGetInstanceIDByNodeNameCall) Do(f func(context.Context, string) (string, error)) *MockVMSetGetInstanceIDByNodeNameCall
Do rewrite *gomock.Call.Do
func (*MockVMSetGetInstanceIDByNodeNameCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetGetInstanceIDByNodeNameCall) DoAndReturn(f func(context.Context, string) (string, error)) *MockVMSetGetInstanceIDByNodeNameCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetGetInstanceIDByNodeNameCall) Return ¶ added in v1.32.0
func (c *MockVMSetGetInstanceIDByNodeNameCall) Return(arg0 string, arg1 error) *MockVMSetGetInstanceIDByNodeNameCall
Return rewrite *gomock.Call.Return
type MockVMSetGetInstanceTypeByNodeNameCall ¶ added in v1.32.0
MockVMSetGetInstanceTypeByNodeNameCall wrap *gomock.Call
func (*MockVMSetGetInstanceTypeByNodeNameCall) Do ¶ added in v1.32.0
func (c *MockVMSetGetInstanceTypeByNodeNameCall) Do(f func(context.Context, string) (string, error)) *MockVMSetGetInstanceTypeByNodeNameCall
Do rewrite *gomock.Call.Do
func (*MockVMSetGetInstanceTypeByNodeNameCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetGetInstanceTypeByNodeNameCall) DoAndReturn(f func(context.Context, string) (string, error)) *MockVMSetGetInstanceTypeByNodeNameCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetGetInstanceTypeByNodeNameCall) Return ¶ added in v1.32.0
func (c *MockVMSetGetInstanceTypeByNodeNameCall) Return(arg0 string, arg1 error) *MockVMSetGetInstanceTypeByNodeNameCall
Return rewrite *gomock.Call.Return
type MockVMSetGetNodeCIDRMasksByProviderIDCall ¶ added in v1.32.0
MockVMSetGetNodeCIDRMasksByProviderIDCall wrap *gomock.Call
func (*MockVMSetGetNodeCIDRMasksByProviderIDCall) Do ¶ added in v1.32.0
func (c *MockVMSetGetNodeCIDRMasksByProviderIDCall) Do(f func(context.Context, string) (int, int, error)) *MockVMSetGetNodeCIDRMasksByProviderIDCall
Do rewrite *gomock.Call.Do
func (*MockVMSetGetNodeCIDRMasksByProviderIDCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetGetNodeCIDRMasksByProviderIDCall) DoAndReturn(f func(context.Context, string) (int, int, error)) *MockVMSetGetNodeCIDRMasksByProviderIDCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetGetNodeCIDRMasksByProviderIDCall) Return ¶ added in v1.32.0
func (c *MockVMSetGetNodeCIDRMasksByProviderIDCall) Return(arg0, arg1 int, arg2 error) *MockVMSetGetNodeCIDRMasksByProviderIDCall
Return rewrite *gomock.Call.Return
type MockVMSetGetNodeNameByIPConfigurationIDCall ¶ added in v1.32.0
MockVMSetGetNodeNameByIPConfigurationIDCall wrap *gomock.Call
func (*MockVMSetGetNodeNameByIPConfigurationIDCall) Do ¶ added in v1.32.0
func (c *MockVMSetGetNodeNameByIPConfigurationIDCall) Do(f func(context.Context, string) (string, string, error)) *MockVMSetGetNodeNameByIPConfigurationIDCall
Do rewrite *gomock.Call.Do
func (*MockVMSetGetNodeNameByIPConfigurationIDCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetGetNodeNameByIPConfigurationIDCall) DoAndReturn(f func(context.Context, string) (string, string, error)) *MockVMSetGetNodeNameByIPConfigurationIDCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetGetNodeNameByIPConfigurationIDCall) Return ¶ added in v1.32.0
func (c *MockVMSetGetNodeNameByIPConfigurationIDCall) Return(arg0, arg1 string, arg2 error) *MockVMSetGetNodeNameByIPConfigurationIDCall
Return rewrite *gomock.Call.Return
type MockVMSetGetNodeNameByProviderIDCall ¶ added in v1.32.0
MockVMSetGetNodeNameByProviderIDCall wrap *gomock.Call
func (*MockVMSetGetNodeNameByProviderIDCall) Do ¶ added in v1.32.0
func (c *MockVMSetGetNodeNameByProviderIDCall) Do(f func(context.Context, string) (types.NodeName, error)) *MockVMSetGetNodeNameByProviderIDCall
Do rewrite *gomock.Call.Do
func (*MockVMSetGetNodeNameByProviderIDCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetGetNodeNameByProviderIDCall) DoAndReturn(f func(context.Context, string) (types.NodeName, error)) *MockVMSetGetNodeNameByProviderIDCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetGetNodeNameByProviderIDCall) Return ¶ added in v1.32.0
func (c *MockVMSetGetNodeNameByProviderIDCall) Return(arg0 types.NodeName, arg1 error) *MockVMSetGetNodeNameByProviderIDCall
Return rewrite *gomock.Call.Return
type MockVMSetGetNodeVMSetNameCall ¶ added in v1.32.0
MockVMSetGetNodeVMSetNameCall wrap *gomock.Call
func (*MockVMSetGetNodeVMSetNameCall) Do ¶ added in v1.32.0
func (c *MockVMSetGetNodeVMSetNameCall) Do(f func(context.Context, *v1.Node) (string, error)) *MockVMSetGetNodeVMSetNameCall
Do rewrite *gomock.Call.Do
func (*MockVMSetGetNodeVMSetNameCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetGetNodeVMSetNameCall) DoAndReturn(f func(context.Context, *v1.Node) (string, error)) *MockVMSetGetNodeVMSetNameCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetGetNodeVMSetNameCall) Return ¶ added in v1.32.0
func (c *MockVMSetGetNodeVMSetNameCall) Return(arg0 string, arg1 error) *MockVMSetGetNodeVMSetNameCall
Return rewrite *gomock.Call.Return
type MockVMSetGetPowerStatusByNodeNameCall ¶ added in v1.32.0
MockVMSetGetPowerStatusByNodeNameCall wrap *gomock.Call
func (*MockVMSetGetPowerStatusByNodeNameCall) Do ¶ added in v1.32.0
func (c *MockVMSetGetPowerStatusByNodeNameCall) Do(f func(context.Context, string) (string, error)) *MockVMSetGetPowerStatusByNodeNameCall
Do rewrite *gomock.Call.Do
func (*MockVMSetGetPowerStatusByNodeNameCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetGetPowerStatusByNodeNameCall) DoAndReturn(f func(context.Context, string) (string, error)) *MockVMSetGetPowerStatusByNodeNameCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetGetPowerStatusByNodeNameCall) Return ¶ added in v1.32.0
func (c *MockVMSetGetPowerStatusByNodeNameCall) Return(arg0 string, arg1 error) *MockVMSetGetPowerStatusByNodeNameCall
Return rewrite *gomock.Call.Return
type MockVMSetGetPrimaryInterfaceCall ¶ added in v1.32.0
MockVMSetGetPrimaryInterfaceCall wrap *gomock.Call
func (*MockVMSetGetPrimaryInterfaceCall) Do ¶ added in v1.32.0
func (c *MockVMSetGetPrimaryInterfaceCall) Do(f func(context.Context, string) (*v60.Interface, error)) *MockVMSetGetPrimaryInterfaceCall
Do rewrite *gomock.Call.Do
func (*MockVMSetGetPrimaryInterfaceCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetGetPrimaryInterfaceCall) DoAndReturn(f func(context.Context, string) (*v60.Interface, error)) *MockVMSetGetPrimaryInterfaceCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetGetPrimaryInterfaceCall) Return ¶ added in v1.32.0
func (c *MockVMSetGetPrimaryInterfaceCall) Return(arg0 *v60.Interface, arg1 error) *MockVMSetGetPrimaryInterfaceCall
Return rewrite *gomock.Call.Return
type MockVMSetGetPrimaryVMSetNameCall ¶ added in v1.32.0
MockVMSetGetPrimaryVMSetNameCall wrap *gomock.Call
func (*MockVMSetGetPrimaryVMSetNameCall) Do ¶ added in v1.32.0
func (c *MockVMSetGetPrimaryVMSetNameCall) Do(f func() string) *MockVMSetGetPrimaryVMSetNameCall
Do rewrite *gomock.Call.Do
func (*MockVMSetGetPrimaryVMSetNameCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetGetPrimaryVMSetNameCall) DoAndReturn(f func() string) *MockVMSetGetPrimaryVMSetNameCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetGetPrimaryVMSetNameCall) Return ¶ added in v1.32.0
func (c *MockVMSetGetPrimaryVMSetNameCall) Return(arg0 string) *MockVMSetGetPrimaryVMSetNameCall
Return rewrite *gomock.Call.Return
type MockVMSetGetPrivateIPsByNodeNameCall ¶ added in v1.32.0
MockVMSetGetPrivateIPsByNodeNameCall wrap *gomock.Call
func (*MockVMSetGetPrivateIPsByNodeNameCall) Do ¶ added in v1.32.0
func (c *MockVMSetGetPrivateIPsByNodeNameCall) Do(f func(context.Context, string) ([]string, error)) *MockVMSetGetPrivateIPsByNodeNameCall
Do rewrite *gomock.Call.Do
func (*MockVMSetGetPrivateIPsByNodeNameCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetGetPrivateIPsByNodeNameCall) DoAndReturn(f func(context.Context, string) ([]string, error)) *MockVMSetGetPrivateIPsByNodeNameCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetGetPrivateIPsByNodeNameCall) Return ¶ added in v1.32.0
func (c *MockVMSetGetPrivateIPsByNodeNameCall) Return(arg0 []string, arg1 error) *MockVMSetGetPrivateIPsByNodeNameCall
Return rewrite *gomock.Call.Return
type MockVMSetGetProvisioningStateByNodeNameCall ¶ added in v1.32.0
MockVMSetGetProvisioningStateByNodeNameCall wrap *gomock.Call
func (*MockVMSetGetProvisioningStateByNodeNameCall) Do ¶ added in v1.32.0
func (c *MockVMSetGetProvisioningStateByNodeNameCall) Do(f func(context.Context, string) (string, error)) *MockVMSetGetProvisioningStateByNodeNameCall
Do rewrite *gomock.Call.Do
func (*MockVMSetGetProvisioningStateByNodeNameCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetGetProvisioningStateByNodeNameCall) DoAndReturn(f func(context.Context, string) (string, error)) *MockVMSetGetProvisioningStateByNodeNameCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetGetProvisioningStateByNodeNameCall) Return ¶ added in v1.32.0
func (c *MockVMSetGetProvisioningStateByNodeNameCall) Return(arg0 string, arg1 error) *MockVMSetGetProvisioningStateByNodeNameCall
Return rewrite *gomock.Call.Return
type MockVMSetGetVMSetNamesCall ¶ added in v1.32.0
MockVMSetGetVMSetNamesCall wrap *gomock.Call
func (*MockVMSetGetVMSetNamesCall) Do ¶ added in v1.32.0
func (c *MockVMSetGetVMSetNamesCall) Do(f func(context.Context, *v1.Service, []*v1.Node) ([]*string, error)) *MockVMSetGetVMSetNamesCall
Do rewrite *gomock.Call.Do
func (*MockVMSetGetVMSetNamesCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetGetVMSetNamesCall) DoAndReturn(f func(context.Context, *v1.Service, []*v1.Node) ([]*string, error)) *MockVMSetGetVMSetNamesCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetGetVMSetNamesCall) Return ¶ added in v1.32.0
func (c *MockVMSetGetVMSetNamesCall) Return(availabilitySetNames []*string, err error) *MockVMSetGetVMSetNamesCall
Return rewrite *gomock.Call.Return
type MockVMSetGetZoneByNodeNameCall ¶ added in v1.32.0
MockVMSetGetZoneByNodeNameCall wrap *gomock.Call
func (*MockVMSetGetZoneByNodeNameCall) Do ¶ added in v1.32.0
func (c *MockVMSetGetZoneByNodeNameCall) Do(f func(context.Context, string) (cloud_provider.Zone, error)) *MockVMSetGetZoneByNodeNameCall
Do rewrite *gomock.Call.Do
func (*MockVMSetGetZoneByNodeNameCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetGetZoneByNodeNameCall) DoAndReturn(f func(context.Context, string) (cloud_provider.Zone, error)) *MockVMSetGetZoneByNodeNameCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetGetZoneByNodeNameCall) Return ¶ added in v1.32.0
func (c *MockVMSetGetZoneByNodeNameCall) Return(arg0 cloud_provider.Zone, arg1 error) *MockVMSetGetZoneByNodeNameCall
Return rewrite *gomock.Call.Return
type MockVMSetMockRecorder ¶
type MockVMSetMockRecorder struct {
// contains filtered or unexported fields
}
MockVMSetMockRecorder is the mock recorder for MockVMSet.
func (*MockVMSetMockRecorder) AttachDisk ¶
func (mr *MockVMSetMockRecorder) AttachDisk(ctx, nodeName, diskMap any) *MockVMSetAttachDiskCall
AttachDisk indicates an expected call of AttachDisk.
func (*MockVMSetMockRecorder) DeleteCacheForNode ¶ added in v1.23.21
func (mr *MockVMSetMockRecorder) DeleteCacheForNode(ctx, nodeName any) *MockVMSetDeleteCacheForNodeCall
DeleteCacheForNode indicates an expected call of DeleteCacheForNode.
func (*MockVMSetMockRecorder) DetachDisk ¶
func (mr *MockVMSetMockRecorder) DetachDisk(ctx, nodeName, diskMap, forceDetach any) *MockVMSetDetachDiskCall
DetachDisk indicates an expected call of DetachDisk.
func (*MockVMSetMockRecorder) EnsureBackendPoolDeleted ¶
func (mr *MockVMSetMockRecorder) EnsureBackendPoolDeleted(ctx, service, backendPoolIDs, vmSetName, backendAddressPools, deleteFromVMSet any) *MockVMSetEnsureBackendPoolDeletedCall
EnsureBackendPoolDeleted indicates an expected call of EnsureBackendPoolDeleted.
func (*MockVMSetMockRecorder) EnsureBackendPoolDeletedFromVMSets ¶ added in v0.7.3
func (mr *MockVMSetMockRecorder) EnsureBackendPoolDeletedFromVMSets(ctx, vmSetNamesMap, backendPoolIDs any) *MockVMSetEnsureBackendPoolDeletedFromVMSetsCall
EnsureBackendPoolDeletedFromVMSets indicates an expected call of EnsureBackendPoolDeletedFromVMSets.
func (*MockVMSetMockRecorder) EnsureHostInPool ¶
func (mr *MockVMSetMockRecorder) EnsureHostInPool(ctx, service, nodeName, backendPoolID, vmSetName any) *MockVMSetEnsureHostInPoolCall
EnsureHostInPool indicates an expected call of EnsureHostInPool.
func (*MockVMSetMockRecorder) EnsureHostsInPool ¶
func (mr *MockVMSetMockRecorder) EnsureHostsInPool(ctx, service, nodes, backendPoolID, vmSetName any) *MockVMSetEnsureHostsInPoolCall
EnsureHostsInPool indicates an expected call of EnsureHostsInPool.
func (*MockVMSetMockRecorder) GetAgentPoolVMSetNames ¶ added in v0.7.3
func (mr *MockVMSetMockRecorder) GetAgentPoolVMSetNames(ctx, nodes any) *MockVMSetGetAgentPoolVMSetNamesCall
GetAgentPoolVMSetNames indicates an expected call of GetAgentPoolVMSetNames.
func (*MockVMSetMockRecorder) GetDataDisks ¶
func (mr *MockVMSetMockRecorder) GetDataDisks(ctx, nodeName, crt any) *MockVMSetGetDataDisksCall
GetDataDisks indicates an expected call of GetDataDisks.
func (*MockVMSetMockRecorder) GetIPByNodeName ¶
func (mr *MockVMSetMockRecorder) GetIPByNodeName(ctx, name any) *MockVMSetGetIPByNodeNameCall
GetIPByNodeName indicates an expected call of GetIPByNodeName.
func (*MockVMSetMockRecorder) GetInstanceIDByNodeName ¶
func (mr *MockVMSetMockRecorder) GetInstanceIDByNodeName(ctx, name any) *MockVMSetGetInstanceIDByNodeNameCall
GetInstanceIDByNodeName indicates an expected call of GetInstanceIDByNodeName.
func (*MockVMSetMockRecorder) GetInstanceTypeByNodeName ¶
func (mr *MockVMSetMockRecorder) GetInstanceTypeByNodeName(ctx, name any) *MockVMSetGetInstanceTypeByNodeNameCall
GetInstanceTypeByNodeName indicates an expected call of GetInstanceTypeByNodeName.
func (*MockVMSetMockRecorder) GetNodeCIDRMasksByProviderID ¶ added in v0.7.3
func (mr *MockVMSetMockRecorder) GetNodeCIDRMasksByProviderID(ctx, providerID any) *MockVMSetGetNodeCIDRMasksByProviderIDCall
GetNodeCIDRMasksByProviderID indicates an expected call of GetNodeCIDRMasksByProviderID.
func (*MockVMSetMockRecorder) GetNodeNameByIPConfigurationID ¶
func (mr *MockVMSetMockRecorder) GetNodeNameByIPConfigurationID(ctx, ipConfigurationID any) *MockVMSetGetNodeNameByIPConfigurationIDCall
GetNodeNameByIPConfigurationID indicates an expected call of GetNodeNameByIPConfigurationID.
func (*MockVMSetMockRecorder) GetNodeNameByProviderID ¶
func (mr *MockVMSetMockRecorder) GetNodeNameByProviderID(ctx, providerID any) *MockVMSetGetNodeNameByProviderIDCall
GetNodeNameByProviderID indicates an expected call of GetNodeNameByProviderID.
func (*MockVMSetMockRecorder) GetNodeVMSetName ¶ added in v1.23.0
func (mr *MockVMSetMockRecorder) GetNodeVMSetName(ctx, node any) *MockVMSetGetNodeVMSetNameCall
GetNodeVMSetName indicates an expected call of GetNodeVMSetName.
func (*MockVMSetMockRecorder) GetPowerStatusByNodeName ¶
func (mr *MockVMSetMockRecorder) GetPowerStatusByNodeName(ctx, name any) *MockVMSetGetPowerStatusByNodeNameCall
GetPowerStatusByNodeName indicates an expected call of GetPowerStatusByNodeName.
func (*MockVMSetMockRecorder) GetPrimaryInterface ¶
func (mr *MockVMSetMockRecorder) GetPrimaryInterface(ctx, nodeName any) *MockVMSetGetPrimaryInterfaceCall
GetPrimaryInterface indicates an expected call of GetPrimaryInterface.
func (*MockVMSetMockRecorder) GetPrimaryVMSetName ¶
func (mr *MockVMSetMockRecorder) GetPrimaryVMSetName() *MockVMSetGetPrimaryVMSetNameCall
GetPrimaryVMSetName indicates an expected call of GetPrimaryVMSetName.
func (*MockVMSetMockRecorder) GetPrivateIPsByNodeName ¶
func (mr *MockVMSetMockRecorder) GetPrivateIPsByNodeName(ctx, name any) *MockVMSetGetPrivateIPsByNodeNameCall
GetPrivateIPsByNodeName indicates an expected call of GetPrivateIPsByNodeName.
func (*MockVMSetMockRecorder) GetProvisioningStateByNodeName ¶ added in v0.7.7
func (mr *MockVMSetMockRecorder) GetProvisioningStateByNodeName(ctx, name any) *MockVMSetGetProvisioningStateByNodeNameCall
GetProvisioningStateByNodeName indicates an expected call of GetProvisioningStateByNodeName.
func (*MockVMSetMockRecorder) GetVMSetNames ¶
func (mr *MockVMSetMockRecorder) GetVMSetNames(ctx, service, nodes any) *MockVMSetGetVMSetNamesCall
GetVMSetNames indicates an expected call of GetVMSetNames.
func (*MockVMSetMockRecorder) GetZoneByNodeName ¶
func (mr *MockVMSetMockRecorder) GetZoneByNodeName(ctx, name any) *MockVMSetGetZoneByNodeNameCall
GetZoneByNodeName indicates an expected call of GetZoneByNodeName.
func (*MockVMSetMockRecorder) RefreshCaches ¶ added in v1.32.0
func (mr *MockVMSetMockRecorder) RefreshCaches() *MockVMSetRefreshCachesCall
RefreshCaches indicates an expected call of RefreshCaches.
func (*MockVMSetMockRecorder) UpdateVM ¶ added in v0.7.3
func (mr *MockVMSetMockRecorder) UpdateVM(ctx, nodeName any) *MockVMSetUpdateVMCall
UpdateVM indicates an expected call of UpdateVM.
type MockVMSetRefreshCachesCall ¶ added in v1.32.0
MockVMSetRefreshCachesCall wrap *gomock.Call
func (*MockVMSetRefreshCachesCall) Do ¶ added in v1.32.0
func (c *MockVMSetRefreshCachesCall) Do(f func() error) *MockVMSetRefreshCachesCall
Do rewrite *gomock.Call.Do
func (*MockVMSetRefreshCachesCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetRefreshCachesCall) DoAndReturn(f func() error) *MockVMSetRefreshCachesCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetRefreshCachesCall) Return ¶ added in v1.32.0
func (c *MockVMSetRefreshCachesCall) Return(arg0 error) *MockVMSetRefreshCachesCall
Return rewrite *gomock.Call.Return
type MockVMSetUpdateVMCall ¶ added in v1.32.0
MockVMSetUpdateVMCall wrap *gomock.Call
func (*MockVMSetUpdateVMCall) Do ¶ added in v1.32.0
func (c *MockVMSetUpdateVMCall) Do(f func(context.Context, types.NodeName) error) *MockVMSetUpdateVMCall
Do rewrite *gomock.Call.Do
func (*MockVMSetUpdateVMCall) DoAndReturn ¶ added in v1.32.0
func (c *MockVMSetUpdateVMCall) DoAndReturn(f func(context.Context, types.NodeName) error) *MockVMSetUpdateVMCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockVMSetUpdateVMCall) Return ¶ added in v1.32.0
func (c *MockVMSetUpdateVMCall) Return(arg0 error) *MockVMSetUpdateVMCall
Return rewrite *gomock.Call.Return
type NetworkData ¶
type NetworkData struct { IPAddress []IPAddress `json:"ipAddress"` Subnet []Subnet `json:"subnet"` }
NetworkData contains IP information for a armnetwork.
type NetworkInterface ¶
type NetworkInterface struct { IPV4 NetworkData `json:"ipv4"` IPV6 NetworkData `json:"ipv6"` MAC string `json:"macAddress"` }
NetworkInterface represents an instances network interface.
type NetworkMetadata ¶
type NetworkMetadata struct {
Interface []*NetworkInterface `json:"interface"`
}
NetworkMetadata contains metadata about an instance's network
type NonVmssUniformNodesEntry ¶ added in v1.26.0
type NonVmssUniformNodesEntry struct { VMSSFlexVMNodeNames *utilsets.IgnoreCaseSet VMSSFlexVMProviderIDs *utilsets.IgnoreCaseSet AvSetVMNodeNames *utilsets.IgnoreCaseSet AvSetVMProviderIDs *utilsets.IgnoreCaseSet ClusterNodeNames *utilsets.IgnoreCaseSet }
type PublicIPMetadata ¶ added in v0.7.3
type PublicIPMetadata struct { FrontendIPAddress string `json:"frontendIpAddress,omitempty"` PrivateIPAddress string `json:"privateIpAddress,omitempty"` }
PublicIPMetadata represents the public IP metadata.
type ScaleSet ¶ added in v0.7.3
type ScaleSet struct { *Cloud // contains filtered or unexported fields }
ScaleSet implements VMSet interface for Azure scale set.
func NewTestScaleSet ¶ added in v0.7.3
func NewTestScaleSet(ctrl *gomock.Controller) (*ScaleSet, error)
NewTestScaleSet creates a fake ScaleSet for unit test
func (*ScaleSet) AttachDisk ¶ added in v0.7.3
func (ss *ScaleSet) AttachDisk(ctx context.Context, nodeName types.NodeName, diskMap map[string]*AttachDiskOptions) error
AttachDisk attaches a disk to vm
func (*ScaleSet) DeleteCacheForNode ¶ added in v1.1.24
DeleteCacheForNode deletes Node from VMSS VM and VM caches.
func (*ScaleSet) DetachDisk ¶ added in v0.7.3
func (ss *ScaleSet) DetachDisk(ctx context.Context, nodeName types.NodeName, diskMap map[string]string, forceDetach bool) error
DetachDisk detaches a disk from VM
func (*ScaleSet) EnsureBackendPoolDeleted ¶ added in v0.7.3
func (ss *ScaleSet) EnsureBackendPoolDeleted(ctx context.Context, service *v1.Service, backendPoolIDs []string, vmSetName string, backendAddressPools []*armnetwork.BackendAddressPool, deleteFromVMSet bool) (bool, error)
EnsureBackendPoolDeleted ensures the loadBalancer backendAddressPools deleted from the specified nodes.
func (*ScaleSet) EnsureBackendPoolDeletedFromVMSets ¶ added in v0.7.3
func (ss *ScaleSet) EnsureBackendPoolDeletedFromVMSets(ctx context.Context, vmssNamesMap map[string]bool, backendPoolIDs []string) error
EnsureBackendPoolDeletedFromVMSets ensures the loadBalancer backendAddressPools deleted from the specified VMSS
func (*ScaleSet) EnsureHostInPool ¶ added in v0.7.3
func (ss *ScaleSet) EnsureHostInPool(ctx context.Context, _ *v1.Service, nodeName types.NodeName, backendPoolID string, vmSetNameOfLB string) (string, string, string, *armcompute.VirtualMachineScaleSetVM, error)
EnsureHostInPool ensures the given VM's Primary NIC's Primary IP Configuration is participating in the specified LoadBalancer Backend Pool, which returns (resourceGroup, vmasName, instanceID, vmssVM, error).
func (*ScaleSet) EnsureHostsInPool ¶ added in v0.7.3
func (ss *ScaleSet) EnsureHostsInPool(ctx context.Context, service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetNameOfLB string) error
EnsureHostsInPool ensures the given Node's primary IP configurations are participating in the specified LoadBalancer Backend Pool.
func (*ScaleSet) GetAgentPoolVMSetNames ¶ added in v0.7.3
func (ss *ScaleSet) GetAgentPoolVMSetNames(ctx context.Context, nodes []*v1.Node) ([]*string, error)
GetAgentPoolVMSetNames returns all VMSS/VMAS names according to the nodes. We need to include the VMAS here because some of the cluster provisioning tools like capz allows mixed instance type.
func (*ScaleSet) GetDataDisks ¶ added in v0.7.3
func (ss *ScaleSet) GetDataDisks(ctx context.Context, nodeName types.NodeName, crt azcache.AzureCacheReadType) ([]*armcompute.DataDisk, *string, error)
GetDataDisks gets a list of data disks attached to the node.
func (*ScaleSet) GetIPByNodeName ¶ added in v0.7.3
GetIPByNodeName gets machine private IP and public IP by node name.
func (*ScaleSet) GetInstanceIDByNodeName ¶ added in v0.7.3
GetInstanceIDByNodeName gets the cloud provider ID by node name. It must return ("", cloudprovider.InstanceNotFound) if the instance does not exist or is no longer running.
func (*ScaleSet) GetInstanceTypeByNodeName ¶ added in v0.7.3
GetInstanceTypeByNodeName gets the instance type by node name.
func (*ScaleSet) GetNodeCIDRMasksByProviderID ¶ added in v0.7.3
func (ss *ScaleSet) GetNodeCIDRMasksByProviderID(ctx context.Context, providerID string) (int, int, error)
GetNodeCIDRMaskByProviderID returns the node CIDR subnet mask by provider ID.
func (*ScaleSet) GetNodeNameByIPConfigurationID ¶ added in v0.7.3
func (ss *ScaleSet) GetNodeNameByIPConfigurationID(ctx context.Context, ipConfigurationID string) (string, string, error)
GetNodeNameByIPConfigurationID gets the node name and the VMSS name by IP configuration ID.
func (*ScaleSet) GetNodeNameByProviderID ¶ added in v0.7.3
func (ss *ScaleSet) GetNodeNameByProviderID(ctx context.Context, providerID string) (types.NodeName, error)
GetNodeNameByProviderID gets the node name by provider ID. providerID example: 1. vmas providerID: azure:///subscriptions/subsid/resourceGroups/rg/providers/Microsoft.Compute/virtualMachines/aks-nodepool1-27053986-0 2. vmss providerID: azure:///subscriptions/subsid/resourceGroups/rg/providers/Microsoft.Compute/virtualMachineScaleSets/aks-agentpool-22126781-vmss/virtualMachines/1 /subscriptions/subsid/resourceGroups/rg/providers/Microsoft.Compute/virtualMachineScaleSets/aks-agentpool-22126781-vmss/virtualMachines/k8s-agentpool-36841236-vmss_1
func (*ScaleSet) GetNodeVMSetName ¶ added in v1.23.0
func (*ScaleSet) GetPowerStatusByNodeName ¶ added in v0.7.3
func (ss *ScaleSet) GetPowerStatusByNodeName(ctx context.Context, name string) (powerState string, err error)
GetPowerStatusByNodeName returns the power state of the specified node.
func (*ScaleSet) GetPrimaryInterface ¶ added in v0.7.3
func (ss *ScaleSet) GetPrimaryInterface(ctx context.Context, nodeName string) (*armnetwork.Interface, error)
GetPrimaryInterface gets machine primary network interface by node name and vmSet.
func (*ScaleSet) GetPrimaryVMSetName ¶ added in v0.7.3
GetPrimaryVMSetName returns the VM set name depending on the configured vmType. It returns config.PrimaryScaleSetName for vmss and config.PrimaryAvailabilitySetName for standard vmType.
func (*ScaleSet) GetPrivateIPsByNodeName ¶ added in v0.7.3
returns a list of private ips assigned to node TODO (khenidak): This should read all nics, not just the primary allowing users to split ipv4/v6 on multiple nics
func (*ScaleSet) GetProvisioningStateByNodeName ¶ added in v0.7.7
func (ss *ScaleSet) GetProvisioningStateByNodeName(ctx context.Context, name string) (provisioningState string, err error)
GetProvisioningStateByNodeName returns the provisioningState for the specified node.
func (*ScaleSet) GetVMSetNames ¶ added in v0.7.3
func (ss *ScaleSet) GetVMSetNames(ctx context.Context, service *v1.Service, nodes []*v1.Node) ([]*string, error)
GetVMSetNames selects all possible scale sets for service load balancer. If the service has no loadbalancer mode annotation returns the primary VMSet. If service annotation for loadbalancer exists then return the eligible VMSet.
func (*ScaleSet) GetZoneByNodeName ¶ added in v0.7.3
GetZoneByNodeName gets availability zone for the specified node. If the node is not running with availability zone, then it returns fault domain.
func (*ScaleSet) RefreshCaches ¶ added in v1.32.0
RefreshCaches invalidates and renew all related caches.
type VMManagementType ¶ added in v1.25.16
type VMManagementType string
const ( ManagedByVmssUniform VMManagementType = "ManagedByVmssUniform" ManagedByVmssFlex VMManagementType = "ManagedByVmssFlex" ManagedByAvSet VMManagementType = "ManagedByAvSet" ManagedByUnknownVMSet VMManagementType = "ManagedByUnknownVMSet" )
type VMSSVirtualMachineEntry ¶ added in v1.23.26
type VMSet ¶
type VMSet interface { // GetInstanceIDByNodeName gets the cloud provider ID by node name. // It must return ("", cloudprovider.InstanceNotFound) if the instance does // not exist or is no longer running. GetInstanceIDByNodeName(ctx context.Context, name string) (string, error) // GetInstanceTypeByNodeName gets the instance type by node name. GetInstanceTypeByNodeName(ctx context.Context, name string) (string, error) // GetIPByNodeName gets machine private IP and public IP by node name. GetIPByNodeName(ctx context.Context, name string) (string, string, error) // GetPrimaryInterface gets machine primary network interface by node name. GetPrimaryInterface(ctx context.Context, nodeName string) (*armnetwork.Interface, error) // GetNodeNameByProviderID gets the node name by provider ID. GetNodeNameByProviderID(ctx context.Context, providerID string) (types.NodeName, error) // GetZoneByNodeName gets cloudprovider.Zone by node name. GetZoneByNodeName(ctx context.Context, name string) (cloudprovider.Zone, error) // GetPrimaryVMSetName returns the VM set name depending on the configured vmType. // It returns config.PrimaryScaleSetName for vmss and config.PrimaryAvailabilitySetName for standard vmType. GetPrimaryVMSetName() string // GetVMSetNames selects all possible availability sets or scale sets // (depending vmType configured) for service load balancer, if the service has // no loadbalancer mode annotation returns the primary VMSet. If service annotation // for loadbalancer exists then return the eligible VMSet. GetVMSetNames(ctx context.Context, service *v1.Service, nodes []*v1.Node) (availabilitySetNames []*string, err error) // GetNodeVMSetName returns the availability set or vmss name by the node name. // It will return empty string when using standalone vms. GetNodeVMSetName(ctx context.Context, node *v1.Node) (string, error) // EnsureHostsInPool ensures the given Node's primary IP configurations are // participating in the specified LoadBalancer Backend Pool. EnsureHostsInPool(ctx context.Context, service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetName string) error // EnsureHostInPool ensures the given VM's Primary NIC's Primary IP Configuration is // participating in the specified LoadBalancer Backend Pool. EnsureHostInPool(ctx context.Context, service *v1.Service, nodeName types.NodeName, backendPoolID string, vmSetName string) (string, string, string, *armcompute.VirtualMachineScaleSetVM, error) // EnsureBackendPoolDeleted ensures the loadBalancer backendAddressPools deleted from the specified nodes. EnsureBackendPoolDeleted(ctx context.Context, service *v1.Service, backendPoolIDs []string, vmSetName string, backendAddressPools []*armnetwork.BackendAddressPool, deleteFromVMSet bool) (bool, error) // EnsureBackendPoolDeletedFromVMSets ensures the loadBalancer backendAddressPools deleted from the specified VMSS/VMAS EnsureBackendPoolDeletedFromVMSets(ctx context.Context, vmSetNamesMap map[string]bool, backendPoolIDs []string) error // AttachDisk attaches a disk to vm AttachDisk(ctx context.Context, nodeName types.NodeName, diskMap map[string]*AttachDiskOptions) error // DetachDisk detaches a disk from vm DetachDisk(ctx context.Context, nodeName types.NodeName, diskMap map[string]string, forceDetach bool) error // GetDataDisks gets a list of data disks attached to the node. GetDataDisks(ctx context.Context, nodeName types.NodeName, crt azcache.AzureCacheReadType) ([]*armcompute.DataDisk, *string, error) // UpdateVM updates a vm UpdateVM(ctx context.Context, nodeName types.NodeName) error // GetPowerStatusByNodeName returns the powerState for the specified node. GetPowerStatusByNodeName(ctx context.Context, name string) (string, error) // GetProvisioningStateByNodeName returns the provisioningState for the specified node. GetProvisioningStateByNodeName(ctx context.Context, name string) (string, error) // GetPrivateIPsByNodeName returns a slice of all private ips assigned to node (ipv6 and ipv4) GetPrivateIPsByNodeName(ctx context.Context, name string) ([]string, error) // GetNodeNameByIPConfigurationID gets the nodeName and vmSetName by IP configuration ID. GetNodeNameByIPConfigurationID(ctx context.Context, ipConfigurationID string) (string, string, error) // GetNodeCIDRMasksByProviderID returns the node CIDR subnet mask by provider ID. GetNodeCIDRMasksByProviderID(ctx context.Context, providerID string) (int, int, error) // GetAgentPoolVMSetNames returns all vmSet names according to the nodes GetAgentPoolVMSetNames(ctx context.Context, nodes []*v1.Node) ([]*string, error) // DeleteCacheForNode removes the node entry from cache. DeleteCacheForNode(ctx context.Context, nodeName string) error // RefreshCaches invalidates and renew all related caches. RefreshCaches() error }
VMSet defines functions all vmsets (including scale set and availability set) should be implemented. Don't forget to run the following command to generate the mock client: mockgen -destination=$GOPATH/src/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_mock_vmsets.go -source=$GOPATH/src/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmsets.go -package=provider VMSet
Source Files ¶
- azure.go
- azure_backoff.go
- azure_controller_common.go
- azure_controller_standard.go
- azure_controller_vmss.go
- azure_controller_vmssflex.go
- azure_fakes.go
- azure_instance_metadata.go
- azure_instances_v1.go
- azure_instances_v2.go
- azure_interface_repo.go
- azure_loadbalancer.go
- azure_loadbalancer_accesscontrol.go
- azure_loadbalancer_backendpool.go
- azure_loadbalancer_healthprobe.go
- azure_loadbalancer_repo.go
- azure_local_services.go
- azure_lock.go
- azure_mock_loadbalancer_backendpool.go
- azure_mock_vmsets.go
- azure_privatelinkservice.go
- azure_publicip_repo.go
- azure_routes.go
- azure_standard.go
- azure_utils.go
- azure_vmsets.go
- azure_vmsets_repo.go
- azure_vmss.go
- azure_vmss_cache.go
- azure_vmss_repo.go
- azure_vmssflex.go
- azure_vmssflex_cache.go
- azure_wrap.go
- azure_zones.go
- doc.go
Directories ¶
Path | Synopsis |
---|---|
Package auth provides a general library to authorize Azure ARM clients.
|
Package auth provides a general library to authorize Azure ARM clients. |
Code generated by MockGen.
|
Code generated by MockGen. |
Code generated by MockGen.
|
Code generated by MockGen. |
Package securitygroup is a generated GoMock package.
|
Package securitygroup is a generated GoMock package. |
fileservice/mock_fileservice
Package mock_fileservice is a generated GoMock package.
|
Package mock_fileservice is a generated GoMock package. |
Package subnet is a generated GoMock package.
|
Package subnet is a generated GoMock package. |
Code generated by MockGen.
|
Code generated by MockGen. |