vmapi

package
v0.0.0-...-97303f7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API is the API.

func New

func New(logger *zap.Logger, core Core, dialer Dialer) *API

New creates a new API.

func (*API) GetJoinDataKube

GetJoinDataKube returns the join data for the kubernetes cluster. This function will be used by all master nodes except the first one and all worker nodes.

func (*API) InitFirstMaster

InitFirstMaster executes the kubeadm init command on the first master node. The subsequent master nodes will join the cluster automatically.

type Core

type Core interface {
	ConnectToKubernetes() error
	GetJoinToken(time.Duration) (*kubeadm.BootstrapTokenDiscovery, error)
	GetControlPlaneCertificatesAndKeys() (map[string][]byte, error)
	IsInReadyState() bool
	IsReadyForInit() bool
	SetJoiningCluster()
	SetInitialized()
}

Core interface contains functions to access the state Core data.

type Dialer

type Dialer interface {
	DialContext(ctx context.Context, network, address string) (net.Conn, error)
}

Dialer is the dial interface. Necessary to stub network connections for local testing with bufconns.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL