Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterJoiner ¶
type ClusterJoiner interface { // JoinCluster joins a new node to an existing cluster. JoinCluster( ctx context.Context, args *kubeadm.BootstrapTokenDiscovery, peerRole role.Role, k8sVersion string, log *logger.Logger, ) error }
ClusterJoiner has the ability to join a new node to an existing cluster.
type JoinClient ¶
type JoinClient struct {
// contains filtered or unexported fields
}
JoinClient is a client for requesting the needed information and joining an existing Kubernetes cluster.
func New ¶
func New(lock locker, dial grpcDialer, joiner ClusterJoiner, meta MetadataAPI, log *logger.Logger) *JoinClient
New creates a new JoinClient.
func (*JoinClient) Start ¶
func (c *JoinClient) Start(cleaner cleaner)
Start starts the client routine. The client will make the needed API calls to join the cluster with the role it receives from the metadata API. After receiving the needed information, the node will join the cluster. Multiple calls of start on the same client won't start a second routine if there is already a routine running.
func (*JoinClient) Stop ¶
func (c *JoinClient) Stop()
Stop stops the client and blocks until the client's routine is stopped.
type MetadataAPI ¶
type MetadataAPI interface { // List retrieves all instances belonging to the current constellation. List(ctx context.Context) ([]metadata.InstanceMetadata, error) // Self retrieves the current instance. Self(ctx context.Context) (metadata.InstanceMetadata, error) }
MetadataAPI provides information about the instances.