Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the bitcoin v1alpha1 API group +kubebuilder:object:generate=true +groupName=bitcoin.kotal.io
Index ¶
- Constants
- Variables
- type BitcoinNetwork
- 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() error
- func (r *Node) ValidateDelete() error
- func (r *Node) ValidateUpdate(old runtime.Object) error
- type NodeList
- type NodeSpec
- type NodeStatus
- type RPCUser
Constants ¶
const ( // DefaultMainnetRPCPort is the default JSON-RPC port for mainnet DefaultMainnetRPCPort uint = 8332 // DefaultTestnetRPCPort is the default JSON-RPC port for testnet DefaultTestnetRPCPort uint = 18332 // DefaultMainnetP2PPort is the default p2p port for mainnet DefaultMainnetP2PPort uint = 8333 // DefaultTestnetP2PPort is the default p2p port for testnet DefaultTestnetP2PPort uint = 18333 )
const ( // DefaultNodeCPURequest is the cpu requested by Bitcoin node DefaultNodeCPURequest = "2" // DefaultNodeCPULimit is the cpu limit for Bitcoin node DefaultNodeCPULimit = "4" // DefaultNodeMemoryRequest is the memory requested by Bitcoin node DefaultNodeMemoryRequest = "4Gi" // DefaultNodeMemoryLimit is the memory limit for Bitcoin node DefaultNodeMemoryLimit = "8Gi" // DefaultNodeStorageRequest is the Storage requested by Bitcoin node DefaultNodeStorageRequest = "100Gi" )
Resources
const (
// DefaultBitcoinCoreImage is the default Bitcoin core client image
DefaultBitcoinCoreImage = "lncm/bitcoind:v25.0"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "bitcoin.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 BitcoinNetwork ¶
type BitcoinNetwork string
BitcoinNetwork is Bitcoin network
const ( Mainnet BitcoinNetwork = "mainnet" Testnet BitcoinNetwork = "testnet" )
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"
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 Bitcoin node client image Image string `json:"image,omitempty"` // Network is Bitcoin network to join and sync // +kubebuilder:validation:Enum=mainnet;testnet Network BitcoinNetwork `json:"network"` // P2PPort is p2p communications port P2PPort uint `json:"p2pPort,omitempty"` // RPC enables JSON-RPC server RPC bool `json:"rpc,omitempty"` // RPCPort is JSON-RPC server port RPCPort uint `json:"rpcPort,omitempty"` // RPCUsers is JSON-RPC users credentials RPCUsers []RPCUser `json:"rpcUsers,omitempty"` // Wallet load wallet and enables wallet RPC calls Wallet bool `json:"wallet,omitempty"` // TransactionIndex maintains a full tx index TransactionIndex bool `json:"txIndex,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 RPCUser ¶
type RPCUser struct { // Username is JSON-RPC username Username string `json:"username"` // PasswordSecretName is k8s secret name holding JSON-RPC user password PasswordSecretName string `json:"passwordSecretName"` }
RPCUsers is JSON-RPC users credentials
func (*RPCUser) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RPCUser.
func (*RPCUser) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.