cluster-api: sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/docker Index | Files

package docker

import "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/docker"

Index

Package Files

nodepool.go

type NodePool Uses

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, reimaging) 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 Uses

func NewNodePool(kClient client.Client, cluster *clusterv1.Cluster, mp *clusterv1exp.MachinePool, dmp *infrav1exp.DockerMachinePool) (*NodePool, error)

NewNodePool creates a new node pool instances

func (*NodePool) Delete Uses

func (np *NodePool) Delete(ctx context.Context) error

Delete will delete all of the machines in the node pool

func (*NodePool) ReconcileMachines Uses

func (np *NodePool) ReconcileMachines(ctx context.Context) (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).

Package docker imports 15 packages (graph) and is imported by 1 packages. Updated 2021-01-26. Refresh now. Tools for package owners.