Documentation
¶
Index ¶
- func EtcdClusterMachines(clusterName string) func(machine *clusterv1.Machine) bool
- func EtcdLabelsForCluster(clusterName string) map[string]string
- func EtcdMachinesSelectorForCluster(clusterName string) labels.Selector
- func MatchesEtcdadmClusterConfiguration(infraConfigs map[string]*unstructured.Unstructured, ...) func(machine *clusterv1.Machine) bool
- func MatchesEtcdadmConfig(machineConfigs map[string]*etcdbpv1alpha3.EtcdadmConfig, ...) collections.Func
- func MatchesTemplateClonedFrom(infraConfigs map[string]*unstructured.Unstructured, ec *etcdv1.EtcdadmCluster) collections.Func
- type EtcdPlane
- func (ep *EtcdPlane) FailureDomainWithMostMachines(machines collections.FilterableMachineCollection) *string
- func (ep *EtcdPlane) FailureDomains() clusterv1.FailureDomains
- func (ep *EtcdPlane) MachineInFailureDomainWithMostMachines(machines collections.FilterableMachineCollection) (*clusterv1.Machine, error)
- func (ep *EtcdPlane) MachineWithDeleteAnnotation(machines collections.FilterableMachineCollection) collections.FilterableMachineCollection
- func (ep *EtcdPlane) MachinesNeedingRollout() collections.FilterableMachineCollection
- func (ep *EtcdPlane) NextFailureDomainForScaleUp() *string
- func (ep *EtcdPlane) UpToDateMachines() collections.FilterableMachineCollection
- type EtcdadmClusterReconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EtcdClusterMachines ¶
EtcdClusterMachines returns a filter to find all etcd machines for a cluster, regardless of ownership.
func EtcdLabelsForCluster ¶
ControlPlaneLabelsForCluster returns a set of labels to add to a control plane machine for this specific cluster.
func EtcdMachinesSelectorForCluster ¶
EtcdMachinesSelectorForCluster returns the label selector necessary to get etcd machines for a given cluster.
func MatchesEtcdadmClusterConfiguration ¶
func MatchesEtcdadmClusterConfiguration(infraConfigs map[string]*unstructured.Unstructured, machineConfigs map[string]*etcdbpv1alpha3.EtcdadmConfig, ec *etcdv1.EtcdadmCluster) func(machine *clusterv1.Machine) bool
MatchesEtcdadmClusterConfiguration returns a filter to find all machines that matches with EtcdadmCluster config and do not require any rollout. Etcd version and extra params, and infrastructure template need to be equivalent.
func MatchesEtcdadmConfig ¶
func MatchesEtcdadmConfig(machineConfigs map[string]*etcdbpv1alpha3.EtcdadmConfig, ec *etcdv1.EtcdadmCluster) collections.Func
MatchesEtcdadmConfig checks if machine's EtcdadmConfigSpec is equivalent with EtcdadmCluster's spec
func MatchesTemplateClonedFrom ¶
func MatchesTemplateClonedFrom(infraConfigs map[string]*unstructured.Unstructured, ec *etcdv1.EtcdadmCluster) collections.Func
MatchesTemplateClonedFrom returns a filter to find all machines that match a given EtcdadmCluster's infra template.
Types ¶
type EtcdPlane ¶
type EtcdPlane struct {
EC *etcdv1.EtcdadmCluster
Cluster *clusterv1.Cluster
Machines collections.FilterableMachineCollection
// contains filtered or unexported fields
}
func NewEtcdPlane ¶
func NewEtcdPlane(ctx context.Context, client client.Client, cluster *clusterv1.Cluster, ec *etcdv1.EtcdadmCluster, ownedMachines collections.FilterableMachineCollection) (*EtcdPlane, error)
func (*EtcdPlane) FailureDomainWithMostMachines ¶
func (ep *EtcdPlane) FailureDomainWithMostMachines(machines collections.FilterableMachineCollection) *string
FailureDomainWithMostMachines returns a fd which has the most machines on it.
func (*EtcdPlane) FailureDomains ¶
func (ep *EtcdPlane) FailureDomains() clusterv1.FailureDomains
FailureDomains returns a slice of failure domain objects synced from the infrastructure provider into Cluster.Status.
func (*EtcdPlane) MachineInFailureDomainWithMostMachines ¶
func (ep *EtcdPlane) MachineInFailureDomainWithMostMachines(machines collections.FilterableMachineCollection) (*clusterv1.Machine, error)
MachineInFailureDomainWithMostMachines returns the first matching failure domain with machines that has the most control-plane machines on it.
func (*EtcdPlane) MachineWithDeleteAnnotation ¶
func (ep *EtcdPlane) MachineWithDeleteAnnotation(machines collections.FilterableMachineCollection) collections.FilterableMachineCollection
MachineWithDeleteAnnotation returns a machine that has been annotated with DeleteMachineAnnotation key.
func (*EtcdPlane) MachinesNeedingRollout ¶
func (ep *EtcdPlane) MachinesNeedingRollout() collections.FilterableMachineCollection
MachinesNeedingRollout return a list of machines that need to be rolled out.
func (*EtcdPlane) NextFailureDomainForScaleUp ¶
NextFailureDomainForScaleUp returns the failure domain with the fewest number of up-to-date machines.
func (*EtcdPlane) UpToDateMachines ¶
func (ep *EtcdPlane) UpToDateMachines() collections.FilterableMachineCollection
UpToDateMachines returns the machines that are up to date with the control plane's configuration and therefore do not require rollout.
type EtcdadmClusterReconciler ¶
type EtcdadmClusterReconciler struct {
client.Client
Log logr.Logger
Scheme *runtime.Scheme
// contains filtered or unexported fields
}
EtcdadmClusterReconciler reconciles a EtcdadmCluster object
func (*EtcdadmClusterReconciler) ClusterToEtcdadmCluster ¶
func (r *EtcdadmClusterReconciler) ClusterToEtcdadmCluster(o handler.MapObject) []ctrl.Request
ClusterToEtcdadmCluster is a handler.ToRequestsFunc to be used to enqueue requests for reconciliation for EtcdadmCluster based on updates to a Cluster.
func (*EtcdadmClusterReconciler) SetupWithManager ¶
func (r *EtcdadmClusterReconciler) SetupWithManager(mgr ctrl.Manager) error