scope

package
v0.4.15 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 added in v0.4.7

func (c *AzureClients) ClientID() string

ClientID returns the Azure client id from the controller environment

func (*AzureClients) ClientSecret added in v0.4.7

func (c *AzureClients) ClientSecret() string

ClientSecret returns the Azure client secret from the controller environment

func (*AzureClients) CloudEnvironment added in v0.4.7

func (c *AzureClients) CloudEnvironment() string

CloudEnvironment returns the Azure environment the controller runs in.

func (*AzureClients) HashKey added in v0.4.11

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 added in v0.4.7

func (c *AzureClients) TenantID() string

TenantID returns the Azure tenant id the controller runs in.

type AzureCredentialsProvider added in v0.4.11

type AzureCredentialsProvider struct {
	Client       client.Client
	AzureCluster *infrav1.AzureCluster
	Identity     *infrav1.AzureClusterIdentity
}

AzureCredentialsProvider provides

func NewAzureCredentialsProvider added in v0.4.11

func NewAzureCredentialsProvider(ctx context.Context, kubeClient client.Client, azureCluster *infrav1.AzureCluster) (*AzureCredentialsProvider, error)

NewAzureCredentialsProvider creates a new AzureCredentialsProvider from the supplied inputs.

func (*AzureCredentialsProvider) GetAuthorizer added in v0.4.11

func (p *AzureCredentialsProvider) GetAuthorizer(ctx context.Context, resourceManagerEndpoint string) (autorest.Authorizer, error)

GetAuthorizer returns an Azure authorizer based on the provided azure 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 added in v0.4.10

func (s *ClusterScope) APIServerHost() string

APIServerHost returns the hostname used to reach the API server.

func (*ClusterScope) APIServerLB added in v0.4.10

func (s *ClusterScope) APIServerLB() *infrav1.LoadBalancerSpec

APIServerLB returns the cluster API Server load balancer.

func (*ClusterScope) APIServerLBName added in v0.4.10

func (s *ClusterScope) APIServerLBName() string

APIServerLBName returns the API Server LB name.

func (*ClusterScope) APIServerLBPoolName added in v0.4.10

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 added in v0.4.10

func (s *ClusterScope) APIServerPrivateIP() string

APIServerPrivateIP returns the API Server private IP.

func (*ClusterScope) APIServerPublicIP added in v0.4.10

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) Authorizer added in v0.4.6

func (s *ClusterScope) Authorizer() autorest.Authorizer

Authorizer returns the Azure client Authorizer.

func (*ClusterScope) AvailabilitySetEnabled added in v0.4.11

func (s *ClusterScope) AvailabilitySetEnabled() bool

AvailabilitySetEnabled informs machines that they should be part of an Availability Set.

func (*ClusterScope) BaseURI added in v0.4.6

func (s *ClusterScope) BaseURI() string

BaseURI returns the Azure ResourceManagerEndpoint.

func (*ClusterScope) Close

func (s *ClusterScope) Close(ctx context.Context) error

Close closes the current scope persisting the cluster configuration and status.

func (*ClusterScope) ClusterName added in v0.4.6

func (s *ClusterScope) ClusterName() string

ClusterName returns the cluster name.

func (*ClusterScope) ControlPlaneRouteTable added in v0.4.10

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) GenerateFQDN added in v0.4.6

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 added in v0.4.10

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) IsAPIServerPrivate added in v0.4.10

func (s *ClusterScope) IsAPIServerPrivate() bool

IsAPIServerPrivate returns true if the API Server LB is of type Internal.

func (*ClusterScope) IsIPv6Enabled added in v0.4.9

func (s *ClusterScope) IsIPv6Enabled() bool

IsIPv6Enabled returns true if IPv6 is enabled.

func (*ClusterScope) IsVnetManaged added in v0.4.7

func (s *ClusterScope) IsVnetManaged() bool

IsVnetManaged returns true if the vnet is managed.

func (*ClusterScope) LBSpecs added in v0.4.6

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 added in v0.4.7

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) NodeOutboundLBName added in v0.4.10

func (s *ClusterScope) NodeOutboundLBName() string

