v1alpha1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the ethereum2 v1alpha1 API group +kubebuilder:object:generate=true +groupName=ethereum2.kotal.io

Index

Constants

View Source
const (
	// ZeroAddress is Ethereum zero address
	ZeroAddress = "0x0000000000000000000000000000000000000000"
	// DefaultP2PPort is the default port used for p2p and discovery
	DefaultP2PPort uint = 9000
	// DefaultRestPort is the default Beacon REST api port
	DefaultRestPort uint = 5051
	// DefaultRPCPort is the default RPC server port
	DefaultRPCPort uint = 4000
	// DefaultGRPCPort is the default GRPC gateway server port
	DefaultGRPCPort uint = 3500
	// DefaultGraffiti is the default text to include in proposed blocks
	DefaultGraffiti = "Powered by Kotal"
	// DefaultLogging is the default logging verbosity
	DefaultLogging = shared.InfoLogs
)
View Source
const (
	// DefaultLighthouseBeaconNodeImage is the default SigmaPrime Ethereum 2.0 beacon node image
	DefaultLighthouseBeaconNodeImage = "kotalco/lighthouse:v4.2.0"
	// DefaultTekuBeaconNodeImage is PegaSys Teku beacon node image
	DefaultTekuBeaconNodeImage = "consensys/teku:23.6.0"
	// DefaultPrysmBeaconNodeImage is Prysmatic Labs beacon node image
	DefaultPrysmBeaconNodeImage = "kotalco/prysm:v4.0.6"
	// DefaultNimbusBeaconNodeImage is the default Status Ethereum 2.0 beacon node image
	DefaultNimbusBeaconNodeImage = "kotalco/nimbus-bn:v23.6.0"
)
View Source
const (
	// DefaultTekuValidatorImage is PegaSys Teku validator client image
	DefaultTekuValidatorImage = "consensys/teku:23.6.0"
	// DefaultPrysmValidatorImage is Prysmatic Labs validator client image
	DefaultPrysmValidatorImage = "kotalco/prysm:v4.0.6"
	// DefaultNimbusValidatorImage is the default Status Ethereum 2.0 validator client image
	DefaultNimbusValidatorImage = "kotalco/nimbus-vc:v23.6.0"
	// DefaultLighthouseValidatorImage is the default SigmaPrime Ethereum 2.0 validator client image
	DefaultLighthouseValidatorImage = "kotalco/lighthouse:v4.2.0"
)
View Source
const (
	// DefaultCPURequest is the default CPU cores required by Ethereum 2.0 node
	DefaultCPURequest = "4"
	// DefaultCPULimit is the default CPU cores limit by Ethereum 2.0 node
	DefaultCPULimit = "8"
	// DefaultMemoryRequest is the default memory required by Ethereum 2.0 node
	DefaultMemoryRequest = "8Gi"
	// DefaultMemoryLimit is the default memory limit by Ethereum 2.0 node
	DefaultMemoryLimit = "16Gi"
	// DefaultStorage is the default disk space used by Ethereum 2.0 node
	DefaultStorage = "200Gi"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "ethereum2.kotal.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	// DefaultOrigins is the default domains from which to accept cross origin requests
	DefaultOrigins = []string{"*"}
)

Functions

This section is empty.

Types

type BeaconNode

type BeaconNode struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BeaconNodeSpec   `json:"spec,omitempty"`
	Status BeaconNodeStatus `json:"status,omitempty"`
}

BeaconNode is the Schema for the beaconnodes API +kubebuilder:printcolumn:name="Client",type=string,JSONPath=".spec.client" +kubebuilder:printcolumn:name="Network",type=string,JSONPath=".spec.network"

func (*BeaconNode) DeepCopy

func (in *BeaconNode) DeepCopy() *BeaconNode

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BeaconNode.

func (*BeaconNode) DeepCopyInto

func (in *BeaconNode) DeepCopyInto(out *BeaconNode)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BeaconNode) DeepCopyObject

func (in *BeaconNode) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*BeaconNode) Default

func (r *BeaconNode) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*BeaconNode) DefaultNodeResources

func (r *BeaconNode) DefaultNodeResources()

DefaultNodeResources defaults Ethereum 2.0 node cpu, memory and storage resources

func (*BeaconNode) SetupWebhookWithManager

func (r *BeaconNode) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager sets up the webook with a given controller manager

func (*BeaconNode) ValidateCreate

func (r *BeaconNode) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*BeaconNode) ValidateDelete

func (r *BeaconNode) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*BeaconNode) ValidateUpdate

