Documentation ¶
Index ¶
- type ClusterScope
- func (s *ClusterScope) Close() error
- func (s *ClusterScope) ControlPlaneConfigMapName() string
- func (s *ClusterScope) ListOptionsLabelSelector() client.ListOption
- func (s *ClusterScope) LoadBalancerBackendPort() int64
- func (s *ClusterScope) LoadBalancerFrontendPort() int64
- func (s *ClusterScope) Name() string
- func (s *ClusterScope) Namespace() string
- func (s *ClusterScope) Network() *infrav1.Network
- func (s *ClusterScope) NetworkName() string
- func (s *ClusterScope) NetworkSelfLink() string
- func (s *ClusterScope) PatchObject() error
- func (s *ClusterScope) Project() string
- func (s *ClusterScope) Region() string
- func (s *ClusterScope) Subnets() infrav1.Subnets
- type ClusterScopeGetter
- type ClusterScopeGetterFunc
- type ClusterScopeParams
- type GCPClients
- type MachineScope
- func (m *MachineScope) Close() error
- func (m *MachineScope) GetBootstrapData() (string, error)
- func (m *MachineScope) GetInstanceID() *string
- func (m *MachineScope) GetInstanceStatus() *infrav1.InstanceStatus
- func (m *MachineScope) GetProviderID() string
- func (m *MachineScope) IsControlPlane() bool
- func (m *MachineScope) Name() string
- func (m *MachineScope) Namespace() string
- func (m *MachineScope) PatchObject() error
- func (m *MachineScope) Region() string
- func (m *MachineScope) Role() string
- func (m *MachineScope) SetAddresses(addressList []corev1.NodeAddress)
- func (m *MachineScope) SetAnnotation(key, value string)
- func (m *MachineScope) SetFailureMessage(v error)
- func (m *MachineScope) SetFailureReason(v capierrors.MachineStatusError)
- func (m *MachineScope) SetInstanceStatus(v infrav1.InstanceStatus)
- func (m *MachineScope) SetProviderID(v string)
- func (m *MachineScope) SetReady()
- func (m *MachineScope) Zone() string
- type MachineScopeGetter
- type MachineScopeGetterFunc
- type MachineScopeParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterScope ¶
type ClusterScope struct { logr.Logger GCPClients Cluster *clusterv1.Cluster GCPCluster *infrav1.GCPCluster // 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) 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) ListOptionsLabelSelector ¶
func (s *ClusterScope) ListOptionsLabelSelector() client.ListOption
ListOptionsLabelSelector returns a ListOptions with a label selector for clusterName.
func (*ClusterScope) LoadBalancerBackendPort ¶
func (s *ClusterScope) LoadBalancerBackendPort() int64
LoadBalancerBackendPort returns the loadbalancer backend if specified.
func (*ClusterScope) LoadBalancerFrontendPort ¶
func (s *ClusterScope) LoadBalancerFrontendPort() int64
LoadBalancerFrontendPort returns the loadbalancer frontend if specified in the cluster resource's network configuration.
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) NetworkName ¶
func (s *ClusterScope) NetworkName() string
NetworkName returns the cluster network unique identifier.
func (*ClusterScope) NetworkSelfLink ¶
func (s *ClusterScope) NetworkSelfLink() string
NetworkSelfLink returns the full self link to the network.
func (*ClusterScope) PatchObject ¶
func (s *ClusterScope) PatchObject() error
PatchObject persists the cluster configuration and status.
func (*ClusterScope) Project ¶
func (s *ClusterScope) Project() string
Project returns the current project name.
func (*ClusterScope) Region ¶
func (s *ClusterScope) Region() string
Region returns the cluster region.
func (*ClusterScope) Subnets ¶
func (s *ClusterScope) Subnets() infrav1.Subnets
Subnets returns the cluster subnets.
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 { GCPClients Client client.Client Logger logr.Logger Cluster *clusterv1.Cluster GCPCluster *infrav1.GCPCluster }
ClusterScopeParams defines the input parameters used to create a new Scope.
type GCPClients ¶
type GCPClients struct {
Compute *compute.Service
}
GCPClients contains all the gcp clients used by the scopes.
type MachineScope ¶
type MachineScope struct { logr.Logger Cluster *clusterv1.Cluster Machine *clusterv1.Machine GCPCluster *infrav1.GCPCluster GCPMachine *infrav1.GCPMachine // 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) Close ¶
func (m *MachineScope) Close() error
Close closes the current scope persisting the cluster configuration and status.
func (*MachineScope) GetBootstrapData ¶
func (m *MachineScope) GetBootstrapData() (string, error)
GetBootstrapData returns the bootstrap data from the secret in the Machine's bootstrap.dataSecretName.
func (*MachineScope) GetInstanceID ¶
func (m *MachineScope) GetInstanceID() *string
GetInstanceID returns the GCPMachine instance id by parsing Spec.ProviderID.
func (*MachineScope) GetInstanceStatus ¶
func (m *MachineScope) GetInstanceStatus() *infrav1.InstanceStatus
GetInstanceStatus returns the GCPMachine instance status.
func (*MachineScope) GetProviderID ¶
func (m *MachineScope) GetProviderID() string
GetProviderID returns the GCPMachine 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) PatchObject ¶
func (m *MachineScope) PatchObject() error
PatchObject persists the cluster configuration and status.
func (*MachineScope) Region ¶
func (m *MachineScope) Region() string
Region returns the GCPMachine region.
func (*MachineScope) Role ¶
func (m *MachineScope) Role() string
Role returns the machine role from the labels.
func (*MachineScope) SetAddresses ¶
func (m *MachineScope) SetAddresses(addressList []corev1.NodeAddress)
SetAddresses sets the addresses field on the GCPMachine.
func (*MachineScope) SetAnnotation ¶
func (m *MachineScope) SetAnnotation(key, value string)
SetAnnotation sets a key value annotation on the GCPMachine.
func (*MachineScope) SetFailureMessage ¶
func (m *MachineScope) SetFailureMessage(v error)
SetFailureMessage sets the GCPMachine status failure message.
func (*MachineScope) SetFailureReason ¶
func (m *MachineScope) SetFailureReason(v capierrors.MachineStatusError)
SetFailureReason sets the GCPMachine status failure reason.
func (*MachineScope) SetInstanceStatus ¶
func (m *MachineScope) SetInstanceStatus(v infrav1.InstanceStatus)
SetInstanceStatus sets the GCPMachine instance status.
func (*MachineScope) SetProviderID ¶
func (m *MachineScope) SetProviderID(v string)
SetProviderID sets the GCPMachine providerID in spec.
func (*MachineScope) SetReady ¶
func (m *MachineScope) SetReady()
SetReady sets the GCPMachine Ready Status.
func (*MachineScope) Zone ¶
func (m *MachineScope) Zone() string
Zone returns the FailureDomain for the GCPMachine.
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 { GCPClients Client client.Client Logger logr.Logger Cluster *clusterv1.Cluster Machine *clusterv1.Machine GCPCluster *infrav1.GCPCluster GCPMachine *infrav1.GCPMachine }
MachineScopeParams defines the input parameters used to create a new MachineScope.