NodeOutboundLBName returns the name of the node outbound LB.

func (*ClusterScope) NodeRouteTable added in v0.4.10

func (s *ClusterScope) NodeRouteTable() *infrav1.RouteTable

NodeRouteTable returns the cluster node routetable.

func (*ClusterScope) NodeSubnet

func (s *ClusterScope) NodeSubnet() *infrav1.SubnetSpec

NodeSubnet returns the cluster node subnet.

func (*ClusterScope) OutboundLBName added in v0.4.10

func (s *ClusterScope) OutboundLBName(role string) string

OutboundLBName returns the name of the outbound LB.

func (*ClusterScope) OutboundPoolName added in v0.4.10

func (s *ClusterScope) OutboundPoolName(loadBalancerName string) string

OutboundPoolName returns the outbound LB backend pool name.

func (*ClusterScope) PatchObject added in v0.4.0

func (s *ClusterScope) PatchObject(ctx context.Context) error

PatchObject persists the cluster configuration and status.

func (*ClusterScope) PrivateDNSSpec added in v0.4.10

func (s *ClusterScope) PrivateDNSSpec() *azure.PrivateDNSSpec

PrivateDNSSpec returns the private dns zone spec.

func (*ClusterScope) PublicIPSpecs added in v0.4.6

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 added in v0.4.7

func (s *ClusterScope) RouteTableSpecs() []azure.RouteTableSpec

RouteTableSpecs returns the node route table

func (*ClusterScope) SetControlPlaneIngressRules added in v0.4.7

func (s *ClusterScope) SetControlPlaneIngressRules()

SetControlPlaneIngressRules will set the ingress rules or the control plane subnet

func (*ClusterScope) SetDNSName added in v0.4.10

func (s *ClusterScope) SetDNSName()

SetDNSName sets the API Server public IP DNS name.

func (*ClusterScope) SetFailureDomain added in v0.4.3

func (s *ClusterScope) SetFailureDomain(id string, spec clusterv1.FailureDomainSpec)

SetFailureDomain will set the spec for a for a given key

func (*ClusterScope) SubnetSpecs added in v0.4.7

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) VNetSpec added in v0.4.10

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.

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 MachinePoolScope added in v0.4.3

type MachinePoolScope struct {
	logr.Logger

	MachinePool      *capiv1exp.MachinePool
	AzureMachinePool *infrav1exp.AzureMachinePool
	azure.ClusterScoper
	// contains filtered or unexported fields
}

MachinePoolScope defines a scope defined around a machine pool and its cluster.

func NewMachinePoolScope added in v0.4.3

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 added in v0.4.3

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) AzureMachineTemplate added in v0.4.3

func (m *MachinePoolScope) AzureMachineTemplate(ctx context.Context) (*infrav1.AzureMachineTemplate, error)

AzureMachineTemplate gets the Azure machine template in this scope.

func (*MachinePoolScope) Close added in v0.4.3

func (m *MachinePoolScope) Close(ctx context.Context) error

Close the MachineScope by updating the machine spec, machine status.

func (*MachinePoolScope) GetBootstrapData added in v0.4.3

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 added in v0.4.11

func (m *MachinePoolScope) GetLongRunningOperationState() *infrav1.Future

GetLongRunningOperationState will get the future on the AzureMachinePool status to allow the resource to continue in the next reconciliation.

func (*MachinePoolScope) GetVMImage added in v0.4.7

func (m *MachinePoolScope) GetVMImage() (*infrav1.Image, error)

GetVMImage picks an image from the machine configuration, or uses a default one.

func (*MachinePoolScope) Name added in v0.4.3

func (m *MachinePoolScope) Name() string

Name returns the Azure Machine Pool Name.

func (*MachinePoolScope) NeedsK8sVersionUpdate added in v0.4.10

func (m *MachinePoolScope) NeedsK8sVersionUpdate() bool

NeedsK8sVersionUpdate compares the MachinePool spec and the AzureMachinePool status to determine if the VMSS model needs to be updated

func (*MachinePoolScope) PatchObject added in v0.4.3

func (m *MachinePoolScope) PatchObject(ctx context.Context) error

PatchObject persists the machine spec and status.

