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

package docker

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

Index

Package Files

kind_manager.go loadbalancer.go machine.go util.go

Constants

const ControlPlanePort = 6443
const KubeadmContainerPort = 6443

func List Uses

func List(filters ...string) ([]*types.Node, error)

List returns the list of container IDs for the kind "nodes", optionally filtered by docker ps filters https://docs.docker.com/engine/reference/commandline/ps/#filtering

type LoadBalancer Uses

type LoadBalancer struct {
    // contains filtered or unexported fields
}

LoadBalancer manages the load balancer for a specific docker cluster.

func NewLoadBalancer Uses

func NewLoadBalancer(name string, logger logr.Logger) (*LoadBalancer, error)

NewLoadBalancer returns a new helper for managing a docker loadbalancer with a given name.

func (*LoadBalancer) Create Uses

func (s *LoadBalancer) Create() error

Create creates a docker container hosting a load balancer for the cluster.

func (*LoadBalancer) Delete Uses

func (s *LoadBalancer) Delete(ctx context.Context) error

Delete the docker container hosting the cluster load balancer.

func (*LoadBalancer) IP Uses

func (s *LoadBalancer) IP(ctx context.Context) (string, error)

IP returns the load balancer IP address

func (*LoadBalancer) UpdateConfiguration Uses

func (s *LoadBalancer) UpdateConfiguration(ctx context.Context) error

UpdateConfiguration updates the external load balancer configuration with new control plane nodes.

type Machine Uses

type Machine struct {
    // contains filtered or unexported fields
}

Machine implement a service for managing the docker containers hosting a kubernetes nodes.

func ListMachinesByCluster Uses

func ListMachinesByCluster(cluster string, labels map[string]string, logger logr.Logger) ([]*Machine, error)

func NewMachine Uses

func NewMachine(cluster, machine, image string, labels map[string]string, logger logr.Logger) (*Machine, error)

NewMachine returns a new Machine service for the given Cluster/DockerCluster pair.

func (*Machine) Address Uses

func (m *Machine) Address(ctx context.Context) (string, error)

func (*Machine) ContainerName Uses

func (m *Machine) ContainerName() string

ContainerName return the name of the container for this machine

func (*Machine) Create Uses

func (m *Machine) Create(ctx context.Context, role string, version *string, mounts []infrav1.Mount) error

Create creates a docker container hosting a Kubernetes node.

func (*Machine) Delete Uses

func (m *Machine) Delete(ctx context.Context) error

Delete deletes a docker container hosting a Kubernetes node.

func (*Machine) ExecBootstrap Uses

func (m *Machine) ExecBootstrap(ctx context.Context, data string) error

ExecBootstrap runs bootstrap on a node, this is generally `kubeadm <init|join>`

func (*Machine) Exists Uses

func (m *Machine) Exists() bool

Exists returns true if the container for this machine exists.

func (*Machine) ImageVersion Uses

func (m *Machine) ImageVersion() string

ImageVersion returns the version of the image used or nil if not specified

func (*Machine) IsControlPlane Uses

func (m *Machine) IsControlPlane() bool

IsControlPlane returns true if the container for this machine is a control plane node

func (*Machine) Name Uses

func (m *Machine) Name() string

Name returns the name of the machine

func (*Machine) PreloadLoadImages Uses

func (m *Machine) PreloadLoadImages(ctx context.Context, images []string) error

func (*Machine) ProviderID Uses

func (m *Machine) ProviderID() string

ProviderID return the provider identifier for this machine

func (*Machine) SetNodeProviderID Uses

func (m *Machine) SetNodeProviderID(ctx context.Context) error

SetNodeProviderID sets the docker provider ID for the kubernetes node

type Manager Uses

type Manager struct{}

func (*Manager) CreateControlPlaneNode Uses

func (m *Manager) CreateControlPlaneNode(name, image, clusterLabel, listenAddress string, port int32, mounts []v1alpha4.Mount, portMappings []v1alpha4.PortMapping, labels map[string]string) (*types.Node, error)

func (*Manager) CreateExternalLoadBalancerNode Uses

func (m *Manager) CreateExternalLoadBalancerNode(name, image, clusterLabel, listenAddress string, port int32) (*types.Node, error)

func (*Manager) CreateWorkerNode Uses

func (m *Manager) CreateWorkerNode(name, image, clusterLabel string, mounts []v1alpha4.Mount, portMappings []v1alpha4.PortMapping, labels map[string]string) (*types.Node, error)

type RunOpt Uses

type RunOpt func(*runOpts) *runOpts

RunOpt is an option for run

Directories

PathSynopsis
types

Package docker imports 20 packages (graph) and is imported by 2 packages. Updated 2020-10-29. Refresh now. Tools for package owners.