Documentation ¶
Index ¶
- Constants
- func IsClusterNamespaceAllowed(ctx context.Context, k8sClient client.Client, ...) bool
- type AzureClients
- type AzureClusterCredentialsProvider
- type AzureCredentialsProvider
- func (p *AzureCredentialsProvider) GetAuthorizer(ctx context.Context, resourceManagerEndpoint, activeDirectoryEndpoint string, ...) (autorest.Authorizer, error)
- func (p *AzureCredentialsProvider) GetClientID() string
- func (p *AzureCredentialsProvider) GetClientSecret(ctx context.Context) (string, error)
- func (p *AzureCredentialsProvider) GetTenantID() string
- type ClusterScope
- func (s *ClusterScope) APIServerHost() string
- func (s *ClusterScope) APIServerLB() *infrav1.LoadBalancerSpec
- func (s *ClusterScope) APIServerLBName() string
- func (s *ClusterScope) APIServerLBPoolName(loadBalancerName string) string
- func (s *ClusterScope) APIServerPort() int32
- func (s *ClusterScope) APIServerPrivateIP() string
- func (s *ClusterScope) APIServerPublicIP() *infrav1.PublicIPSpec
- func (s *ClusterScope) AdditionalTags() infrav1.Tags
- func (s *ClusterScope) AnnotationJSON(annotation string) (map[string]interface{}, error)
- func (s *ClusterScope) Authorizer() autorest.Authorizer
- func (s *ClusterScope) AvailabilitySetEnabled() bool
- func (s *ClusterScope) BaseURI() string
- func (s *ClusterScope) BastionSpec() azure.BastionSpec
- func (s *ClusterScope) Close(ctx context.Context) error
- func (s *ClusterScope) CloudProviderConfigOverrides() *infrav1.CloudProviderConfigOverrides
- func (s *ClusterScope) ClusterName() string
- func (s *ClusterScope) ControlPlaneOutboundLB() *infrav1.LoadBalancerSpec
- func (s *ClusterScope) ControlPlaneRouteTable() infrav1.RouteTable
- func (s *ClusterScope) ControlPlaneSubnet() infrav1.SubnetSpec
- func (s *ClusterScope) DeleteLongRunningOperationState(name, service string)
- func (s *ClusterScope) FailureDomains() []string
- func (s *ClusterScope) GenerateFQDN(ipName string) string
- func (s *ClusterScope) GenerateLegacyFQDN() (string, string)
- func (s *ClusterScope) GetLongRunningOperationState(name, service string) *infrav1.Future
- func (s *ClusterScope) GetPrivateDNSZoneName() string
- func (s *ClusterScope) GroupSpec() azure.ResourceSpecGetter
- func (s *ClusterScope) IsAPIServerPrivate() bool
- func (s *ClusterScope) IsIPv6Enabled() bool
- func (s *ClusterScope) IsVnetManaged() bool
- func (s *ClusterScope) LBSpecs() []azure.LBSpec
- func (s *ClusterScope) ListOptionsLabelSelector() client.ListOption
- func (s *ClusterScope) Location() string
- func (s *ClusterScope) NSGSpecs() []azure.NSGSpec
- func (s *ClusterScope) Namespace() string
- func (s *ClusterScope) NatGatewaySpecs() []azure.NatGatewaySpec
- func (s *ClusterScope) NodeOutboundLB() *infrav1.LoadBalancerSpec
- func (s *ClusterScope) NodeOutboundLBName() string
- func (s *ClusterScope) NodeSubnets() []infrav1.SubnetSpec
- func (s *ClusterScope) OutboundLBName(role string) string
- func (s *ClusterScope) OutboundPoolName(loadBalancerName string) string
- func (s *ClusterScope) PatchObject(ctx context.Context) error
- func (s *ClusterScope) PrivateDNSSpec() *azure.PrivateDNSSpec
- func (s *ClusterScope) PublicIPSpecs() []azure.PublicIPSpec
- func (s *ClusterScope) ResourceGroup() string
- func (s *ClusterScope) RouteTableSpecs() []azure.RouteTableSpec
- func (s *ClusterScope) SetAnnotation(key, value string)
- func (s *ClusterScope) SetControlPlaneSecurityRules()
- func (s *ClusterScope) SetDNSName()
- func (s *ClusterScope) SetFailureDomain(id string, spec clusterv1.FailureDomainSpec)
- func (s *ClusterScope) SetLongRunningOperationState(future *infrav1.Future)
- func (s *ClusterScope) SetSubnet(subnetSpec infrav1.SubnetSpec)
- func (s *ClusterScope) Subnet(name string) infrav1.SubnetSpec
- func (s *ClusterScope) SubnetSpecs() []azure.SubnetSpec
- func (s *ClusterScope) Subnets() infrav1.Subnets
- func (s *ClusterScope) TagsSpecs() []azure.TagsSpec
- func (s *ClusterScope) UpdateAnnotationJSON(annotation string, content map[string]interface{}) error
- func (s *ClusterScope) UpdateDeleteStatus(condition clusterv1.ConditionType, service string, err error)
- func (s *ClusterScope) UpdatePatchStatus(condition clusterv1.ConditionType, service string, err error)
- func (s *ClusterScope) UpdatePutStatus(condition clusterv1.ConditionType, service string, err error)
- func (s *ClusterScope) VNetSpec() azure.VNetSpec
- func (s *ClusterScope) Vnet() *infrav1.VnetSpec
- func (s *ClusterScope) VnetPeeringSpecs() []azure.VnetPeeringSpec
- type ClusterScopeParams
- type CredentialsProvider
- type MachinePoolMachineScope
- func (s *MachinePoolMachineScope) Close(ctx context.Context) error
- func (s *MachinePoolMachineScope) CordonAndDrain(ctx context.Context) error
- func (s *MachinePoolMachineScope) DeleteLongRunningOperationState(name, service string)
- func (s *MachinePoolMachineScope) GetLongRunningOperationState(name, service string) *infrav1.Future
- func (s *MachinePoolMachineScope) InstanceID() string
- func (s *MachinePoolMachineScope) IsReady() bool
- func (s *MachinePoolMachineScope) Name() string
- func (s *MachinePoolMachineScope) ProviderID() string
- func (s *MachinePoolMachineScope) ProvisioningState() infrav1.ProvisioningState
- func (s *MachinePoolMachineScope) ScaleSetName() string
- func (s *MachinePoolMachineScope) SetFailureMessage(v error)
- func (s *MachinePoolMachineScope) SetFailureReason(v capierrors.MachineStatusError)
- func (s *MachinePoolMachineScope) SetLongRunningOperationState(future *infrav1.Future)
- func (s *MachinePoolMachineScope) SetVMSSVM(instance *azure.VMSSVM)
- func (s *MachinePoolMachineScope) UpdateDeleteStatus(condition clusterv1.ConditionType, service string, err error)
- func (s *MachinePoolMachineScope) UpdatePatchStatus(condition clusterv1.ConditionType, service string, err error)
- func (s *MachinePoolMachineScope) UpdatePutStatus(condition clusterv1.ConditionType, service string, err error)
- func (s *MachinePoolMachineScope) UpdateStatus(ctx context.Context) error
- type MachinePoolMachineScopeParams
- type MachinePoolScope
- func (m *MachinePoolScope) AdditionalTags() infrav1.Tags
- func (m *MachinePoolScope) Close(ctx context.Context) error
- func (m *MachinePoolScope) DeleteLongRunningOperationState(name, service string)
- func (m MachinePoolScope) DesiredReplicas() int32
- func (m *MachinePoolScope) GetBootstrapData(ctx context.Context) (string, error)
- func (m *MachinePoolScope) GetLongRunningOperationState(name, service string) *infrav1.Future
- func (m *MachinePoolScope) GetVMImage() (*infrav1.Image, error)
- func (m MachinePoolScope) MaxSurge() (int, error)
- func (m *MachinePoolScope) Name() string
- func (m *MachinePoolScope) NeedsRequeue() bool
- func (m *MachinePoolScope) PatchObject(ctx context.Context) error
- func (m *MachinePoolScope) ProviderID() string
- func (m *MachinePoolScope) ProvisioningState() infrav1.ProvisioningState
- func (m *MachinePoolScope) RoleAssignmentSpecs() []azure.RoleAssignmentSpec
- func (m *MachinePoolScope) SaveVMImageToStatus(image *infrav1.Image)
- func (m *MachinePoolScope) ScaleSetSpec() azure.ScaleSetSpec
- func (m *MachinePoolScope) SetAnnotation(key, value string)
- func (m *MachinePoolScope) SetBootstrapConditions(provisioningState string, extensionName string) error
- func (m *MachinePoolScope) SetFailureMessage(v error)
- func (m *MachinePoolScope) SetFailureReason(v capierrors.MachineStatusError)
- func (m *MachinePoolScope) SetLongRunningOperationState(future *infrav1.Future)
- func (m *MachinePoolScope) SetNotReady()
- func (m *MachinePoolScope) SetProviderID(v string)
- func (m *MachinePoolScope) SetReady()
- func (m *MachinePoolScope) SetSubnetName() error
- func (m *MachinePoolScope) SetVMSSState(vmssState *azure.VMSS)
- func (m *MachinePoolScope) UpdateDeleteStatus(condition clusterv1.ConditionType, service string, err error)
- func (m *MachinePoolScope) UpdatePatchStatus(condition clusterv1.ConditionType, service string, err error)
- func (m *MachinePoolScope) UpdatePutStatus(condition clusterv1.ConditionType, service string, err error)
- func (m *MachinePoolScope) VMSSExtensionSpecs() []azure.ExtensionSpec
- type MachinePoolScopeParams
- type MachineScope
- func (m *MachineScope) AdditionalTags() infrav1.Tags
- func (m *MachineScope) AnnotationJSON(annotation string) (map[string]interface{}, error)
- func (m *MachineScope) AvailabilitySet() (string, bool)
- func (m *MachineScope) AvailabilityZone() string
- func (m *MachineScope) Close(ctx context.Context) error
- func (m *MachineScope) DeleteLongRunningOperationState(name, service string)
- func (m *MachineScope) DiskSpecs() []azure.DiskSpec
- func (m *MachineScope) GetBootstrapData(ctx context.Context) (string, error)
- func (m *MachineScope) GetLongRunningOperationState(name, service string) *infrav1.Future
- func (m *MachineScope) GetVMID() string
- func (m *MachineScope) GetVMImage() (*infrav1.Image, error)
- func (m *MachineScope) InboundNatSpecs() []azure.InboundNatSpec
- func (m *MachineScope) IsControlPlane() bool
- func (m *MachineScope) NICNames() []string
- func (m *MachineScope) NICSpecs() []azure.NICSpec
- func (m *MachineScope) Name() string
- func (m *MachineScope) Namespace() string
- func (m *MachineScope) PatchObject(ctx context.Context) error
- func (m *MachineScope) ProviderID() string
- func (m *MachineScope) PublicIPSpecs() []azure.PublicIPSpec
- func (m *MachineScope) Role() string
- func (m *MachineScope) RoleAssignmentSpecs() []azure.RoleAssignmentSpec
- func (m *MachineScope) SetAddresses(addrs []corev1.NodeAddress)
- func (m *MachineScope) SetAnnotation(key, value string)
- func (m *MachineScope) SetBootstrapConditions(provisioningState string, extensionName string) error
- func (m *MachineScope) SetFailureMessage(v error)
- func (m *MachineScope) SetFailureReason(v capierrors.MachineStatusError)
- func (m *MachineScope) SetLongRunningOperationState(future *infrav1.Future)
- func (m *MachineScope) SetNotReady()
- func (m *MachineScope) SetProviderID(v string)
- func (m *MachineScope) SetReady()
- func (m *MachineScope) SetSubnetName() error
- func (m *MachineScope) SetVMState(v infrav1.ProvisioningState)
- func (m *MachineScope) Subnet() infrav1.SubnetSpec
- func (m *MachineScope) TagsSpecs() []azure.TagsSpec
- func (m *MachineScope) UpdateAnnotationJSON(annotation string, content map[string]interface{}) error
- func (m *MachineScope) UpdateDeleteStatus(condition clusterv1.ConditionType, service string, err error)
- func (m *MachineScope) UpdatePatchStatus(condition clusterv1.ConditionType, service string, err error)
- func (m *MachineScope) UpdatePutStatus(condition clusterv1.ConditionType, service string, err error)
- func (m *MachineScope) UpdateStatus()
- func (m *MachineScope) VMExtensionSpecs() []azure.ExtensionSpec
- func (m *MachineScope) VMSpec() azure.VMSpec
- func (m *MachineScope) VMState() infrav1.ProvisioningState
- type MachineScopeParams
- type ManagedControlPlaneCredentialsProvider
- type ManagedControlPlaneScope
- func (s *ManagedControlPlaneScope) APIServerLBName() string
- func (s *ManagedControlPlaneScope) APIServerLBPoolName(loadBalancerName string) string
- func (s *ManagedControlPlaneScope) AdditionalTags() infrav1.Tags
- func (s *ManagedControlPlaneScope) AgentPoolSpec() azure.AgentPoolSpec
- func (s *ManagedControlPlaneScope) AnnotationJSON(annotation string) (map[string]interface{}, error)
- func (s *ManagedControlPlaneScope) Authorizer() autorest.Authorizer
- func (s *ManagedControlPlaneScope) AvailabilitySetEnabled() bool
- func (s *ManagedControlPlaneScope) BaseURI() string
- func (s *ManagedControlPlaneScope) Close(ctx context.Context) error
- func (s *ManagedControlPlaneScope) CloudProviderConfigOverrides() *infrav1.CloudProviderConfigOverrides
- func (s *ManagedControlPlaneScope) ClusterName() string
- func (s *ManagedControlPlaneScope) ControlPlaneRouteTable() infrav1.RouteTable
- func (s *ManagedControlPlaneScope) ControlPlaneSubnet() infrav1.SubnetSpec
- func (s *ManagedControlPlaneScope) DeleteLongRunningOperationState(name, service string)
- func (s *ManagedControlPlaneScope) FailureDomains() []string
- func (s *ManagedControlPlaneScope) GetAgentPoolSpecs(ctx context.Context) ([]azure.AgentPoolSpec, error)
- func (s *ManagedControlPlaneScope) GetKubeConfigData() []byte
- func (s *ManagedControlPlaneScope) GetLongRunningOperationState(name, service string) *infrav1.Future
- func (s *ManagedControlPlaneScope) GetPrivateDNSZoneName() string
- func (s *ManagedControlPlaneScope) GroupSpec() azure.ResourceSpecGetter
- func (s *ManagedControlPlaneScope) IsAPIServerPrivate() bool
- func (s *ManagedControlPlaneScope) IsIPv6Enabled() bool
- func (s *ManagedControlPlaneScope) IsVnetManaged() bool
- func (s *ManagedControlPlaneScope) Location() string
- func (s *ManagedControlPlaneScope) MakeEmptyKubeConfigSecret() corev1.Secret
- func (s *ManagedControlPlaneScope) ManagedClusterSpec() (azure.ManagedClusterSpec, error)
- func (s *ManagedControlPlaneScope) NodeNatGateway() infrav1.NatGateway
- func (s *ManagedControlPlaneScope) NodeResourceGroup() string
- func (s *ManagedControlPlaneScope) NodeRouteTable() infrav1.RouteTable
- func (s *ManagedControlPlaneScope) NodeSubnet() infrav1.SubnetSpec
- func (s *ManagedControlPlaneScope) NodeSubnets() []infrav1.SubnetSpec
- func (s *ManagedControlPlaneScope) OutboundLBName(_ string) string
- func (s *ManagedControlPlaneScope) OutboundPoolName(_ string) string
- func (s *ManagedControlPlaneScope) PatchObject(ctx context.Context) error
- func (s *ManagedControlPlaneScope) ResourceGroup() string
- func (s *ManagedControlPlaneScope) SetAgentPoolProviderIDList(providerIDs []string)
- func (s *ManagedControlPlaneScope) SetAgentPoolReady(ready bool)
- func (s *ManagedControlPlaneScope) SetAgentPoolReplicas(replicas int32)
- func (s *ManagedControlPlaneScope) SetAnnotation(key, value string)
- func (s *ManagedControlPlaneScope) SetControlPlaneEndpoint(endpoint clusterv1.APIEndpoint)
- func (s *ManagedControlPlaneScope) SetKubeConfigData(kubeConfigData []byte)
- func (s *ManagedControlPlaneScope) SetLongRunningOperationState(future *infrav1.Future)
- func (s *ManagedControlPlaneScope) SetSubnet(subnetSpec infrav1.SubnetSpec)
- func (s *ManagedControlPlaneScope) Subnet(name string) infrav1.SubnetSpec
- func (s *ManagedControlPlaneScope) SubnetSpecs() []azure.SubnetSpec
- func (s *ManagedControlPlaneScope) Subnets() infrav1.Subnets
- func (s *ManagedControlPlaneScope) SubscriptionID() string
- func (s *ManagedControlPlaneScope) TagsSpecs() []azure.TagsSpec
- func (s *ManagedControlPlaneScope) UpdateAnnotationJSON(annotation string, content map[string]interface{}) error
- func (s *ManagedControlPlaneScope) UpdateDeleteStatus(condition clusterv1.ConditionType, service string, err error)
- func (s *ManagedControlPlaneScope) UpdatePatchStatus(condition clusterv1.ConditionType, service string, err error)
- func (s *ManagedControlPlaneScope) UpdatePutStatus(condition clusterv1.ConditionType, service string, err error)
- func (s *ManagedControlPlaneScope) VNetSpec() azure.VNetSpec
- func (s *ManagedControlPlaneScope) Vnet() *infrav1.VnetSpec
- type ManagedControlPlaneScopeParams
- type NodeStatus
Constants ¶
const (
// MachinePoolMachineScopeName is the sourceName, or more specifically the UserAgent, of client used in cordon and drain.
MachinePoolMachineScopeName = "azuremachinepoolmachine-scope"
)
const ScalesetsServiceName = "scalesets"
ScalesetsServiceName is the name of the scalesets service. TODO: move this to scalesets.go once we remove the usage in this package, added here to avoid a circular dependency.
Variables ¶
This section is empty.
Functions ¶
func IsClusterNamespaceAllowed ¶
func IsClusterNamespaceAllowed(ctx context.Context, k8sClient client.Client, allowedNamespaces *infrav1.AllowedNamespaces, namespace string) bool
IsClusterNamespaceAllowed indicates if the cluster namespace is allowed.
Types ¶
type AzureClients ¶
type AzureClients struct { auth.EnvironmentSettings Authorizer autorest.Authorizer ResourceManagerEndpoint string ResourceManagerVMDNSSuffix string }
AzureClients contains all the Azure clients used by the scopes.
func (*AzureClients) ClientID ¶
func (c *AzureClients) ClientID() string
ClientID returns the Azure client id from the controller environment.
func (*AzureClients) ClientSecret ¶
func (c *AzureClients) ClientSecret() string
ClientSecret returns the Azure client secret from the controller environment.
func (*AzureClients) CloudEnvironment ¶
func (c *AzureClients) CloudEnvironment() string
CloudEnvironment returns the Azure environment the controller runs in.
func (*AzureClients) HashKey ¶
func (c *AzureClients) HashKey() string
HashKey returns a base64 url encoded sha256 hash for the Auth scope (Azure TenantID + CloudEnv + SubscriptionID + ClientID).
func (*AzureClients) SubscriptionID ¶
func (c *AzureClients) SubscriptionID() string
SubscriptionID returns the Azure subscription id of the cluster, either specified or from the environment.
func (*AzureClients) TenantID ¶
func (c *AzureClients) TenantID() string
TenantID returns the Azure tenant id the controller runs in.
type AzureClusterCredentialsProvider ¶
type AzureClusterCredentialsProvider struct { AzureCredentialsProvider AzureCluster *infrav1.AzureCluster }
AzureClusterCredentialsProvider wraps AzureCredentialsProvider with AzureCluster.
func NewAzureClusterCredentialsProvider ¶
func NewAzureClusterCredentialsProvider(ctx context.Context, kubeClient client.Client, azureCluster *infrav1.AzureCluster) (*AzureClusterCredentialsProvider, error)
NewAzureClusterCredentialsProvider creates a new AzureClusterCredentialsProvider from the supplied inputs.
func (*AzureClusterCredentialsProvider) GetAuthorizer ¶
func (p *AzureClusterCredentialsProvider) GetAuthorizer(ctx context.Context, resourceManagerEndpoint, activeDirectoryEndpoint string) (autorest.Authorizer, error)
GetAuthorizer returns an Azure authorizer based on the provided azure identity. It delegates to AzureCredentialsProvider with AzureCluster metadata.
type AzureCredentialsProvider ¶
type AzureCredentialsProvider struct { Client client.Client Identity *infrav1.AzureClusterIdentity }
AzureCredentialsProvider represents a credential provider with azure cluster identity.
func (*AzureCredentialsProvider) GetAuthorizer ¶
func (p *AzureCredentialsProvider) GetAuthorizer(ctx context.Context, resourceManagerEndpoint, activeDirectoryEndpoint string, clusterMeta metav1.ObjectMeta) (autorest.Authorizer, error)
GetAuthorizer returns an Azure authorizer based on the provided azure identity and cluster metadata.
func (*AzureCredentialsProvider) GetClientID ¶ added in v0.5.1
func (p *AzureCredentialsProvider) GetClientID() string
GetClientID returns the Client ID associated with the AzureCredentialsProvider's Identity.
func (*AzureCredentialsProvider) GetClientSecret ¶ added in v0.5.1
func (p *AzureCredentialsProvider) GetClientSecret(ctx context.Context) (string, error)
GetClientSecret returns the Client Secret associated with the AzureCredentialsProvider's Identity. NOTE: this only works if the Identity references a Service Principal Client Secret. If using another type of credentials, such a Certificate, we return an empty string.
func (*AzureCredentialsProvider) GetTenantID ¶ added in v0.5.1
func (p *AzureCredentialsProvider) GetTenantID() string
GetTenantID returns the Tenant ID associated with the AzureCredentialsProvider's Identity.
type ClusterScope ¶
type ClusterScope struct { logr.Logger Client client.Client AzureClients Cluster *clusterv1.Cluster AzureCluster *infrav1.AzureCluster // contains filtered or unexported fields }
ClusterScope defines the basic context for an actuator to operate upon.
func NewClusterScope ¶
func NewClusterScope(ctx context.Context, params ClusterScopeParams) (*ClusterScope, error)
NewClusterScope creates a new Scope from the supplied parameters. This is meant to be called for each reconcile iteration.
func (*ClusterScope) APIServerHost ¶
func (s *ClusterScope) APIServerHost() string
APIServerHost returns the hostname used to reach the API server.
func (*ClusterScope) APIServerLB ¶
func (s *ClusterScope) APIServerLB() *infrav1.LoadBalancerSpec
APIServerLB returns the cluster API Server load balancer.
func (*ClusterScope) APIServerLBName ¶
func (s *ClusterScope) APIServerLBName() string
APIServerLBName returns the API Server LB name.
func (*ClusterScope) APIServerLBPoolName ¶
func (s *ClusterScope) APIServerLBPoolName(loadBalancerName string) string
APIServerLBPoolName returns the API Server LB backend pool name.
func (*ClusterScope) APIServerPort ¶
func (s *ClusterScope) APIServerPort() int32
APIServerPort returns the APIServerPort to use when creating the load balancer.
func (*ClusterScope) APIServerPrivateIP ¶
func (s *ClusterScope) APIServerPrivateIP() string
APIServerPrivateIP returns the API Server private IP.
func (*ClusterScope) APIServerPublicIP ¶
func (s *ClusterScope) APIServerPublicIP() *infrav1.PublicIPSpec
APIServerPublicIP returns the API Server public IP.
func (*ClusterScope) AdditionalTags ¶
func (s *ClusterScope) AdditionalTags() infrav1.Tags
AdditionalTags returns AdditionalTags from the scope's AzureCluster.
func (*ClusterScope) AnnotationJSON ¶ added in v1.0.0
func (s *ClusterScope) AnnotationJSON(annotation string) (map[string]interface{}, error)
AnnotationJSON returns a map[string]interface from a JSON annotation.
func (*ClusterScope) Authorizer ¶
func (s *ClusterScope) Authorizer() autorest.Authorizer
Authorizer returns the Azure client Authorizer.
func (*ClusterScope) AvailabilitySetEnabled ¶
func (s *ClusterScope) AvailabilitySetEnabled() bool
AvailabilitySetEnabled informs machines that they should be part of an Availability Set.
func (*ClusterScope) BaseURI ¶
func (s *ClusterScope) BaseURI() string
BaseURI returns the Azure ResourceManagerEndpoint.
func (*ClusterScope) BastionSpec ¶
func (s *ClusterScope) BastionSpec() azure.BastionSpec
BastionSpec returns the bastion spec.
func (*ClusterScope) Close ¶
func (s *ClusterScope) Close(ctx context.Context) error
Close closes the current scope persisting the cluster configuration and status.
func (*ClusterScope) CloudProviderConfigOverrides ¶
func (s *ClusterScope) CloudProviderConfigOverrides() *infrav1.CloudProviderConfigOverrides
CloudProviderConfigOverrides returns the cloud provider config overrides for the cluster.
func (*ClusterScope) ClusterName ¶
func (s *ClusterScope) ClusterName() string
ClusterName returns the cluster name.
func (*ClusterScope) ControlPlaneOutboundLB ¶
func (s *ClusterScope) ControlPlaneOutboundLB() *infrav1.LoadBalancerSpec
ControlPlaneOutboundLB returns the cluster control plane outbound load balancer.
func (*ClusterScope) ControlPlaneRouteTable ¶
func (s *ClusterScope) ControlPlaneRouteTable() infrav1.RouteTable
ControlPlaneRouteTable returns the cluster controlplane routetable.
func (*ClusterScope) ControlPlaneSubnet ¶
func (s *ClusterScope) ControlPlaneSubnet() infrav1.SubnetSpec
ControlPlaneSubnet returns the cluster control plane subnet.
func (*ClusterScope) DeleteLongRunningOperationState ¶ added in v0.5.3
func (s *ClusterScope) DeleteLongRunningOperationState(name, service string)
DeleteLongRunningOperationState will delete the future from the AzureCluster status.
func (*ClusterScope) FailureDomains ¶ added in v0.5.3
func (s *ClusterScope) FailureDomains() []string
FailureDomains returns the failure domains for the cluster.
func (*ClusterScope) GenerateFQDN ¶
func (s *ClusterScope) GenerateFQDN(ipName string) string
GenerateFQDN generates a fully qualified domain name, based on a hash, cluster name and cluster location.
func (*ClusterScope) GenerateLegacyFQDN ¶
func (s *ClusterScope) GenerateLegacyFQDN() (string, string)
GenerateLegacyFQDN generates an IP name and a fully qualified domain name, based on a hash, cluster name and cluster location. DEPRECATED: use GenerateFQDN instead.
func (*ClusterScope) GetLongRunningOperationState ¶ added in v0.5.3
func (s *ClusterScope) GetLongRunningOperationState(name, service string) *infrav1.Future
GetLongRunningOperationState will get the future on the AzureCluster status.
func (*ClusterScope) GetPrivateDNSZoneName ¶
func (s *ClusterScope) GetPrivateDNSZoneName() string
GetPrivateDNSZoneName returns the Private DNS Zone from the spec or generate it from cluster name.
func (*ClusterScope) GroupSpec ¶ added in v0.5.3
func (s *ClusterScope) GroupSpec() azure.ResourceSpecGetter
GroupSpec returns the resource group spec.
func (*ClusterScope) IsAPIServerPrivate ¶
func (s *ClusterScope) IsAPIServerPrivate() bool
IsAPIServerPrivate returns true if the API Server LB is of type Internal.
func (*ClusterScope) IsIPv6Enabled ¶
func (s *ClusterScope) IsIPv6Enabled() bool
IsIPv6Enabled returns true if IPv6 is enabled.
func (*ClusterScope) IsVnetManaged ¶
func (s *ClusterScope) IsVnetManaged() bool
IsVnetManaged returns true if the vnet is managed.
func (*ClusterScope) LBSpecs ¶
func (s *ClusterScope) LBSpecs() []azure.LBSpec
LBSpecs returns the load balancer specs.
func (*ClusterScope) ListOptionsLabelSelector ¶
func (s *ClusterScope) ListOptionsLabelSelector() client.ListOption
ListOptionsLabelSelector returns a ListOptions with a label selector for clusterName.
func (*ClusterScope) Location ¶
func (s *ClusterScope) Location() string
Location returns the cluster location.
func (*ClusterScope) NSGSpecs ¶
func (s *ClusterScope) NSGSpecs() []azure.NSGSpec
NSGSpecs returns the security group specs.
func (*ClusterScope) Namespace ¶
func (s *ClusterScope) Namespace() string
Namespace returns the cluster namespace.
func (*ClusterScope) NatGatewaySpecs ¶
func (s *ClusterScope) NatGatewaySpecs() []azure.NatGatewaySpec
NatGatewaySpecs returns the node nat gateway.
func (*ClusterScope) NodeOutboundLB ¶
func (s *ClusterScope) NodeOutboundLB() *infrav1.LoadBalancerSpec
NodeOutboundLB returns the cluster node outbound load balancer.
func (*ClusterScope) NodeOutboundLBName ¶
func (s *ClusterScope) NodeOutboundLBName() string
NodeOutboundLBName returns the name of the node outbound LB.
func (*ClusterScope) NodeSubnets ¶ added in v0.5.1
func (s *ClusterScope) NodeSubnets() []infrav1.SubnetSpec
NodeSubnets returns the subnets with the node role.
func (*ClusterScope) OutboundLBName ¶
func (s *ClusterScope) OutboundLBName(role string) string
OutboundLBName returns the name of the outbound LB.
func (*ClusterScope) OutboundPoolName ¶
func (s *ClusterScope) OutboundPoolName(loadBalancerName string) string
OutboundPoolName returns the outbound LB backend pool name.
func (*ClusterScope) PatchObject ¶
func (s *ClusterScope) PatchObject(ctx context.Context) error
PatchObject persists the cluster configuration and status.
func (*ClusterScope) PrivateDNSSpec ¶
func (s *ClusterScope) PrivateDNSSpec() *azure.PrivateDNSSpec
PrivateDNSSpec returns the private dns zone spec.
func (*ClusterScope) PublicIPSpecs ¶
func (s *ClusterScope) PublicIPSpecs() []azure.PublicIPSpec
PublicIPSpecs returns the public IP specs.
func (*ClusterScope) ResourceGroup ¶
func (s *ClusterScope) ResourceGroup() string
ResourceGroup returns the cluster resource group.
func (*ClusterScope) RouteTableSpecs ¶
func (s *ClusterScope) RouteTableSpecs() []azure.RouteTableSpec
RouteTableSpecs returns the node route table.
func (*ClusterScope) SetAnnotation ¶ added in v1.0.0
func (s *ClusterScope) SetAnnotation(key, value string)
SetAnnotation sets a key value annotation on the AzureCluster.
func (*ClusterScope) SetControlPlaneSecurityRules ¶
func (s *ClusterScope) SetControlPlaneSecurityRules()
SetControlPlaneSecurityRules sets the default security rules of the control plane subnet. Note that this is not done in a webhook as it requires a valid Cluster object to exist to get the API Server port.
func (*ClusterScope) SetDNSName ¶
func (s *ClusterScope) SetDNSName()
SetDNSName sets the API Server public IP DNS name. Note: this logic exists only for purposes of ensuring backwards compatibility for old clusters created without an APIServerLB, and should be removed in the future.
func (*ClusterScope) SetFailureDomain ¶
func (s *ClusterScope) SetFailureDomain(id string, spec clusterv1.FailureDomainSpec)
SetFailureDomain will set the spec for a for a given key.
func (*ClusterScope) SetLongRunningOperationState ¶ added in v0.5.3
func (s *ClusterScope) SetLongRunningOperationState(future *infrav1.Future)
SetLongRunningOperationState will set the future on the AzureCluster status to allow the resource to continue in the next reconciliation.
func (*ClusterScope) SetSubnet ¶
func (s *ClusterScope) SetSubnet(subnetSpec infrav1.SubnetSpec)
SetSubnet sets the subnet spec for the subnet with the same name.
func (*ClusterScope) Subnet ¶ added in v0.5.1
func (s *ClusterScope) Subnet(name string) infrav1.SubnetSpec
Subnet returns the subnet with the provided name.
func (*ClusterScope) SubnetSpecs ¶
func (s *ClusterScope) SubnetSpecs() []azure.SubnetSpec
SubnetSpecs returns the subnets specs.
func (*ClusterScope) Subnets ¶
func (s *ClusterScope) Subnets() infrav1.Subnets
Subnets returns the cluster subnets.
func (*ClusterScope) TagsSpecs ¶ added in v1.0.0
func (s *ClusterScope) TagsSpecs() []azure.TagsSpec
TagsSpecs returns the tag specs for the AzureCluster.
func (*ClusterScope) UpdateAnnotationJSON ¶ added in v1.0.0
func (s *ClusterScope) UpdateAnnotationJSON(annotation string, content map[string]interface{}) error
UpdateAnnotationJSON updates the `annotation` with `content`. `content` in this case should be a `map[string]interface{}` suitable for turning into JSON. This `content` map will be marshalled into a JSON string before being set as the given `annotation`.
func (*ClusterScope) UpdateDeleteStatus ¶ added in v0.5.3
func (s *ClusterScope) UpdateDeleteStatus(condition clusterv1.ConditionType, service string, err error)
UpdateDeleteStatus updates a condition on the AzureCluster status after a DELETE operation.
func (*ClusterScope) UpdatePatchStatus ¶ added in v0.5.3
func (s *ClusterScope) UpdatePatchStatus(condition clusterv1.ConditionType, service string, err error)
UpdatePatchStatus updates a condition on the AzureCluster status after a PATCH operation.
func (*ClusterScope) UpdatePutStatus ¶ added in v0.5.3
func (s *ClusterScope) UpdatePutStatus(condition clusterv1.ConditionType, service string, err error)
UpdatePutStatus updates a condition on the AzureCluster status after a PUT operation.
func (*ClusterScope) VNetSpec ¶
func (s *ClusterScope) VNetSpec() azure.VNetSpec
VNetSpec returns the virtual network spec.
func (*ClusterScope) Vnet ¶
func (s *ClusterScope) Vnet() *infrav1.VnetSpec
Vnet returns the cluster Vnet.
func (*ClusterScope) VnetPeeringSpecs ¶ added in v1.0.0
func (s *ClusterScope) VnetPeeringSpecs() []azure.VnetPeeringSpec
VnetPeeringSpecs returns the virtual network peering specs.
type ClusterScopeParams ¶
type ClusterScopeParams struct { AzureClients Client client.Client Logger logr.Logger Cluster *clusterv1.Cluster AzureCluster *infrav1.AzureCluster }
ClusterScopeParams defines the input parameters used to create a new Scope.
type CredentialsProvider ¶
type CredentialsProvider interface { GetAuthorizer(ctx context.Context, resourceManagerEndpoint, activeDirectoryEndpoint string) (autorest.Authorizer, error) GetClientID() string GetClientSecret(ctx context.Context) (string, error) GetTenantID() string }
CredentialsProvider defines the behavior for azure identity based credential providers.
type MachinePoolMachineScope ¶
type MachinePoolMachineScope struct { azure.ClusterScoper logr.Logger AzureMachinePoolMachine *infrav1exp.AzureMachinePoolMachine AzureMachinePool *infrav1exp.AzureMachinePool MachinePool *capiv1exp.MachinePool MachinePoolScope *MachinePoolScope // contains filtered or unexported fields }
MachinePoolMachineScope defines a scope defined around a machine pool machine.
func NewMachinePoolMachineScope ¶
func NewMachinePoolMachineScope(params MachinePoolMachineScopeParams) (*MachinePoolMachineScope, error)
NewMachinePoolMachineScope creates a new MachinePoolMachineScope from the supplied parameters. This is meant to be called for each reconcile iteration.
func (*MachinePoolMachineScope) Close ¶
func (s *MachinePoolMachineScope) Close(ctx context.Context) error
Close updates the state of MachinePoolMachine.
func (*MachinePoolMachineScope) CordonAndDrain ¶
func (s *MachinePoolMachineScope) CordonAndDrain(ctx context.Context) error
CordonAndDrain will cordon and drain the Kubernetes node associated with this AzureMachinePoolMachine.
func (*MachinePoolMachineScope) DeleteLongRunningOperationState ¶ added in v0.5.3
func (s *MachinePoolMachineScope) DeleteLongRunningOperationState(name, service string)
DeleteLongRunningOperationState will delete the future from the AzureMachinePoolMachine status.
func (*MachinePoolMachineScope) GetLongRunningOperationState ¶
func (s *MachinePoolMachineScope) GetLongRunningOperationState(name, service string) *infrav1.Future
GetLongRunningOperationState will get the future on the AzureMachinePoolMachine status.
func (*MachinePoolMachineScope) InstanceID ¶
func (s *MachinePoolMachineScope) InstanceID() string
InstanceID is the unique ID of the machine within the Machine Pool.
func (*MachinePoolMachineScope) IsReady ¶
func (s *MachinePoolMachineScope) IsReady() bool
IsReady indicates the machine has successfully provisioned and has a node ref associated.
func (*MachinePoolMachineScope) Name ¶
func (s *MachinePoolMachineScope) Name() string
Name is the name of the Machine Pool Machine.
func (*MachinePoolMachineScope) ProviderID ¶
func (s *MachinePoolMachineScope) ProviderID() string
ProviderID returns the AzureMachinePool ID by parsing Spec.FakeProviderID.
func (*MachinePoolMachineScope) ProvisioningState ¶
func (s *MachinePoolMachineScope) ProvisioningState() infrav1.ProvisioningState
ProvisioningState returns the AzureMachinePoolMachine provisioning state.
func (*MachinePoolMachineScope) ScaleSetName ¶
func (s *MachinePoolMachineScope) ScaleSetName() string
ScaleSetName is the name of the VMSS.
func (*MachinePoolMachineScope) SetFailureMessage ¶
func (s *MachinePoolMachineScope) SetFailureMessage(v error)
SetFailureMessage sets the AzureMachinePoolMachine status failure message.
func (*MachinePoolMachineScope) SetFailureReason ¶
func (s *MachinePoolMachineScope) SetFailureReason(v capierrors.MachineStatusError)
SetFailureReason sets the AzureMachinePoolMachine status failure reason.
func (*MachinePoolMachineScope) SetLongRunningOperationState ¶
func (s *MachinePoolMachineScope) SetLongRunningOperationState(future *infrav1.Future)
SetLongRunningOperationState will set the future on the AzureMachinePoolMachine status to allow the resource to continue in the next reconciliation.
func (*MachinePoolMachineScope) SetVMSSVM ¶
func (s *MachinePoolMachineScope) SetVMSSVM(instance *azure.VMSSVM)
SetVMSSVM update the scope with the current state of the VMSS VM.
func (*MachinePoolMachineScope) UpdateDeleteStatus ¶ added in v0.5.3
func (s *MachinePoolMachineScope) UpdateDeleteStatus(condition clusterv1.ConditionType, service string, err error)
UpdateDeleteStatus updates a condition on the AzureMachinePoolMachine status after a DELETE operation.
func (*MachinePoolMachineScope) UpdatePatchStatus ¶ added in v0.5.3
func (s *MachinePoolMachineScope) UpdatePatchStatus(condition clusterv1.ConditionType, service string, err error)
UpdatePatchStatus updates a condition on the AzureMachinePoolMachine status after a PATCH operation.
func (*MachinePoolMachineScope) UpdatePutStatus ¶ added in v0.5.3
func (s *MachinePoolMachineScope) UpdatePutStatus(condition clusterv1.ConditionType, service string, err error)
UpdatePutStatus updates a condition on the AzureMachinePoolMachine status after a PUT operation.
func (*MachinePoolMachineScope) UpdateStatus ¶
func (s *MachinePoolMachineScope) UpdateStatus(ctx context.Context) error
UpdateStatus updates the node reference for the machine and other status fields. This func should be called at the end of a reconcile request and after updating the scope with the most recent Azure data.
type MachinePoolMachineScopeParams ¶
type MachinePoolMachineScopeParams struct { AzureMachinePool *infrav1exp.AzureMachinePool AzureMachinePoolMachine *infrav1exp.AzureMachinePoolMachine Client client.Client ClusterScope azure.ClusterScoper Logger logr.Logger MachinePool *capiv1exp.MachinePool // contains filtered or unexported fields }
MachinePoolMachineScopeParams defines the input parameters used to create a new MachinePoolScope.
type MachinePoolScope ¶
type MachinePoolScope struct { azure.ClusterScoper logr.Logger AzureMachinePool *infrav1exp.AzureMachinePool MachinePool *capiv1exp.MachinePool // contains filtered or unexported fields }
MachinePoolScope defines a scope defined around a machine pool and its cluster.
func NewMachinePoolScope ¶
func NewMachinePoolScope(params MachinePoolScopeParams) (*MachinePoolScope, error)
NewMachinePoolScope creates a new MachinePoolScope from the supplied parameters. This is meant to be called for each reconcile iteration.
func (*MachinePoolScope) AdditionalTags ¶
func (m *MachinePoolScope) AdditionalTags() infrav1.Tags
AdditionalTags merges AdditionalTags from the scope's AzureCluster and AzureMachinePool. If the same key is present in both, the value from AzureMachinePool takes precedence.
func (*MachinePoolScope) Close ¶
func (m *MachinePoolScope) Close(ctx context.Context) error
Close the MachineScope by updating the machine spec, machine status.
func (*MachinePoolScope) DeleteLongRunningOperationState ¶ added in v0.5.3
func (m *MachinePoolScope) DeleteLongRunningOperationState(name, service string)
DeleteLongRunningOperationState will delete the future from the AzureMachinePool status.
func (MachinePoolScope) DesiredReplicas ¶
func (m MachinePoolScope) DesiredReplicas() int32
DesiredReplicas returns the replica count on machine pool or 0 if machine pool replicas is nil.
func (*MachinePoolScope) GetBootstrapData ¶
func (m *MachinePoolScope) GetBootstrapData(ctx context.Context) (string, error)
GetBootstrapData returns the bootstrap data from the secret in the Machine's bootstrap.dataSecretName.
func (*MachinePoolScope) GetLongRunningOperationState ¶
func (m *MachinePoolScope) GetLongRunningOperationState(name, service string) *infrav1.Future
GetLongRunningOperationState will get the future on the AzureMachinePool status.
func (*MachinePoolScope) GetVMImage ¶
func (m *MachinePoolScope) GetVMImage() (*infrav1.Image, error)
GetVMImage picks an image from the machine configuration, or uses a default one.
func (MachinePoolScope) MaxSurge ¶
func (m MachinePoolScope) MaxSurge() (int, error)
MaxSurge returns the number of machines to surge, or 0 if the deployment strategy does not support surge.
func (*MachinePoolScope) Name ¶
func (m *MachinePoolScope) Name() string
Name returns the Azure Machine Pool Name.
func (*MachinePoolScope) NeedsRequeue ¶
func (m *MachinePoolScope) NeedsRequeue() bool
NeedsRequeue return true if any machines are not on the latest model or the VMSS is not in a terminal provisioning state.
func (*MachinePoolScope) PatchObject ¶
func (m *MachinePoolScope) PatchObject(ctx context.Context) error
PatchObject persists the machine spec and status.
func (*MachinePoolScope) ProviderID ¶
func (m *MachinePoolScope) ProviderID() string
ProviderID returns the AzureMachinePool ID by parsing Spec.FakeProviderID.
func (*MachinePoolScope) ProvisioningState ¶
func (m *MachinePoolScope) ProvisioningState() infrav1.ProvisioningState
ProvisioningState returns the AzureMachinePool provisioning state.
func (*MachinePoolScope) RoleAssignmentSpecs ¶
func (m *MachinePoolScope) RoleAssignmentSpecs() []azure.RoleAssignmentSpec
RoleAssignmentSpecs returns the role assignment specs.
func (*MachinePoolScope) SaveVMImageToStatus ¶
func (m *MachinePoolScope) SaveVMImageToStatus(image *infrav1.Image)
SaveVMImageToStatus persists the AzureMachinePool image to the status.
func (*MachinePoolScope) ScaleSetSpec ¶
func (m *MachinePoolScope) ScaleSetSpec() azure.ScaleSetSpec
ScaleSetSpec returns the scale set spec.
func (*MachinePoolScope) SetAnnotation ¶
func (m *MachinePoolScope) SetAnnotation(key, value string)
SetAnnotation sets a key value annotation on the AzureMachinePool.
func (*MachinePoolScope) SetBootstrapConditions ¶
func (m *MachinePoolScope) SetBootstrapConditions(provisioningState string, extensionName string) error
SetBootstrapConditions sets the AzureMachinePool BootstrapSucceeded condition based on the extension provisioning states.
func (*MachinePoolScope) SetFailureMessage ¶
func (m *MachinePoolScope) SetFailureMessage(v error)
SetFailureMessage sets the AzureMachinePool status failure message.
func (*MachinePoolScope) SetFailureReason ¶
func (m *MachinePoolScope) SetFailureReason(v capierrors.MachineStatusError)
SetFailureReason sets the AzureMachinePool status failure reason.
func (*MachinePoolScope) SetLongRunningOperationState ¶
func (m *MachinePoolScope) SetLongRunningOperationState(future *infrav1.Future)
SetLongRunningOperationState will set the future on the AzureMachinePool status to allow the resource to continue in the next reconciliation.
func (*MachinePoolScope) SetNotReady ¶
func (m *MachinePoolScope) SetNotReady()
SetNotReady sets the AzureMachinePool Ready Status to false.
func (*MachinePoolScope) SetProviderID ¶
func (m *MachinePoolScope) SetProviderID(v string)
SetProviderID sets the AzureMachinePool providerID in spec.
func (*MachinePoolScope) SetReady ¶
func (m *MachinePoolScope) SetReady()
SetReady sets the AzureMachinePool Ready Status to true.
func (*MachinePoolScope) SetSubnetName ¶ added in v0.5.1
func (m *MachinePoolScope) SetSubnetName() error
SetSubnetName defaults the AzureMachinePool subnet name to the name of the subnet with role 'node' when there is only one of them. Note: this logic exists only for purposes of ensuring backwards compatibility for old clusters created without the `subnetName` field being set, and should be removed in the future when this field is no longer optional.
func (*MachinePoolScope) SetVMSSState ¶
func (m *MachinePoolScope) SetVMSSState(vmssState *azure.VMSS)
SetVMSSState updates the machine pool scope with the current state of the VMSS.
func (*MachinePoolScope) UpdateDeleteStatus ¶ added in v0.5.3
func (m *MachinePoolScope) UpdateDeleteStatus(condition clusterv1.ConditionType, service string, err error)
UpdateDeleteStatus updates a condition on the AzureMachinePool status after a DELETE operation.
func (*MachinePoolScope) UpdatePatchStatus ¶ added in v0.5.3
func (m *MachinePoolScope) UpdatePatchStatus(condition clusterv1.ConditionType, service string, err error)
UpdatePatchStatus updates a condition on the AzureMachinePool status after a PATCH operation.
func (*MachinePoolScope) UpdatePutStatus ¶ added in v0.5.3
func (m *MachinePoolScope) UpdatePutStatus(condition clusterv1.ConditionType, service string, err error)
UpdatePutStatus updates a condition on the AzureMachinePool status after a PUT operation.
func (*MachinePoolScope) VMSSExtensionSpecs ¶
func (m *MachinePoolScope) VMSSExtensionSpecs() []azure.ExtensionSpec
VMSSExtensionSpecs returns the vmss extension specs.
type MachinePoolScopeParams ¶
type MachinePoolScopeParams struct { Client client.Client Logger logr.Logger MachinePool *capiv1exp.MachinePool AzureMachinePool *infrav1exp.AzureMachinePool ClusterScope azure.ClusterScoper }
MachinePoolScopeParams defines the input parameters used to create a new MachinePoolScope.
type MachineScope ¶
type MachineScope struct { logr.Logger azure.ClusterScoper Machine *clusterv1.Machine AzureMachine *infrav1.AzureMachine // contains filtered or unexported fields }
MachineScope defines a scope defined around a machine and its cluster.
func NewMachineScope ¶
func NewMachineScope(params MachineScopeParams) (*MachineScope, error)
NewMachineScope creates a new MachineScope from the supplied parameters. This is meant to be called for each reconcile iteration.
func (*MachineScope) AdditionalTags ¶
func (m *MachineScope) AdditionalTags() infrav1.Tags
AdditionalTags merges AdditionalTags from the scope's AzureCluster and AzureMachine. If the same key is present in both, the value from AzureMachine takes precedence.
func (*MachineScope) AnnotationJSON ¶
func (m *MachineScope) AnnotationJSON(annotation string) (map[string]interface{}, error)
AnnotationJSON returns a map[string]interface from a JSON annotation.
func (*MachineScope) AvailabilitySet ¶
func (m *MachineScope) AvailabilitySet() (string, bool)
AvailabilitySet returns the availability set for this machine if available.
func (*MachineScope) AvailabilityZone ¶
func (m *MachineScope) AvailabilityZone() string
AvailabilityZone returns the AzureMachine Availability Zone. Priority for selecting the AZ is
- Machine.Spec.FailureDomain
- AzureMachine.Spec.FailureDomain (This is to support deprecated AZ)
- No AZ
func (*MachineScope) Close ¶
func (m *MachineScope) Close(ctx context.Context) error
Close the MachineScope by updating the machine spec, machine status.
func (*MachineScope) DeleteLongRunningOperationState ¶ added in v0.5.3
func (m *MachineScope) DeleteLongRunningOperationState(name, service string)
DeleteLongRunningOperationState will delete the future from the AzureMachine status.
func (*MachineScope) DiskSpecs ¶
func (m *MachineScope) DiskSpecs() []azure.DiskSpec
DiskSpecs returns the disk specs.
func (*MachineScope) GetBootstrapData ¶
func (m *MachineScope) GetBootstrapData(ctx context.Context) (string, error)
GetBootstrapData returns the bootstrap data from the secret in the Machine's bootstrap.dataSecretName.
func (*MachineScope) GetLongRunningOperationState ¶ added in v0.5.3
func (m *MachineScope) GetLongRunningOperationState(name, service string) *infrav1.Future
GetLongRunningOperationState will get the future on the AzureMachine status.
func (*MachineScope) GetVMID ¶
func (m *MachineScope) GetVMID() string
GetVMID returns the AzureMachine instance id by parsing Spec.FakeProviderID.
func (*MachineScope) GetVMImage ¶
func (m *MachineScope) GetVMImage() (*infrav1.Image, error)
GetVMImage returns the image from the machine configuration, or a default one.
func (*MachineScope) InboundNatSpecs ¶
func (m *MachineScope) InboundNatSpecs() []azure.InboundNatSpec
InboundNatSpecs returns the inbound NAT specs.
func (*MachineScope) IsControlPlane ¶
func (m *MachineScope) IsControlPlane() bool
IsControlPlane returns true if the machine is a control plane.
func (*MachineScope) NICNames ¶
func (m *MachineScope) NICNames() []string
NICNames returns the NIC names.
func (*MachineScope) NICSpecs ¶
func (m *MachineScope) NICSpecs() []azure.NICSpec
NICSpecs returns the network interface specs.
func (*MachineScope) Name ¶
func (m *MachineScope) Name() string
Name returns the AzureMachine name.
func (*MachineScope) Namespace ¶
func (m *MachineScope) Namespace() string
Namespace returns the namespace name.
func (*MachineScope) PatchObject ¶
func (m *MachineScope) PatchObject(ctx context.Context) error
PatchObject persists the machine spec and status.
func (*MachineScope) ProviderID ¶
func (m *MachineScope) ProviderID() string
ProviderID returns the AzureMachine providerID from the spec.
func (*MachineScope) PublicIPSpecs ¶
func (m *MachineScope) PublicIPSpecs() []azure.PublicIPSpec
PublicIPSpecs returns the public IP specs.
func (*MachineScope) Role ¶
func (m *MachineScope) Role() string
Role returns the machine role from the labels.
func (*MachineScope) RoleAssignmentSpecs ¶
func (m *MachineScope) RoleAssignmentSpecs() []azure.RoleAssignmentSpec
RoleAssignmentSpecs returns the role assignment specs.
func (*MachineScope) SetAddresses ¶
func (m *MachineScope) SetAddresses(addrs []corev1.NodeAddress)
SetAddresses sets the Azure address status.
func (*MachineScope) SetAnnotation ¶
func (m *MachineScope) SetAnnotation(key, value string)
SetAnnotation sets a key value annotation on the AzureMachine.
func (*MachineScope) SetBootstrapConditions ¶
func (m *MachineScope) SetBootstrapConditions(provisioningState string, extensionName string) error
SetBootstrapConditions sets the AzureMachine BootstrapSucceeded condition based on the extension provisioning states.
func (*MachineScope) SetFailureMessage ¶
func (m *MachineScope) SetFailureMessage(v error)
SetFailureMessage sets the AzureMachine status failure message.
func (*MachineScope) SetFailureReason ¶
func (m *MachineScope) SetFailureReason(v capierrors.MachineStatusError)
SetFailureReason sets the AzureMachine status failure reason.
func (*MachineScope) SetLongRunningOperationState ¶ added in v0.5.3
func (m *MachineScope) SetLongRunningOperationState(future *infrav1.Future)
SetLongRunningOperationState will set the future on the AzureMachine status to allow the resource to continue in the next reconciliation.
func (*MachineScope) SetNotReady ¶
func (m *MachineScope) SetNotReady()
SetNotReady sets the AzureMachine Ready Status to false.
func (*MachineScope) SetProviderID ¶
func (m *MachineScope) SetProviderID(v string)
SetProviderID sets the AzureMachine providerID in spec.
func (*MachineScope) SetReady ¶
func (m *MachineScope) SetReady()
SetReady sets the AzureMachine Ready Status to true.
func (*MachineScope) SetSubnetName ¶ added in v0.5.1
func (m *MachineScope) SetSubnetName() error
SetSubnetName defaults the AzureMachine subnet name to the name of one the subnets with the machine role when there is only one of them. Note: this logic exists only for purposes of ensuring backwards compatibility for old clusters created without the `subnetName` field being set, and should be removed in the future when this field is no longer optional.
func (*MachineScope) SetVMState ¶
func (m *MachineScope) SetVMState(v infrav1.ProvisioningState)
SetVMState sets the AzureMachine VM state.
func (*MachineScope) Subnet ¶
func (m *MachineScope) Subnet() infrav1.SubnetSpec
Subnet returns the machine's subnet.
func (*MachineScope) TagsSpecs ¶
func (m *MachineScope) TagsSpecs() []azure.TagsSpec
TagsSpecs returns the tags for the AzureMachine.
func (*MachineScope) UpdateAnnotationJSON ¶
func (m *MachineScope) UpdateAnnotationJSON(annotation string, content map[string]interface{}) error
UpdateAnnotationJSON updates the `annotation` with `content`. `content` in this case should be a `map[string]interface{}` suitable for turning into JSON. This `content` map will be marshalled into a JSON string before being set as the given `annotation`.
func (*MachineScope) UpdateDeleteStatus ¶ added in v0.5.3
func (m *MachineScope) UpdateDeleteStatus(condition clusterv1.ConditionType, service string, err error)
UpdateDeleteStatus updates a condition on the AzureMachine status after a DELETE operation.
func (*MachineScope) UpdatePatchStatus ¶ added in v0.5.3
func (m *MachineScope) UpdatePatchStatus(condition clusterv1.ConditionType, service string, err error)
UpdatePatchStatus updates a condition on the AzureMachine status after a PATCH operation.
func (*MachineScope) UpdatePutStatus ¶ added in v0.5.3
func (m *MachineScope) UpdatePutStatus(condition clusterv1.ConditionType, service string, err error)
UpdatePutStatus updates a condition on the AzureMachine status after a PUT operation.
func (*MachineScope) UpdateStatus ¶
func (m *MachineScope) UpdateStatus()
UpdateStatus updates the AzureMachine status.
func (*MachineScope) VMExtensionSpecs ¶
func (m *MachineScope) VMExtensionSpecs() []azure.ExtensionSpec
VMExtensionSpecs returns the vm extension specs.
func (*MachineScope) VMSpec ¶
func (m *MachineScope) VMSpec() azure.VMSpec
VMSpec returns the VM spec.
func (*MachineScope) VMState ¶
func (m *MachineScope) VMState() infrav1.ProvisioningState
VMState returns the AzureMachine VM state.
type MachineScopeParams ¶
type MachineScopeParams struct { Client client.Client Logger logr.Logger ClusterScope azure.ClusterScoper Machine *clusterv1.Machine AzureMachine *infrav1.AzureMachine }
MachineScopeParams defines the input parameters used to create a new MachineScope.
type ManagedControlPlaneCredentialsProvider ¶
type ManagedControlPlaneCredentialsProvider struct { AzureCredentialsProvider AzureManagedControlPlane *infrav1exp.AzureManagedControlPlane }
ManagedControlPlaneCredentialsProvider wraps AzureCredentialsProvider with AzureManagedControlPlane.
func NewManagedControlPlaneCredentialsProvider ¶
func NewManagedControlPlaneCredentialsProvider(ctx context.Context, kubeClient client.Client, managedControlPlane *infrav1exp.AzureManagedControlPlane) (*ManagedControlPlaneCredentialsProvider, error)
NewManagedControlPlaneCredentialsProvider creates a new ManagedControlPlaneCredentialsProvider from the supplied inputs.
func (*ManagedControlPlaneCredentialsProvider) GetAuthorizer ¶
func (p *ManagedControlPlaneCredentialsProvider) GetAuthorizer(ctx context.Context, resourceManagerEndpoint, activeDirectoryEndpoint string) (autorest.Authorizer, error)
GetAuthorizer returns an Azure authorizer based on the provided azure identity. It delegates to AzureCredentialsProvider with AzureManagedControlPlane metadata.
type ManagedControlPlaneScope ¶
type ManagedControlPlaneScope struct { logr.Logger Client client.Client AzureClients Cluster *clusterv1.Cluster MachinePool *expv1.MachinePool ControlPlane *infrav1exp.AzureManagedControlPlane InfraMachinePool *infrav1exp.AzureManagedMachinePool PatchTarget client.Object AllNodePools []infrav1exp.AzureManagedMachinePool // contains filtered or unexported fields }
ManagedControlPlaneScope defines the basic context for an actuator to operate upon.
func NewManagedControlPlaneScope ¶
func NewManagedControlPlaneScope(ctx context.Context, params ManagedControlPlaneScopeParams) (*ManagedControlPlaneScope, error)
NewManagedControlPlaneScope creates a new Scope from the supplied parameters. This is meant to be called for each reconcile iteration.
func (*ManagedControlPlaneScope) APIServerLBName ¶
func (s *ManagedControlPlaneScope) APIServerLBName() string
APIServerLBName returns the API Server LB name.
func (*ManagedControlPlaneScope) APIServerLBPoolName ¶
func (s *ManagedControlPlaneScope) APIServerLBPoolName(loadBalancerName string) string
APIServerLBPoolName returns the API Server LB backend pool name.
func (*ManagedControlPlaneScope) AdditionalTags ¶
func (s *ManagedControlPlaneScope) AdditionalTags() infrav1.Tags
AdditionalTags returns AdditionalTags from the ControlPlane spec.
func (*ManagedControlPlaneScope) AgentPoolSpec ¶ added in v0.5.2
func (s *ManagedControlPlaneScope) AgentPoolSpec() azure.AgentPoolSpec
AgentPoolSpec returns an azure.AgentPoolSpec for currently reconciled AzureManagedMachinePool.
func (*ManagedControlPlaneScope) AnnotationJSON ¶ added in v1.0.0
func (s *ManagedControlPlaneScope) AnnotationJSON(annotation string) (map[string]interface{}, error)
AnnotationJSON returns a map[string]interface from a JSON annotation.
func (*ManagedControlPlaneScope) Authorizer ¶
func (s *ManagedControlPlaneScope) Authorizer() autorest.Authorizer
Authorizer returns the Azure client Authorizer.
func (*ManagedControlPlaneScope) AvailabilitySetEnabled ¶
func (s *ManagedControlPlaneScope) AvailabilitySetEnabled() bool
AvailabilitySetEnabled is always false for a managed control plane.
func (*ManagedControlPlaneScope) BaseURI ¶
func (s *ManagedControlPlaneScope) BaseURI() string
BaseURI returns the Azure ResourceManagerEndpoint.
func (*ManagedControlPlaneScope) Close ¶ added in v0.5.2
func (s *ManagedControlPlaneScope) Close(ctx context.Context) error
Close closes the current scope persisting the cluster configuration and status.
func (*ManagedControlPlaneScope) CloudProviderConfigOverrides ¶
func (s *ManagedControlPlaneScope) CloudProviderConfigOverrides() *infrav1.CloudProviderConfigOverrides
CloudProviderConfigOverrides returns the cloud provider config overrides for the cluster.
func (*ManagedControlPlaneScope) ClusterName ¶
func (s *ManagedControlPlaneScope) ClusterName() string
ClusterName returns the managed control plane's name.
func (*ManagedControlPlaneScope) ControlPlaneRouteTable ¶
func (s *ManagedControlPlaneScope) ControlPlaneRouteTable() infrav1.RouteTable
ControlPlaneRouteTable returns the cluster controlplane routetable.
func (*ManagedControlPlaneScope) ControlPlaneSubnet ¶
func (s *ManagedControlPlaneScope) ControlPlaneSubnet() infrav1.SubnetSpec
ControlPlaneSubnet returns the cluster control plane subnet.
func (*ManagedControlPlaneScope) DeleteLongRunningOperationState ¶ added in v0.5.3
func (s *ManagedControlPlaneScope) DeleteLongRunningOperationState(name, service string)
DeleteLongRunningOperationState will delete the future from the AzureManagedControlPlane status.
func (*ManagedControlPlaneScope) FailureDomains ¶ added in v0.5.3
func (s *ManagedControlPlaneScope) FailureDomains() []string
FailureDomains returns the failure domains for the cluster.
func (*ManagedControlPlaneScope) GetAgentPoolSpecs ¶ added in v0.5.3
func (s *ManagedControlPlaneScope) GetAgentPoolSpecs(ctx context.Context) ([]azure.AgentPoolSpec, error)
GetAgentPoolSpecs gets a slice of azure.AgentPoolSpec for the list of agent pools.
func (*ManagedControlPlaneScope) GetKubeConfigData ¶ added in v0.5.2
func (s *ManagedControlPlaneScope) GetKubeConfigData() []byte
GetKubeConfigData returns a []byte that contains kubeconfig.
func (*ManagedControlPlaneScope) GetLongRunningOperationState ¶ added in v0.5.3
func (s *ManagedControlPlaneScope) GetLongRunningOperationState(name, service string) *infrav1.Future
GetLongRunningOperationState will get the future on the AzureManagedControlPlane status.
func (*ManagedControlPlaneScope) GetPrivateDNSZoneName ¶
func (s *ManagedControlPlaneScope) GetPrivateDNSZoneName() string
GetPrivateDNSZoneName returns the Private DNS Zone from the spec or generate it from cluster name. Currently always empty as managed control planes do not currently implement private clusters.
func (*ManagedControlPlaneScope) GroupSpec ¶ added in v0.5.3
func (s *ManagedControlPlaneScope) GroupSpec() azure.ResourceSpecGetter
GroupSpec returns the resource group spec.
func (*ManagedControlPlaneScope) IsAPIServerPrivate ¶
func (s *ManagedControlPlaneScope) IsAPIServerPrivate() bool
IsAPIServerPrivate returns true if the API Server LB is of type Internal. Currently always false as managed control planes do not currently implement private clusters.
func (*ManagedControlPlaneScope) IsIPv6Enabled ¶
func (s *ManagedControlPlaneScope) IsIPv6Enabled() bool
IsIPv6Enabled returns true if a cluster is ipv6 enabled. Currently always false as managed control planes do not currently implement ipv6.
func (*ManagedControlPlaneScope) IsVnetManaged ¶
func (s *ManagedControlPlaneScope) IsVnetManaged() bool
IsVnetManaged returns true if the vnet is managed.
func (*ManagedControlPlaneScope) Location ¶
func (s *ManagedControlPlaneScope) Location() string
Location returns the managed control plane's Azure location, or an empty string.
func (*ManagedControlPlaneScope) MakeEmptyKubeConfigSecret ¶ added in v0.5.2
func (s *ManagedControlPlaneScope) MakeEmptyKubeConfigSecret() corev1.Secret
MakeEmptyKubeConfigSecret creates an empty secret object that is used for storing kubeconfig secret data.
func (*ManagedControlPlaneScope) ManagedClusterSpec ¶ added in v0.5.2
func (s *ManagedControlPlaneScope) ManagedClusterSpec() (azure.ManagedClusterSpec, error)
ManagedClusterSpec returns the managed cluster spec.
func (*ManagedControlPlaneScope) NodeNatGateway ¶
func (s *ManagedControlPlaneScope) NodeNatGateway() infrav1.NatGateway
NodeNatGateway returns the cluster node nat gateway.
func (*ManagedControlPlaneScope) NodeResourceGroup ¶ added in v0.5.2
func (s *ManagedControlPlaneScope) NodeResourceGroup() string
NodeResourceGroup returns the managed control plane's node resource group.
func (*ManagedControlPlaneScope) NodeRouteTable ¶
func (s *ManagedControlPlaneScope) NodeRouteTable() infrav1.RouteTable
NodeRouteTable returns the cluster node routetable.
func (*ManagedControlPlaneScope) NodeSubnet ¶
func (s *ManagedControlPlaneScope) NodeSubnet() infrav1.SubnetSpec
NodeSubnet returns the cluster node subnet.
func (*ManagedControlPlaneScope) NodeSubnets ¶ added in v0.5.1
func (s *ManagedControlPlaneScope) NodeSubnets() []infrav1.SubnetSpec
NodeSubnets returns the subnets with the node role.
func (*ManagedControlPlaneScope) OutboundLBName ¶
func (s *ManagedControlPlaneScope) OutboundLBName(_ string) string
OutboundLBName returns the name of the outbound LB. Note: for managed clusters, the outbound LB lifecycle is not managed.
func (*ManagedControlPlaneScope) OutboundPoolName ¶
func (s *ManagedControlPlaneScope) OutboundPoolName(_ string) string
OutboundPoolName returns the outbound LB backend pool name.
func (*ManagedControlPlaneScope) PatchObject ¶
func (s *ManagedControlPlaneScope) PatchObject(ctx context.Context) error
PatchObject persists the cluster configuration and status.
func (*ManagedControlPlaneScope) ResourceGroup ¶
func (s *ManagedControlPlaneScope) ResourceGroup() string
ResourceGroup returns the managed control plane's resource group.
func (*ManagedControlPlaneScope) SetAgentPoolProviderIDList ¶ added in v0.5.2
func (s *ManagedControlPlaneScope) SetAgentPoolProviderIDList(providerIDs []string)
SetAgentPoolProviderIDList sets a list of agent pool's Azure VM IDs.
func (*ManagedControlPlaneScope) SetAgentPoolReady ¶ added in v0.5.2
func (s *ManagedControlPlaneScope) SetAgentPoolReady(ready bool)
SetAgentPoolReady sets the flag that indicates if the agent pool is ready or not.
func (*ManagedControlPlaneScope) SetAgentPoolReplicas ¶ added in v0.5.2
func (s *ManagedControlPlaneScope) SetAgentPoolReplicas(replicas int32)
SetAgentPoolReplicas sets the number of agent pool replicas.
func (*ManagedControlPlaneScope) SetAnnotation ¶ added in v1.0.0
func (s *ManagedControlPlaneScope) SetAnnotation(key, value string)
SetAnnotation sets a key value annotation on the ControlPlane.
func (*ManagedControlPlaneScope) SetControlPlaneEndpoint ¶ added in v0.5.2
func (s *ManagedControlPlaneScope) SetControlPlaneEndpoint(endpoint clusterv1.APIEndpoint)
SetControlPlaneEndpoint sets a control plane endpoint.
func (*ManagedControlPlaneScope) SetKubeConfigData ¶ added in v0.5.2
func (s *ManagedControlPlaneScope) SetKubeConfigData(kubeConfigData []byte)
SetKubeConfigData sets kubeconfig data.
func (*ManagedControlPlaneScope) SetLongRunningOperationState ¶ added in v0.5.3
func (s *ManagedControlPlaneScope) SetLongRunningOperationState(future *infrav1.Future)
SetLongRunningOperationState will set the future on the AzureManagedControlPlane status to allow the resource to continue in the next reconciliation.
func (*ManagedControlPlaneScope) SetSubnet ¶
func (s *ManagedControlPlaneScope) SetSubnet(subnetSpec infrav1.SubnetSpec)
SetSubnet sets the passed subnet spec into the scope. This is not used when using a managed control plane.
func (*ManagedControlPlaneScope) Subnet ¶ added in v0.5.1
func (s *ManagedControlPlaneScope) Subnet(name string) infrav1.SubnetSpec
Subnet returns the subnet with the provided name.
func (*ManagedControlPlaneScope) SubnetSpecs ¶
func (s *ManagedControlPlaneScope) SubnetSpecs() []azure.SubnetSpec
SubnetSpecs returns the subnets specs.
func (*ManagedControlPlaneScope) Subnets ¶ added in v0.5.1
func (s *ManagedControlPlaneScope) Subnets() infrav1.Subnets
Subnets returns the subnets specs.
func (*ManagedControlPlaneScope) SubscriptionID ¶
func (s *ManagedControlPlaneScope) SubscriptionID() string
SubscriptionID returns the Azure client Subscription ID.
func (*ManagedControlPlaneScope) TagsSpecs ¶ added in v1.0.0
func (s *ManagedControlPlaneScope) TagsSpecs() []azure.TagsSpec
TagsSpecs returns the tag specs for the ManagedControlPlane.
func (*ManagedControlPlaneScope) UpdateAnnotationJSON ¶ added in v1.0.0
func (s *ManagedControlPlaneScope) UpdateAnnotationJSON(annotation string, content map[string]interface{}) error
UpdateAnnotationJSON updates the `annotation` with `content`. `content` in this case should be a `map[string]interface{}` suitable for turning into JSON. This `content` map will be marshalled into a JSON string before being set as the given `annotation`.
func (*ManagedControlPlaneScope) UpdateDeleteStatus ¶ added in v0.5.3
func (s *ManagedControlPlaneScope) UpdateDeleteStatus(condition clusterv1.ConditionType, service string, err error)
UpdateDeleteStatus updates a condition on the AzureManagedControlPlane status after a DELETE operation.
func (*ManagedControlPlaneScope) UpdatePatchStatus ¶ added in v0.5.3
func (s *ManagedControlPlaneScope) UpdatePatchStatus(condition clusterv1.ConditionType, service string, err error)
UpdatePatchStatus updates a condition on the AzureManagedControlPlane status after a PATCH operation.
func (*ManagedControlPlaneScope) UpdatePutStatus ¶ added in v0.5.3
func (s *ManagedControlPlaneScope) UpdatePutStatus(condition clusterv1.ConditionType, service string, err error)
UpdatePutStatus updates a condition on the AzureManagedControlPlane status after a PUT operation.
func (*ManagedControlPlaneScope) VNetSpec ¶
func (s *ManagedControlPlaneScope) VNetSpec() azure.VNetSpec
VNetSpec returns the virtual network spec.
func (*ManagedControlPlaneScope) Vnet ¶
func (s *ManagedControlPlaneScope) Vnet() *infrav1.VnetSpec
Vnet returns the cluster Vnet.
type ManagedControlPlaneScopeParams ¶
type ManagedControlPlaneScopeParams struct { AzureClients Client client.Client Logger logr.Logger Cluster *clusterv1.Cluster ControlPlane *infrav1exp.AzureManagedControlPlane InfraMachinePool *infrav1exp.AzureManagedMachinePool MachinePool *expv1.MachinePool PatchTarget client.Object }
ManagedControlPlaneScopeParams defines the input parameters used to create a new managed control plane.
type NodeStatus ¶
NodeStatus represents the status of a Kubernetes node.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Run go generate to regenerate this mock.
|
Run go generate to regenerate this mock. |
strategies
|
|