initserver

package
v2.2.0-pre Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

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,
		cloudServiceAccountURI string,
		k8sVersion string,
		measurementSalt []byte,
		enforcedPcrs []uint32,
		enforceIDKeyDigest bool,
		idKeyDigest []byte,
		azureCVM bool,
		kmsConfig resources.KMSConfig,
		sshUserKeys map[string]string,
		helmDeployments []byte,
		conformanceMode bool,
		log *logger.Logger,
	) ([]byte, error)
}

ClusterInitializer has the ability to initialize a cluster.

type IssuerWrapper

type IssuerWrapper struct {
	atls.Issuer
	// contains filtered or unexported fields
}

func NewIssuerWrapper

func NewIssuerWrapper(issuer atls.Issuer, vmType vmtype.VMType, idkeydigest []byte) IssuerWrapper

func (*IssuerWrapper) IDKeyDigest

func (i *IssuerWrapper) IDKeyDigest() []byte

func (*IssuerWrapper) VMType

func (i *IssuerWrapper) VMType() vmtype.VMType

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(lock locker, kube ClusterInitializer, issuerWrapper IssuerWrapper, fh file.Handler, log *logger.Logger) *Server

New creates a new initialization server.

func (*Server) Init

Init initializes the cluster.

func (*Server) Serve

func (s *Server) Serve(ip, port string, cleaner cleaner) error

Serve starts the initialization server.

func (*Server) Stop

func (s *Server) Stop()

Stop stops the initialization server gracefully.

Jump to

Keyboard shortcuts

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