v1alpha1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 5

Documentation

Overview

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

Index

Constants

View Source
const (
	// DefaltReplicas is the default replicas
	DefaltReplicas uint = 1
	// DefaultRPCPort is the default JSON-RPC port
	DefaultRPCPort uint = 3030
	// DefaultP2PPort is the default p2p port
	DefaultP2PPort uint = 24567
	// DefaultMinPeers is the default minimum number of peers required to start syncing/producing blocks
	DefaultMinPeers uint = 5
	// DefaultPrometheusPort is the default prometheus exporter port
	DefaultPrometheusPort uint = 9615
)
View Source
const (
	// DefaultNodeCPURequest is the cpu requested by NEAR node
	DefaultNodeCPURequest = "4"
	// DefaultNodeCPULimit is the cpu limit for NEAR node
	DefaultNodeCPULimit = "8"

	// DefaultNodeMemoryRequest is the memory requested by NEAR node
	DefaultNodeMemoryRequest = "4Gi"
	// DefaultNodeMemoryLimit is the memory limit for NEAR node
	DefaultNodeMemoryLimit = "8Gi"

	// DefaultNodeStorageRequest is the Storage requested by NEAR node
	DefaultNodeStorageRequest = "250Gi"
	// DefaultArchivalNodeStorageRequest is the Storage requested by NEAR archival node
	DefaultArchivalNodeStorageRequest = "4Ti"
)

Resources

View Source
const (
	// DefaultNearImage is the default NEAR core client image
	DefaultNearImage = "kotalco/nearcore:v1.39.1"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "near.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
)

Functions

This section is empty.

Types

type Node

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

	Spec   NodeSpec   `json:"spec,omitempty"`
	Status NodeStatus `json:"status,omitempty"`
}

Node is the Schema for the nodes API +kubebuilder:printcolumn:name="Network",type=string,JSONPath=".spec.network" +kubebuilder:printcolumn:name="Client",type=string,JSONPath=".status.client" +kubebuilder:printcolumn:name="Validator",type=boolean,JSONPath=".spec.validator",priority=10

func (*Node) DeepCopy

func (in *Node) DeepCopy() *Node

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

func (*Node) DeepCopyInto

func (in *Node) DeepCopyInto(out *Node)

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

func (*Node) DeepCopyObject

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

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

func (*Node) Default

func (n *Node) Default()

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

func (*Node) SetupWebhookWithManager

func (n *Node) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Node) ValidateCreate

func (n *Node) ValidateCreate() (admission.Warnings, error)

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

func (*Node) ValidateDelete

func (n *Node) ValidateDelete() (admission.Warnings, error)

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

func (*Node) ValidateUpdate

func (n *Node) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

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

type NodeList

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

NodeList contains a list of Node

func (*NodeList) DeepCopy

func (in *NodeList) DeepCopy() *NodeList

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

func (*NodeList) DeepCopyInto

func (in *NodeList) DeepCopyInto(out *NodeList)

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

func (*NodeList) DeepCopyObject

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

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

type NodeSpec

type NodeSpec struct {
	// Image is NEAR node client image
	Image string `json:"image,omitempty"`
	// ExtraArgs is extra arguments to pass down to the cli
	ExtraArgs shared.ExtraArgs `json:"extraArgs,omitempty"`
	// Replicas is number of replicas
	// +kubebuilder:validation:Enum=0;1
	Replicas *uint `json:"replicas,omitempty"`
	// Network is NEAR network to join and sync
	// +kubebuilder:validation:Enum=mainnet;testnet;betanet
	Network string `json:"network"`
	// NodePrivateKeySecretName is the secret name holding node Ed25519 private key
	NodePrivateKeySecretName string `json:"nodePrivateKeySecretName,omitempty"`
	// ValidatorSecretName is the secret name holding node Ed25519 validator key
	ValidatorSecretName string `json:"validatorSecretName,omitempty"`
	// MinPeers is minimum number of peers to start syncing/producing blocks
	MinPeers uint `json:"minPeers,omitempty"`
	// Archive keeps old blocks in the storage
	Archive bool `json:"archive,omitempty"`
	// P2PPort is p2p port
	P2PPort uint `json:"p2pPort,omitempty"`
	// RPC enables JSON-RPC server
	RPC bool `json:"rpc,omitempty"`
	// RPCPort is JSON-RPC server listening port
	RPCPort uint `json:"rpcPort,omitempty"`
	// PrometheusPort is prometheus exporter port
	PrometheusPort uint `json:"prometheusPort,omitempty"`
	// TelemetryURL is telemetry service URL
	TelemetryURL string `json:"telemetryURL,omitempty"`
	// Bootnodes is array of boot nodes to bootstrap network from
	// +listType=set
	Bootnodes []string `json:"bootnodes,omitempty"`
	// Resources is node compute and storage resources
	shared.Resources `json:"resources,omitempty"`
}

NodeSpec defines the desired state of Node

func (*NodeSpec) DeepCopy

func (in *NodeSpec) DeepCopy() *NodeSpec

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

func (*NodeSpec) DeepCopyInto

func (in *NodeSpec) DeepCopyInto(out *NodeSpec)

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

type NodeStatus

type NodeStatus struct {
	Client string `json:"client,omitempty"`
}

NodeStatus defines the observed state of Node

func (*NodeStatus) DeepCopy

func (in *NodeStatus) DeepCopy() *NodeStatus

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

func (*NodeStatus) DeepCopyInto

func (in *NodeStatus) DeepCopyInto(out *NodeStatus)

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