k8s

package
v1.15.13 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package k8s provides a Kubernetes-based deployment engine for Lux networks. It implements the Engine interface to deploy validator nodes as StatefulSets.

Index

Constants

View Source
const (
	EngineK8s engines.EngineType = "k8s"
)

Variables

This section is empty.

Functions

func NewEngine

func NewEngine(name string, image string) (engines.Engine, error)

NewEngine creates a new K8s engine

Types

type Engine

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

Engine implements the Engine interface for Kubernetes deployments

func (*Engine) ChainID

func (e *Engine) ChainID() ids.ID

ChainID returns the chain ID

func (*Engine) Clean

func (e *Engine) Clean(ctx context.Context) error

Clean removes all K8s resources including PVCs and namespace

func (*Engine) GetExternalIP

func (e *Engine) GetExternalIP(ctx context.Context) (string, error)

GetExternalIP returns the external LoadBalancer IP

func (*Engine) Health

func (e *Engine) Health(ctx context.Context) (*engines.HealthStatus, error)

Health checks the health of the deployed network

func (*Engine) IsRunning

func (e *Engine) IsRunning() bool

IsRunning returns whether the engine is running

func (*Engine) Metrics

func (e *Engine) Metrics() map[string]interface{}

Metrics returns engine metrics

func (*Engine) Name

func (e *Engine) Name() string

Name returns the engine name

func (*Engine) NetworkID

func (e *Engine) NetworkID() uint32

NetworkID returns the network ID

func (*Engine) P2PEndpoint

func (e *Engine) P2PEndpoint() string

P2PEndpoint returns the staking/P2P endpoint

func (*Engine) ParentChain

func (e *Engine) ParentChain() *engines.ChainInfo

ParentChain returns nil (Lux is L1)

func (*Engine) RPCEndpoint

func (e *Engine) RPCEndpoint() string

RPCEndpoint returns the external RPC endpoint

func (*Engine) Restart

func (e *Engine) Restart(ctx context.Context) error

Restart performs a rolling restart

func (*Engine) Start

func (e *Engine) Start(ctx context.Context, config *engines.NodeConfig) error

Start deploys the Lux network to Kubernetes

func (*Engine) Stop

func (e *Engine) Stop(ctx context.Context) error

Stop removes the Kubernetes resources

func (*Engine) Type

func (e *Engine) Type() engines.EngineType

Type returns the engine type

func (*Engine) Uptime

func (e *Engine) Uptime() time.Duration

Uptime returns how long the engine has been running

func (*Engine) WSEndpoint

func (e *Engine) WSEndpoint() string

WSEndpoint returns the external WebSocket endpoint

Jump to

Keyboard shortcuts

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