Documentation ¶
Overview ¶
InitServer ¶
The InitServer is one of the two main components of the bootstrapper. It is responsible for the initial setup of a node, and the initialization of the Kubernetes cluster.
The InitServer is started on each node, and waits for either a call from the CLI, or for the JoinClient to connect to an existing cluster.
If a call from the CLI is received, the InitServer bootstraps the Kubernetes cluster, and stops the JoinClient.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterInitializer ¶
type ClusterInitializer interface { // InitCluster initializes a new Kubernetes cluster. InitCluster( ctx context.Context, k8sVersion string, clusterName string, conformanceMode bool, kubernetesComponents components.Components, apiServerCertSANs []string, serviceCIDR string, ) ([]byte, error) }
ClusterInitializer has the ability to initialize a cluster.
type MetadataAPI ¶ added in v2.3.0
type MetadataAPI interface { // InitSecretHash returns the initSecretHash of the instance. InitSecretHash(ctx context.Context) ([]byte, error) }
MetadataAPI provides information about the instances.
type Server ¶
type Server struct { initproto.UnimplementedAPIServer // contains filtered or unexported fields }
Server is the initialization server, which is started on each node. The server handles initialization calls from the CLI and initializes the Kubernetes cluster.
func New ¶
func New( ctx context.Context, lock locker, kube ClusterInitializer, issuer atls.Issuer, disk encryptedDisk, fh file.Handler, metadata MetadataAPI, log *slog.Logger, ) (*Server, error)
New creates a new initialization server.
func (*Server) Init ¶
func (s *Server) Init(req *initproto.InitRequest, stream initproto.API_InitServer) (retErr error)
Init initializes the cluster.