func (*MachinePoolScope) ProviderID added in v0.4.8

func (m *MachinePoolScope) ProviderID() string

ProviderID returns the AzureMachinePool ID by parsing Spec.ProviderID.

func (*MachinePoolScope) ProvisioningState added in v0.4.8

func (m *MachinePoolScope) ProvisioningState() infrav1.VMState

ProvisioningState returns the AzureMachinePool provisioning state.

func (*MachinePoolScope) RoleAssignmentSpecs added in v0.4.10

func (m *MachinePoolScope) RoleAssignmentSpecs() []azure.RoleAssignmentSpec

RoleAssignmentSpecs returns the role assignment specs.

func (*MachinePoolScope) SaveK8sVersion added in v0.4.10

func (m *MachinePoolScope) SaveK8sVersion()

SaveK8sVersion stores the MachinePool spec K8s version to the AzureMachinePool status

func (*MachinePoolScope) ScaleSetSpec added in v0.4.8

func (m *MachinePoolScope) ScaleSetSpec() azure.ScaleSetSpec

ScaleSetSpec returns the scale set spec.

func (*MachinePoolScope) SetAnnotation added in v0.4.3

func (m *MachinePoolScope) SetAnnotation(key, value string)

SetAnnotation sets a key value annotation on the AzureMachinePool.

func (*MachinePoolScope) SetFailureMessage added in v0.4.3

func (m *MachinePoolScope) SetFailureMessage(v error)

SetFailureMessage sets the AzureMachinePool status failure message.

func (*MachinePoolScope) SetFailureReason added in v0.4.3

func (m *MachinePoolScope) SetFailureReason(v capierrors.MachineStatusError)

SetFailureReason sets the AzureMachinePool status failure reason.

func (*MachinePoolScope) SetLongRunningOperationState added in v0.4.11

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 added in v0.4.8

func (m *MachinePoolScope) SetNotReady()

SetNotReady sets the AzureMachinePool Ready Status to false.

func (*MachinePoolScope) SetProviderID added in v0.4.8

func (m *MachinePoolScope) SetProviderID(v string)

SetProviderID sets the AzureMachinePool providerID in spec.

func (*MachinePoolScope) SetProvisioningState added in v0.4.8

func (m *MachinePoolScope) SetProvisioningState(v infrav1.VMState)

SetProvisioningState sets the AzureMachinePool provisioning state.

func (*MachinePoolScope) SetReady added in v0.4.3

func (m *MachinePoolScope) SetReady()

SetReady sets the AzureMachinePool Ready Status to true.

func (*MachinePoolScope) UpdateInstanceStatuses added in v0.4.10

func (m *MachinePoolScope) UpdateInstanceStatuses(ctx context.Context, instances []infrav1exp.VMSSVM) error

UpdateInstanceStatuses ties the Azure VMSS instance data and the Node status data together to build and update the AzureMachinePool. This calculates the number of ready replicas, the current version the kubelet is running on the node, the provider IDs for the instances and the providerIDList for the AzureMachinePool spec.

func (*MachinePoolScope) VMSSExtensionSpecs added in v0.4.11

func (m *MachinePoolScope) VMSSExtensionSpecs() []azure.VMSSExtensionSpec

VMSSExtensionSpecs returns the vmss extension specs.

type MachinePoolScopeParams added in v0.4.3

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 added in v0.4.8

func (m *MachineScope) AnnotationJSON(annotation string) (map[string]interface{}, error)

AnnotationJSON returns a map[string]interface from a JSON annotation.

func (*MachineScope) AvailabilitySet added in v0.4.11

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

  1. Machine.Spec.FailureDomain
  2. AzureMachine.Spec.FailureDomain (This is to support deprecated AZ)
  3. AzureMachine.Spec.AvailabilityZone.ID (This is DEPRECATED)
  4. No AZ

func (*MachineScope) BastionSpecs added in v0.4.8

func (m *MachineScope) BastionSpecs() []azure.BastionSpec

BastionSpecs returns the bastion specs.

func (*MachineScope) Close

func (m *MachineScope) Close(ctx context.Context) error

Close the MachineScope by updating the machine spec, machine status.

