Documentation ¶
Overview ¶
Package docker implements docker functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodePool ¶
type NodePool struct {
// contains filtered or unexported fields
}
NodePool is a wrapper around a collection of like machines which are owned by a DockerMachinePool. A node pool provides a friendly way of managing (adding, deleting, updating) a set of docker machines. The node pool will also sync the docker machine pool status Instances field with the state of the docker machines.
func NewNodePool ¶
func NewNodePool(ctx context.Context, c client.Client, cluster *clusterv1.Cluster, mp *expv1.MachinePool, dmp *infraexpv1.DockerMachinePool) (*NodePool, error)
NewNodePool creates a new node pool instances.
func (*NodePool) ReconcileMachines ¶
func (np *NodePool) ReconcileMachines(ctx context.Context, remoteClient client.Client) (ctrl.Result, error)
ReconcileMachines will build enough machines to satisfy the machine pool / docker machine pool spec eventually delete all the machine in excess, and update the status for all the machines.
NOTE: The goal for the current implementation is to verify MachinePool construct; accordingly, currently the nodepool supports only a recreate strategy for replacing old nodes with new ones (all existing machines are killed before new ones are created). TODO: consider if to support a Rollout strategy (a more progressive node replacement).