Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the polkadot v1alpha1 API group +kubebuilder:object:generate=true +groupName=polkadot.kotal.io
Index ¶
- Constants
- Variables
- type DatabaseBackend
- type Node
- func (in *Node) DeepCopy() *Node
- func (in *Node) DeepCopyInto(out *Node)
- func (in *Node) DeepCopyObject() runtime.Object
- func (r *Node) Default()
- func (r *Node) DefaultNodeResources()
- func (r *Node) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *Node) ValidateCreate() (admission.Warnings, error)
- func (r *Node) ValidateDelete() (admission.Warnings, error)
- func (r *Node) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type NodeList
- type NodeSpec
- type NodeStatus
- type SynchronizationMode
Constants ¶
const ( // DefaltReplicas is the default replicas DefaltReplicas uint = 1 // DefaultSyncMode is the default blockchain sync mode DefaultSyncMode = FullSynchronization // DefaultLoggingVerbosity is the default node logging verbosity DefaultLoggingVerbosity = shared.InfoLogs // DefaultRetainedBlocks is the default node of blocks to retain if node isn't archive DefaultRetainedBlocks uint = 256 // DefaultRPCPort is the default JSON-RPC server port DefaultRPCPort uint = 9933 // DefaultP2PPort is the p2p protocol tcp port DefaultP2PPort uint = 30333 // DefaultWSPort is the default websocket server port DefaultWSPort uint = 9944 // DefaultTelemetryURL is the default telemetry service URL DefaultTelemetryURL = "wss://telemetry.polkadot.io/submit/ 0" // DefaultPrometheusPort is the default prometheus exporter port DefaultPrometheusPort uint = 9615 // DefaultCORSDomain is the default browser origin allowed to access the JSON-RPC HTTP and WS servers DefaultCORSDomain = "all" // DefaultDatabaseBackend is the default database backend DefaultDatabaseBackend DatabaseBackend = Auto )
const ( // DefaultNodeCPURequest is the cpu requested by polkadot node DefaultNodeCPURequest = "4" // DefaultNodeCPULimit is the cpu limit for polkadot node DefaultNodeCPULimit = "8" // DefaultNodeMemoryRequest is the memory requested by polkadot node DefaultNodeMemoryRequest = "4Gi" // DefaultNodeMemoryLimit is the memory limit for polkadot node DefaultNodeMemoryLimit = "8Gi" // DefaultNodeStorageRequest is the Storage requested by polkadot node DefaultNodeStorageRequest = "80Gi" )
Resources
const (
// DefaultPolkadotImage is the default polkadot client image
DefaultPolkadotImage = "parity/polkadot:v1.10.0"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "polkadot.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 DatabaseBackend ¶ added in v0.3.0
type DatabaseBackend string
+kubebuilder:validation:Enum=auto;paritydb;rocksdb
const ( // Auto databse backend Auto DatabaseBackend = "auto" // ParityDB databse backend ParityDB DatabaseBackend = "paritydb" // RocksDB databse backend RocksDB DatabaseBackend = "rocksdb" )
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="Validator",type=boolean,JSONPath=".spec.validator"
func (*Node) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Node.
func (*Node) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Node) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Node) Default ¶
func (r *Node) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*Node) DefaultNodeResources ¶
func (r *Node) DefaultNodeResources()
func (*Node) SetupWebhookWithManager ¶
func (*Node) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*Node) ValidateDelete ¶
ValidateDelete 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeList.
func (*NodeList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeSpec ¶
type NodeSpec struct { // Image is Polkadot 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 the polkadot network/chain to join // +kubebuilder:validation:Enum=polkadot;kusama;rococo;westend Network string `json:"network"` // P2PPort is p2p protocol tcp port P2PPort uint `json:"p2pPort,omitempty"` // NodePrivateKeySecretName is the secret name holding node Ed25519 private key NodePrivateKeySecretName string `json:"nodePrivateKeySecretName,omitempty"` // Validator enables validator mode Validator bool `json:"validator,omitempty"` // SyncMode is the blockchain synchronization mode SyncMode SynchronizationMode `json:"syncMode,omitempty"` // Pruning keeps recent or all blocks Pruning *bool `json:"pruning,omitempty"` // RetainedBlocks is the number of blocks to keep state for RetainedBlocks uint `json:"retainedBlocks,omitempty"` // Database is database backend Database DatabaseBackend `json:"database,omitempty"` // Logging is logging verboisty level // +kubebuilder:validation:Enum=error;warn;info;debug;trace Logging shared.VerbosityLevel `json:"logging,omitempty"` // Telemetry enables connecting to telemetry server Telemetry bool `json:"telemetry,omitempty"` // TelemetryURL is telemetry service URL TelemetryURL string `json:"telemetryURL,omitempty"` // Prometheus exposes a prometheus exporter endpoint. Prometheus bool `json:"prometheus,omitempty"` // PrometheusPort is prometheus exporter port PrometheusPort uint `json:"prometheusPort,omitempty"` // RPC enables JSON-RPC server RPC bool `json:"rpc,omitempty"` // RPCPort is JSON-RPC server port RPCPort uint `json:"rpcPort,omitempty"` // WS enables Websocket server WS bool `json:"ws,omitempty"` // WSPort is Websocket server port WSPort uint `json:"wsPort,omitempty"` // CORSDomains is browser origins allowed to access the JSON-RPC HTTP and WS servers // +listType=set CORSDomains []string `json:"corsDomains,omitempty"` // Resources is node compute and storage resources shared.Resources `json:"resources,omitempty"` }
NodeSpec defines the desired state of Node
func (*NodeSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec.
func (*NodeSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeStatus ¶
type NodeStatus struct { }
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.
type SynchronizationMode ¶
type SynchronizationMode string
SynchronizationMode is the blockchain synchronization mode +kubebuilder:validation:Enum=fast;full
const ( //FastSynchronization is the fast synchronization mode FastSynchronization SynchronizationMode = "fast" //FullSynchronization is the full archival synchronization mode FullSynchronization SynchronizationMode = "full" )