func (r *BeaconNode) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type BeaconNodeList

type BeaconNodeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []BeaconNode `json:"items"`
}

BeaconNodeList contains a list of BeaconNodes

func (*BeaconNodeList) DeepCopy

func (in *BeaconNodeList) DeepCopy() *BeaconNodeList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BeaconNodeList.

func (*BeaconNodeList) DeepCopyInto

func (in *BeaconNodeList) DeepCopyInto(out *BeaconNodeList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BeaconNodeList) DeepCopyObject

func (in *BeaconNodeList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BeaconNodeSpec

type BeaconNodeSpec struct {
	// Image is Ethereum 2.0 Beacon node client image
	Image string `json:"image,omitempty"`

	// Network is the network to join
	Network string `json:"network"`
	// Client is the Ethereum 2.0 client to use
	Client Ethereum2Client `json:"client"`
	// ExecutionEngineEndpoint is Ethereum Execution engine node endpoint
	ExecutionEngineEndpoint string `json:"executionEngineEndpoint"`
	// JWTSecretName is kubernetes secret name holding JWT secret
	JWTSecretName string `json:"jwtSecretName"`
	// FeeRecipient is ethereum address collecting transaction fees
	FeeRecipient shared.EthereumAddress `json:"feeRecipient,omitempty"`

	// CheckpointSyncURL is trusted beacon node rest api endpoint
	CheckpointSyncURL string `json:"checkpointSyncUrl,omitempty"`

	// REST enables Beacon REST API
	REST bool `json:"rest,omitempty"`
	// RESTPort is Beacon REST API server port
	RESTPort uint `json:"restPort,omitempty"`

	// RPC enables RPC server
	RPC bool `json:"rpc,omitempty"`
	// RPCPort is RPC server port
	RPCPort uint `json:"rpcPort,omitempty"`

	// GRPC enables GRPC gateway server
	GRPC bool `json:"grpc,omitempty"`
	// GRPCPort is GRPC gateway server port
	GRPCPort uint `json:"grpcPort,omitempty"`

	// CertSecretName is k8s secret name that holds tls.key and tls.cert
	CertSecretName string `json:"certSecretName,omitempty"`

	// Logging is logging verboisty level
	// +kubebuilder:validation:Enum=off;fatal;error;warn;info;debug;trace;all;notice;crit;panic;none
	Logging shared.VerbosityLevel `json:"logging,omitempty"`

	// Hosts is a list of hostnames to to whitelist for API access
	// +listType=set
	Hosts []string `json:"hosts,omitempty"`
	// CORSDomains is the domains from which to accept cross origin requests
	// +listType=set
	CORSDomains []string `json:"corsDomains,omitempty"`

	// P2PPort is p2p and discovery port
	P2PPort uint `json:"p2pPort,omitempty"`

	// Resources is node compute and storage resources
	shared.Resources `json:"resources,omitempty"`
}

BeaconNodeSpec defines the desired state of BeaconNode

func (*BeaconNodeSpec) DeepCopy

func (in *BeaconNodeSpec) DeepCopy() *BeaconNodeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BeaconNodeSpec.

func (*BeaconNodeSpec) DeepCopyInto

func (in *BeaconNodeSpec) DeepCopyInto(out *BeaconNodeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BeaconNodeStatus

type BeaconNodeStatus struct {
}

BeaconNodeStatus defines the observed state of BeaconNode

func (*BeaconNodeStatus) DeepCopy

func (in *BeaconNodeStatus) DeepCopy() *BeaconNodeStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BeaconNodeStatus.

func (*BeaconNodeStatus) DeepCopyInto

func (in *BeaconNodeStatus) DeepCopyInto(out *BeaconNodeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Ethereum2Client

type Ethereum2Client string

Ethereum2Client is Ethereum 2.0 client +kubebuilder:validation:Enum=teku;prysm;lighthouse;nimbus

const (
	// TekuClient is ConsenSys Pegasys Ethereum 2.0 client
	TekuClient Ethereum2Client = "teku"
	// PrysmClient is Prysmatic Labs Ethereum 2.0 client
	PrysmClient Ethereum2Client = "prysm"
	// LighthouseClient is SigmaPrime Ethereum 2.0 client
	LighthouseClient Ethereum2Client = "lighthouse"
	// NimbusClient is Status Ethereum 2.0 client
	NimbusClient Ethereum2Client = "nimbus"
)

func (Ethereum2Client) SupportsVerbosityLevel

func (client Ethereum2Client) SupportsVerbosityLevel(level shared.VerbosityLevel, validator bool) bool

type Keystore

type Keystore struct {
	// PublicKey is the validator public key in hexadecimal
	// +kubebuilder:validation:Pattern="^0[xX][0-9a-fA-F]{96}$"
	PublicKey string `json:"publicKey,omitempty"`
	// SecretName is the kubernetes secret holding [keystore] and [password]
	SecretName string `json:"secretName"`
}

Keystore is Ethereum 2.0 validator EIP-2335 BLS12-381 keystore https://eips.ethereum.org/EIPS/eip-2335

func (*Keystore) DeepCopy

func (in *Keystore) DeepCopy() *Keystore

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Keystore.

func (*Keystore) DeepCopyInto

func (in *Keystore) DeepCopyInto(out *Keystore)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Validator

type Validator struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ValidatorSpec   `json:"spec,omitempty"`
	Status ValidatorStatus `json:"status,omitempty"`
}

Validator is the Schema for the validators API +kubebuilder:printcolumn:name="Client",type=string,JSONPath=".spec.client" +kubebuilder:printcolumn:name="Network",type=string,JSONPath=".spec.network"

func (*Validator) DeepCopy

func (in *Validator) DeepCopy() *Validator

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Validator.

func (*Validator) DeepCopyInto

func (in *Validator) DeepCopyInto(out *Validator)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Validator) DeepCopyObject

func (in *Validator) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Validator) Default

