Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the stacks v1alpha1 API group +kubebuilder:object:generate=true +groupName=stacks.kotal.io
Index ¶
- Constants
- Variables
- type BitcoinNode
- 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 StacksNetwork
Constants ¶
const ( // DefaltReplicas is the default replicas DefaltReplicas uint = 1 // DefaultHost is the default JSON-RPC server host DefaultHost = "0.0.0.0" // DefaultRPCPort is the default JSON-RPC port DefaultRPCPort uint = 20443 // DefaultP2PPort is the default p2p bind port DefaultP2PPort uint = 20444 )
const ( // DefaultNodeCPURequest is the cpu requested by Stacks node DefaultNodeCPURequest = "2" // DefaultNodeCPULimit is the cpu limit for Stacks node DefaultNodeCPULimit = "4" // DefaultNodeMemoryRequest is the memory requested by Stacks node DefaultNodeMemoryRequest = "4Gi" // DefaultNodeMemoryLimit is the memory limit for Stacks node DefaultNodeMemoryLimit = "8Gi" // DefaultNodeStorageRequest is the Storage requested by Stacks node DefaultNodeStorageRequest = "100Gi" )
Resources
const (
// DefaultStacksNodeImage is the default Stacks node client image
DefaultStacksNodeImage = "kotalco/stacks:v2.5.0.0.3"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "stacks.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 BitcoinNode ¶
type BitcoinNode struct { // Endpoint is bitcoin node JSON-RPC endpoint Endpoint string `json:"endpoint"` // P2pPort is bitcoin node p2p port P2pPort uint `json:"p2pPort"` // RpcPort is bitcoin node JSON-RPC port RpcPort uint `json:"rpcPort"` // RpcUsername is bitcoin node JSON-RPC username RpcUsername string `json:"rpcUsername"` // RpcPasswordSecretName is k8s secret name holding bitcoin node JSON-RPC password RpcPasswordSecretName string `json:"rpcPasswordSecretName"` }
BitcoinNode is Bitcoin node
func (*BitcoinNode) DeepCopy ¶
func (in *BitcoinNode) DeepCopy() *BitcoinNode
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BitcoinNode.
func (*BitcoinNode) DeepCopyInto ¶
func (in *BitcoinNode) DeepCopyInto(out *BitcoinNode)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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="Miner",type=boolean,JSONPath=".spec.miner"
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 Stacks 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 stacks network // +kubebuilder:validation:Enum=mainnet;testnet;xenon Network StacksNetwork `json:"network"` // RPC enables JSON-RPC server RPC bool `json:"rpc,omitempty"` // RPCPort is JSON-RPC server port RPCPort uint `json:"rpcPort,omitempty"` // P2PPort is p2p bind port P2PPort uint `json:"p2pPort,omitempty"` // BitcoinNode is Bitcoin node BitcoinNode BitcoinNode `json:"bitcoinNode"` // Miner enables mining Miner bool `json:"miner,omitempty"` // SeedPrivateKeySecretName is k8s secret holding seed private key used for mining SeedPrivateKeySecretName string `json:"seedPrivateKeySecretName,omitempty"` // MineMicroblocks mines Stacks micro blocks MineMicroblocks bool `json:"mineMicroblocks,omitempty"` // NodePrivateKeySecretName is k8s secret holding node private key NodePrivateKeySecretName string `json:"nodePrivateKeySecretName,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 {
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.
type StacksNetwork ¶
type StacksNetwork string
StacksNetwork is Stacks network
const ( Mainnet StacksNetwork = "mainnet" Testnet StacksNetwork = "testnet" Xenon StacksNetwork = "xenon" )