import "sigs.k8s.io/cluster-api/test/infrastructure/docker/docker"
errors.go kind_manager.go loadbalancer.go machine.go util.go
const ControlPlanePort = 6443
const KubeadmContainerPort = 6443
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
ContainerNotRunningError is returned when trying to patch a container that is not running
func (cse ContainerNotRunningError) Error() string
Error returns the error string
type LoadBalancer struct {
// contains filtered or unexported fields
}
LoadBalancer manages the load balancer for a specific docker cluster.
func NewLoadBalancer(name string) (*LoadBalancer, error)
NewLoadBalancer returns a new helper for managing a docker loadbalancer with a given name.
func (s *LoadBalancer) Create(ctx context.Context) error
Create creates a docker container hosting a load balancer for the cluster.
func (s *LoadBalancer) Delete(ctx context.Context) error
Delete the docker container hosting the cluster load balancer.
IP returns the load balancer IP address
func (s *LoadBalancer) UpdateConfiguration(ctx context.Context) error
UpdateConfiguration updates the external load balancer configuration with new control plane nodes.
type Machine struct {
// contains filtered or unexported fields
}
Machine implement a service for managing the docker containers hosting a kubernetes nodes.
NewMachine returns a new Machine service for the given Cluster/DockerCluster pair.
CheckForBootstrapSuccess checks if bootstrap was successful by checking for existence of the sentinel file.
ContainerName return the name of the container for this machine
func (m *Machine) Create(ctx context.Context, role string, version *string, mounts []infrav1.Mount) error
Create creates a docker container hosting a Kubernetes node.
Delete deletes a docker container hosting a Kubernetes node.
ExecBootstrap runs bootstrap on a node, this is generally `kubeadm <init|join>`
Exists returns true if the container for this machine exists.
ImageVersion returns the version of the image used or nil if not specified NOTE: Image version might be different from the Kubernetes version, because some characters allowed by semver (e.g. +) can't be used for image tags, so they are replaced with "_".
IsControlPlane returns true if the container for this machine is a control plane node
Name returns the name of the machine
ProviderID return the provider identifier for this machine
SetNodeProviderID sets the docker provider ID for the kubernetes node
type Manager struct{}
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 (m *Manager) CreateExternalLoadBalancerNode(name, image, clusterLabel, listenAddress string, port int32) (*types.Node, error)
func (m *Manager) CreateWorkerNode(name, image, clusterLabel string, mounts []v1alpha4.Mount, portMappings []v1alpha4.PortMapping, labels map[string]string) (*types.Node, error)
type RunOpt func(*runOpts) *runOpts
RunOpt is an option for run
Path | Synopsis |
---|---|
types |
Package docker imports 21 packages (graph) and is imported by 2 packages. Updated 2021-01-24. Refresh now. Tools for package owners.