Documentation ¶
Index ¶
- Variables
- type AWSClients
- type ClusterScope
- func (s *ClusterScope) APIServerPort() int64
- func (s *ClusterScope) AdditionalTags() infrav1.Tags
- func (s *ClusterScope) Close() error
- func (s *ClusterScope) ControlPlaneConfigMapName() string
- func (s *ClusterScope) ControlPlaneLoadBalancer() *infrav1.AWSLoadBalancerSpec
- func (s *ClusterScope) ControlPlaneLoadBalancerScheme() infrav1.ClassicELBScheme
- func (s *ClusterScope) ListOptionsLabelSelector() client.ListOption
- func (s *ClusterScope) Name() string
- func (s *ClusterScope) Namespace() string
- func (s *ClusterScope) Network() *infrav1.Network
- func (s *ClusterScope) Region() string
- func (s *ClusterScope) SecurityGroups() map[infrav1.SecurityGroupRole]infrav1.SecurityGroup
- func (s *ClusterScope) Subnets() infrav1.Subnets
- func (s *ClusterScope) VPC() *infrav1.VPCSpec
- type ClusterScopeGetter
- type ClusterScopeGetterFunc
- type ClusterScopeParams
- type MachineScope
- func (m *MachineScope) AdditionalTags() infrav1.Tags
- func (m *MachineScope) Close() error
- func (m *MachineScope) GetInstanceID() *string
- func (m *MachineScope) GetInstanceState() *infrav1.InstanceState
- func (m *MachineScope) GetProviderID() string
- func (m *MachineScope) IsControlPlane() bool
- func (m *MachineScope) Name() string
- func (m *MachineScope) Namespace() string
- func (m *MachineScope) Role() string
- func (m *MachineScope) SetAnnotation(key, value string)
- func (m *MachineScope) SetErrorMessage(v error)
- func (m *MachineScope) SetErrorReason(v capierrors.MachineStatusError)
- func (m *MachineScope) SetInstanceState(v infrav1.InstanceState)
- func (m *MachineScope) SetProviderID(v string)
- func (m *MachineScope) SetReady()
- type MachineScopeGetter
- type MachineScopeGetterFunc
- type MachineScopeParams
Constants ¶
This section is empty.
Variables ¶
var ( DefaultClusterScopeGetter ClusterScopeGetter = ClusterScopeGetterFunc(NewClusterScope) DefaultMachineScopeGetter MachineScopeGetter = MachineScopeGetterFunc(NewMachineScope) )
Functions ¶
This section is empty.
Types ¶
type AWSClients ¶
type AWSClients struct { EC2 ec2iface.EC2API ELB elbiface.ELBAPI ResourceTagging resourcegroupstaggingapiiface.ResourceGroupsTaggingAPIAPI }
AWSClients contains all the aws clients used by the scopes.
type ClusterScope ¶
type ClusterScope struct { logr.Logger AWSClients Cluster *clusterv1.Cluster AWSCluster *infrav1.AWSCluster // contains filtered or unexported fields }
ClusterScope defines the basic context for an actuator to operate upon.
func NewClusterScope ¶
func NewClusterScope(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) APIServerPort ¶ added in v0.4.1
func (s *ClusterScope) APIServerPort() int64
APIServerPort returns the APIServerPort to use when creating the load balancer.
func (*ClusterScope) AdditionalTags ¶ added in v0.4.1
func (s *ClusterScope) AdditionalTags() infrav1.Tags
AdditionalTags returns AdditionalTags from the scope's AWSCluster. The returned value will never be nil.
func (*ClusterScope) Close ¶
func (s *ClusterScope) Close() error
Close closes the current scope persisting the cluster configuration and status.
func (*ClusterScope) ControlPlaneConfigMapName ¶
func (s *ClusterScope) ControlPlaneConfigMapName() string
ControlPlaneConfigMapName returns the name of the ConfigMap used to coordinate the bootstrapping of control plane nodes.
func (*ClusterScope) ControlPlaneLoadBalancer ¶ added in v0.4.3
func (s *ClusterScope) ControlPlaneLoadBalancer() *infrav1.AWSLoadBalancerSpec
ControlPlaneLoadBalancer returns the AWSLoadBalancerSpec
func (*ClusterScope) ControlPlaneLoadBalancerScheme ¶ added in v0.4.3
func (s *ClusterScope) ControlPlaneLoadBalancerScheme() infrav1.ClassicELBScheme
ControlPlaneLoadBalancerScheme returns the Classic ELB scheme (public or internal facing)
func (*ClusterScope) ListOptionsLabelSelector ¶
func (s *ClusterScope) ListOptionsLabelSelector() client.ListOption
ListOptionsLabelSelector returns a ListOptions with a label selector for clusterName.
func (*ClusterScope) Namespace ¶
func (s *ClusterScope) Namespace() string
Namespace returns the cluster namespace.
func (*ClusterScope) Network ¶
func (s *ClusterScope) Network() *infrav1.Network
Network returns the cluster network object.
func (*ClusterScope) Region ¶
func (s *ClusterScope) Region() string
Region returns the cluster region.
func (*ClusterScope) SecurityGroups ¶
func (s *ClusterScope) SecurityGroups() map[infrav1.SecurityGroupRole]infrav1.SecurityGroup
SecurityGroups returns the cluster security groups as a map, it creates the map if empty.
func (*ClusterScope) Subnets ¶
func (s *ClusterScope) Subnets() infrav1.Subnets
Subnets returns the cluster subnets.
func (*ClusterScope) VPC ¶
func (s *ClusterScope) VPC() *infrav1.VPCSpec
VPC returns the cluster VPC.
type ClusterScopeGetter ¶
type ClusterScopeGetter interface {
ClusterScope(params ClusterScopeParams) (*ClusterScope, error)
}
type ClusterScopeGetterFunc ¶
type ClusterScopeGetterFunc func(params ClusterScopeParams) (*ClusterScope, error)
func (ClusterScopeGetterFunc) ClusterScope ¶
func (f ClusterScopeGetterFunc) ClusterScope(params ClusterScopeParams) (*ClusterScope, error)
type ClusterScopeParams ¶
type ClusterScopeParams struct { AWSClients Client client.Client Logger logr.Logger Cluster *clusterv1.Cluster AWSCluster *infrav1.AWSCluster }
ClusterScopeParams defines the input parameters used to create a new Scope.
type MachineScope ¶
type MachineScope struct { logr.Logger Cluster *clusterv1.Cluster Machine *clusterv1.Machine AWSCluster *infrav1.AWSCluster AWSMachine *infrav1.AWSMachine // 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 ¶ added in v0.4.1
func (m *MachineScope) AdditionalTags() infrav1.Tags
AdditionalTags merges AdditionalTags from the scope's AWSCluster and AWSMachine. If the same key is present in both, the value from AWSMachine takes precedence. The returned Tags will never be nil.
func (*MachineScope) Close ¶
func (m *MachineScope) Close() error
Close the MachineScope by updating the machine spec, machine status.
func (*MachineScope) GetInstanceID ¶
func (m *MachineScope) GetInstanceID() *string
GetInstanceID returns the AWSMachine instance id by parsing Spec.ProviderID.
func (*MachineScope) GetInstanceState ¶
func (m *MachineScope) GetInstanceState() *infrav1.InstanceState
GetInstanceID returns the AWSMachine instance state from the status.
func (*MachineScope) GetProviderID ¶
func (m *MachineScope) GetProviderID() string
GetProviderID returns the AWSMachine providerID from the spec.
func (*MachineScope) IsControlPlane ¶
func (m *MachineScope) IsControlPlane() bool
IsControlPlane returns true if the machine is a control plane.
func (*MachineScope) Namespace ¶
func (m *MachineScope) Namespace() string
Namespace returns the namespace name.
func (*MachineScope) Role ¶
func (m *MachineScope) Role() string
Role returns the machine role from the labels.
func (*MachineScope) SetAnnotation ¶
func (m *MachineScope) SetAnnotation(key, value string)
SetAnnotation sets a key value annotation on the AWSMachine.
func (*MachineScope) SetErrorMessage ¶
func (m *MachineScope) SetErrorMessage(v error)
SetErrorMessage sets the AWSMachine status error message.
func (*MachineScope) SetErrorReason ¶
func (m *MachineScope) SetErrorReason(v capierrors.MachineStatusError)
SetErrorReason sets the AWSMachine status error reason.
func (*MachineScope) SetInstanceState ¶
func (m *MachineScope) SetInstanceState(v infrav1.InstanceState)
SetInstanceID sets the AWSMachine instance id.
func (*MachineScope) SetProviderID ¶
func (m *MachineScope) SetProviderID(v string)
SetProviderID sets the AWSMachine providerID in spec.
func (*MachineScope) SetReady ¶
func (m *MachineScope) SetReady()
SetReady sets the AWSMachine Ready Status
type MachineScopeGetter ¶
type MachineScopeGetter interface {
MachineScope(params MachineScopeParams) (*MachineScope, error)
}
type MachineScopeGetterFunc ¶
type MachineScopeGetterFunc func(params MachineScopeParams) (*MachineScope, error)
func (MachineScopeGetterFunc) MachineScope ¶
func (f MachineScopeGetterFunc) MachineScope(params MachineScopeParams) (*MachineScope, error)
type MachineScopeParams ¶
type MachineScopeParams struct { AWSClients Client client.Client Logger logr.Logger Cluster *clusterv1.Cluster Machine *clusterv1.Machine AWSCluster *infrav1.AWSCluster AWSMachine *infrav1.AWSMachine }
MachineScopeParams defines the input parameters used to create a new MachineScope.