func (r *Validator) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Validator) DefaultNodeResources

func (r *Validator) DefaultNodeResources()

DefaultNodeResources defaults Ethereum 2.0 validator client cpu, memory and storage resources

func (*Validator) SetupWebhookWithManager

func (r *Validator) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager sets up the webook with a given controller manager

func (*Validator) ValidateCreate

func (r *Validator) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Validator) ValidateDelete

func (r *Validator) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Validator) ValidateUpdate

func (r *Validator) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ValidatorList

type ValidatorList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Validator `json:"items"`
}

ValidatorList contains a list of Validator

func (*ValidatorList) DeepCopy

func (in *ValidatorList) DeepCopy() *ValidatorList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorList.

func (*ValidatorList) DeepCopyInto

func (in *ValidatorList) DeepCopyInto(out *ValidatorList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ValidatorList) DeepCopyObject

func (in *ValidatorList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ValidatorSpec

type ValidatorSpec struct {
	// Image is Ethereum 2.0 validator client image
	Image string `json:"image,omitempty"`

	// Network is the network this validator is validating blocks for
	Network string `json:"network"`
	// Client is the Ethereum 2.0 client to use
	Client Ethereum2Client `json:"client"`
	// FeeRecipient is ethereum address collecting transaction fees
	FeeRecipient shared.EthereumAddress `json:"feeRecipient,omitempty"`
	// BeaconEndpoints is beacon node endpoints
	// +kubebuilder:validation:MinItems=1
	// +listType=set
	BeaconEndpoints []string `json:"beaconEndpoints"`
	// Graffiti is the text to include in proposed blocks
	Graffiti string `json:"graffiti,omitempty"`
	// Logging is logging verboisty level
	// +kubebuilder:validation:Enum=off;fatal;error;warn;info;debug;trace;all;notice;crit;panic;none
	Logging shared.VerbosityLevel `json:"logging,omitempty"`
	// CertSecretName is k8s secret name that holds tls.crt
	CertSecretName string `json:"certSecretName,omitempty"`
	// Keystores is a list of Validator keystores
	// +kubebuilder:validation:MinItems=1
	Keystores []Keystore `json:"keystores"`
	// WalletPasswordSecret is wallet password secret
	WalletPasswordSecret string `json:"walletPasswordSecret,omitempty"`
	// Resources is node compute and storage resources
	shared.Resources `json:"resources,omitempty"`
}

ValidatorSpec defines the desired state of Validator

func (*ValidatorSpec) DeepCopy

func (in *ValidatorSpec) DeepCopy() *ValidatorSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorSpec.

func (*ValidatorSpec) DeepCopyInto

func (in *ValidatorSpec) DeepCopyInto(out *ValidatorSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ValidatorStatus

type ValidatorStatus struct{}

ValidatorStatus defines the observed state of Validator

func (*ValidatorStatus) DeepCopy

func (in *ValidatorStatus) DeepCopy() *ValidatorStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorStatus.

func (*ValidatorStatus) DeepCopyInto

func (in *ValidatorStatus) DeepCopyInto(out *ValidatorStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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