func (*MachineScope) DiskSpecs added in v0.4.6

func (m *MachineScope) DiskSpecs() []azure.DiskSpec

DiskSpecs returns the disk specs.

func (*MachineScope) GetBootstrapData added in v0.4.0

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) GetVMID

func (m *MachineScope) GetVMID() string

GetVMID returns the AzureMachine instance id by parsing Spec.ProviderID.

func (*MachineScope) GetVMImage added in v0.4.7

func (m *MachineScope) GetVMImage() (*infrav1.Image, error)

GetVMImage returns the image from the machine configuration, or a default one.

func (*MachineScope) InboundNatSpecs added in v0.4.7

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 added in v0.4.7

func (m *MachineScope) NICNames() []string

NICNames returns the NIC names

func (*MachineScope) NICSpecs added in v0.4.6

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 added in v0.4.0

func (m *MachineScope) PatchObject(ctx context.Context) error

PatchObject persists the machine spec and status.

func (*MachineScope) ProviderID added in v0.4.8

func (m *MachineScope) ProviderID() string

ProviderID returns the AzureMachine providerID from the spec.

func (*MachineScope) PublicIPSpecs added in v0.4.6

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 added in v0.4.7

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) SetFailureMessage added in v0.4.0

func (m *MachineScope) SetFailureMessage(v error)

SetFailureMessage sets the AzureMachine status failure message.

func (*MachineScope) SetFailureReason added in v0.4.0

func (m *MachineScope) SetFailureReason(v capierrors.MachineStatusError)

SetFailureReason sets the AzureMachine status failure reason.

func (*MachineScope) SetNotReady added in v0.4.2

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) SetVMState

func (m *MachineScope) SetVMState(v infrav1.VMState)

SetVMState sets the AzureMachine VM state.

func (*MachineScope) Subnet added in v0.4.6

func (m *MachineScope) Subnet() *infrav1.SubnetSpec

Subnet returns the machine's subnet based on its role

func (*MachineScope) TagsSpecs added in v0.4.8

func (m *MachineScope) TagsSpecs() []azure.TagsSpec

TagsSpecs returns the tags for the AzureMachine.

func (*MachineScope) UpdateAnnotationJSON added in v0.4.8

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) VMExtensionSpecs added in v0.4.11

func (m *MachineScope) VMExtensionSpecs() []azure.VMExtensionSpec

VMExtensionSpecs returns the vm extension specs.

func (*MachineScope) VMSpec added in v0.4.10

func (m *MachineScope) VMSpec() azure.VMSpec

VMSpec returns the VM spec.

func (*MachineScope) VMState added in v0.4.8

func (m *MachineScope) VMState() infrav1.VMState

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 ManagedControlPlaneScope added in v0.4.4

type ManagedControlPlaneScope struct {
	logr.Logger
	Client client.Client

	AzureClients
	Cluster          *clusterv1.Cluster
	MachinePool      *expv1.MachinePool
	ControlPlane     *infrav1exp.AzureManagedControlPlane
	InfraMachinePool *infrav1exp.AzureManagedMachinePool
	PatchTarget      runtime.Object
	// contains filtered or unexported fields
}

ManagedControlPlaneScope defines the basic context for an actuator to operate upon.

func NewManagedControlPlaneScope added in v0.4.4

func NewManagedControlPlaneScope(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 added in v0.4.10

func (s *ManagedControlPlaneScope) APIServerLBName() string

APIServerLBName returns the API Server LB name.

func (*ManagedControlPlaneScope) APIServerLBPoolName added in v0.4.10

func (s *ManagedControlPlaneScope) APIServerLBPoolName(loadBalancerName string) string

APIServerLBPoolName returns the API Server LB backend pool name.

func (*ManagedControlPlaneScope) AdditionalTags added in v0.4.7

func (s *ManagedControlPlaneScope) AdditionalTags() infrav1.Tags

AdditionalTags returns AdditionalTags from the ControlPlane spec.

func (*ManagedControlPlaneScope) Authorizer added in v0.4.6

Authorizer returns the Azure client Authorizer.

func (*ManagedControlPlaneScope) AvailabilitySetEnabled added in v0.4.11

func (s *ManagedControlPlaneScope) AvailabilitySetEnabled() bool

AvailabilitySetEnabled is always false for a managed control plane

func (*ManagedControlPlaneScope) BaseURI added in v0.4.6

func (s *ManagedControlPlaneScope) BaseURI() string

BaseURI returns the Azure ResourceManagerEndpoint.

func (*ManagedControlPlaneScope) ClusterName added in v0.4.7

func (s *ManagedControlPlaneScope) ClusterName() string

ClusterName returns the managed control plane's name.

func (*ManagedControlPlaneScope) ControlPlaneRouteTable added in v0.4.10

func (s *ManagedControlPlaneScope) ControlPlaneRouteTable() *infrav1.RouteTable

ControlPlaneRouteTable returns the cluster controlplane routetable.

func (*ManagedControlPlaneScope) ControlPlaneSubnet added in v0.4.10

func (s *ManagedControlPlaneScope) ControlPlaneSubnet() *infrav1.SubnetSpec

ControlPlaneSubnet returns the cluster control plane subnet.

func (*ManagedControlPlaneScope) IsAPIServerPrivate added in v0.4.10

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 added in v0.4.10

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 added in v0.4.10

func (s *ManagedControlPlaneScope) IsVnetManaged() bool

IsVnetManaged returns true if the vnet is managed.

func (*ManagedControlPlaneScope) Location added in v0.4.7

func (s *ManagedControlPlaneScope) Location() string

Location returns the managed control plane's Azure location, or an empty string.

func (*ManagedControlPlaneScope) NodeRouteTable added in v0.4.10

func (s *ManagedControlPlaneScope) NodeRouteTable() *infrav1.RouteTable

NodeRouteTable returns the cluster node routetable.

func (*ManagedControlPlaneScope) NodeSubnet added in v0.4.10

func (s *ManagedControlPlaneScope) NodeSubnet() *infrav1.SubnetSpec

NodeSubnet returns the cluster node subnet.

func (*ManagedControlPlaneScope) OutboundLBName added in v0.4.10

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 added in v0.4.10

func (s *ManagedControlPlaneScope) OutboundPoolName(_ string) string

OutboundPoolName returns the outbound LB backend pool name.

func (*ManagedControlPlaneScope) PatchObject added in v0.4.4

func (s *ManagedControlPlaneScope) PatchObject(ctx context.Context) error

PatchObject persists the cluster configuration and status.

func (*ManagedControlPlaneScope) ResourceGroup added in v0.4.7

func (s *ManagedControlPlaneScope) ResourceGroup() string

ResourceGroup returns the managed control plane's resource group.

func (*ManagedControlPlaneScope) SubnetSpecs added in v0.4.10

func (s *ManagedControlPlaneScope) SubnetSpecs() []azure.SubnetSpec

SubnetSpecs returns the subnets specs.

func (*ManagedControlPlaneScope) SubscriptionID added in v0.4.6

func (s *ManagedControlPlaneScope) SubscriptionID() string

SubscriptionID returns the Azure client Subscription ID.

func (*ManagedControlPlaneScope) VNetSpec added in v0.4.10

func (s *ManagedControlPlaneScope) VNetSpec() azure.VNetSpec

VNetSpec returns the virtual network spec.

func (*ManagedControlPlaneScope) Vnet added in v0.4.10

Vnet returns the cluster Vnet.

type ManagedControlPlaneScopeParams added in v0.4.4

type ManagedControlPlaneScopeParams struct {
	AzureClients
	Client           client.Client
	Logger           logr.Logger
	Cluster          *clusterv1.Cluster
	ControlPlane     *infrav1exp.AzureManagedControlPlane
	InfraMachinePool *infrav1exp.AzureManagedMachinePool
	MachinePool      *expv1.MachinePool
	PatchTarget      runtime.Object
}

ManagedControlPlaneScopeParams defines the input parameters used to create a new

type NodeStatus added in v0.4.10

type NodeStatus struct {
	Ready   bool
	Version string
}

NodeStatus represents the status of a Kubernetes node

Jump to

Keyboard shortcuts

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