Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the citacloud v1 API group +kubebuilder:object:generate=true +groupName=citacloud.rivtower.com
Index ¶
- Constants
- Variables
- type Backup
- type BackupList
- type BackupSpec
- type BackupStatus
- type BlockHeightFallback
- type BlockHeightFallbackList
- type BlockHeightFallbackSpec
- type BlockHeightFallbackStatus
- type CitaNode
- type CitaNodeList
- type CitaNodeSpec
- type CitaNodeStatus
- type ConsensusType
- type ImageInfo
- type JobConditionType
- type LogLevel
- type Restore
- type RestoreList
- type RestoreSpec
- type RestoreStatus
- type Status
Constants ¶
const ( BackupSourceVolumeName = "backup-source" BackupSourceVolumePath = "/backup-source" BackupDestVolumeName = "backup-dest" BackupDestVolumePath = "/backup-dest" )
const ( ConfigName = "cita-config" ConfigMountPath = "/cita-config" VolumeName = "datadir" VolumeMountPath = "/mnt" )
const ( PodReady status.ConditionType = "PodReady" ExternalTrigger status.ConditionType = "ExternalTrigger" CitaNodeReady status.ConditionType = "CitaNodeReady" ContainerNotReady status.ConditionReason = "ContainerNotReady" ContainerAllReady status.ConditionReason = "ContainerAllReady" ExternalStartAction status.ConditionReason = "ExternalStartAction" ExternalStopAction status.ConditionReason = "ExternalStopAction" ExternalUpdateAction status.ConditionReason = "ContainerAllReady" CitaNodeStopped status.ConditionReason = "CitaNodeStopped" )
const ( CITANodeJobServiceAccount = "cita-node-job" CITANodeJobClusterRole = "cita-node-job" CITANodeJobClusterRoleBinding = "cita-node-job" )
const ( RestoreSourceVolumeName = "restore-source" RestoreSourceVolumePath = "/restore-source" RestoreDestVolumeName = "restore-dest" RestoreDestVolumePath = "/restore-dest" )
const DefaultImage = "citacloud/cita-node-job:latest"
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "citacloud.rivtower.com", Version: "v1"} // 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 Backup ¶
type Backup struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec BackupSpec `json:"spec,omitempty"`
Status BackupStatus `json:"status,omitempty"`
}
Backup is the Schema for the backups API
func (*Backup) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backup.
func (*Backup) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Backup) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BackupList ¶
type BackupList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Backup `json:"items"`
}
BackupList contains a list of Backup
func (*BackupList) DeepCopy ¶
func (in *BackupList) DeepCopy() *BackupList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupList.
func (*BackupList) DeepCopyInto ¶
func (in *BackupList) DeepCopyInto(out *BackupList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackupList) DeepCopyObject ¶
func (in *BackupList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BackupSpec ¶
type BackupSpec struct {
// Chain
Chain string `json:"chain"`
// Node
Node string `json:"node"`
// DeployMethod
DeployMethod nodepkg.DeployMethod `json:"deployMethod"`
// StorageClass
StorageClass string `json:"storageClass,omitempty"`
// Action
Action nodepkg.Action `json:"action,omitempty"`
// Image
Image string `json:"image,omitempty"`
// PullPolicy
PullPolicy v1.PullPolicy `json:"pullPolicy,omitempty"`
// ttlSecondsAfterFinished clean up finished Jobs (either Complete or Failed) automatically
TTLSecondsAfterFinished int64 `json:"ttlSecondsAfterFinished,omitempty"`
}
BackupSpec defines the desired state of Backup
func (*BackupSpec) DeepCopy ¶
func (in *BackupSpec) DeepCopy() *BackupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupSpec.
func (*BackupSpec) DeepCopyInto ¶
func (in *BackupSpec) DeepCopyInto(out *BackupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupStatus ¶
type BackupStatus struct {
// Allocate
Allocate int64 `json:"allocate,omitempty"`
// Actual
Actual int64 `json:"actual,omitempty"`
// Status
Status JobConditionType `json:"status,omitempty"`
// StartTime
StartTime *metav1.Time `json:"startTime,omitempty"`
// EndTime
EndTime *metav1.Time `json:"endTime,omitempty"`
// BlockHeight
BlockHeight int64 `json:"blockHeight,omitempty"`
}
BackupStatus defines the observed state of Backup
func (*BackupStatus) DeepCopy ¶
func (in *BackupStatus) DeepCopy() *BackupStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupStatus.
func (*BackupStatus) DeepCopyInto ¶
func (in *BackupStatus) DeepCopyInto(out *BackupStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BlockHeightFallback ¶
type BlockHeightFallback struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec BlockHeightFallbackSpec `json:"spec,omitempty"`
Status BlockHeightFallbackStatus `json:"status,omitempty"`
}
BlockHeightFallback is the Schema for the blockheightfallbacks API
func (*BlockHeightFallback) DeepCopy ¶
func (in *BlockHeightFallback) DeepCopy() *BlockHeightFallback
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockHeightFallback.
func (*BlockHeightFallback) DeepCopyInto ¶
func (in *BlockHeightFallback) DeepCopyInto(out *BlockHeightFallback)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BlockHeightFallback) DeepCopyObject ¶
func (in *BlockHeightFallback) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BlockHeightFallbackList ¶
type BlockHeightFallbackList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []BlockHeightFallback `json:"items"`
}
BlockHeightFallbackList contains a list of BlockHeightFallback
func (*BlockHeightFallbackList) DeepCopy ¶
func (in *BlockHeightFallbackList) DeepCopy() *BlockHeightFallbackList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockHeightFallbackList.
func (*BlockHeightFallbackList) DeepCopyInto ¶
func (in *BlockHeightFallbackList) DeepCopyInto(out *BlockHeightFallbackList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BlockHeightFallbackList) DeepCopyObject ¶
func (in *BlockHeightFallbackList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BlockHeightFallbackSpec ¶
type BlockHeightFallbackSpec struct {
// Chain
Chain string `json:"chain"`
// Node
Node string `json:"node"`
// BlockHeight
BlockHeight int64 `json:"blockHeight"`
// DeployMethod
DeployMethod node.DeployMethod `json:"deployMethod"`
// Image
Image string `json:"image,omitempty"`
// PullPolicy
PullPolicy v1.PullPolicy `json:"pullPolicy,omitempty"`
// ttlSecondsAfterFinished clean up finished Jobs (either Complete or Failed) automatically
TTLSecondsAfterFinished int64 `json:"ttlSecondsAfterFinished,omitempty"`
}
BlockHeightFallbackSpec defines the desired state of BlockHeightFallback
func (*BlockHeightFallbackSpec) DeepCopy ¶
func (in *BlockHeightFallbackSpec) DeepCopy() *BlockHeightFallbackSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockHeightFallbackSpec.
func (*BlockHeightFallbackSpec) DeepCopyInto ¶
func (in *BlockHeightFallbackSpec) DeepCopyInto(out *BlockHeightFallbackSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BlockHeightFallbackStatus ¶
type BlockHeightFallbackStatus struct {
// StartTime
StartTime *metav1.Time `json:"startTime,omitempty"`
// EndTime
EndTime *metav1.Time `json:"endTime,omitempty"`
// Status
Status JobConditionType `json:"status,omitempty"`
}
BlockHeightFallbackStatus defines the observed state of BlockHeightFallback
func (*BlockHeightFallbackStatus) DeepCopy ¶
func (in *BlockHeightFallbackStatus) DeepCopy() *BlockHeightFallbackStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockHeightFallbackStatus.
func (*BlockHeightFallbackStatus) DeepCopyInto ¶
func (in *BlockHeightFallbackStatus) DeepCopyInto(out *BlockHeightFallbackStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CitaNode ¶
type CitaNode struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CitaNodeSpec `json:"spec,omitempty"`
Status CitaNodeStatus `json:"status,omitempty"`
}
CitaNode is the Schema for the citanodes API
func (*CitaNode) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CitaNode.
func (*CitaNode) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CitaNode) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*CitaNode) GetConditions ¶
func (c *CitaNode) GetConditions() *status.Conditions
type CitaNodeList ¶
type CitaNodeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CitaNode `json:"items"`
}
CitaNodeList contains a list of CitaNode
func (*CitaNodeList) DeepCopy ¶
func (in *CitaNodeList) DeepCopy() *CitaNodeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CitaNodeList.
func (*CitaNodeList) DeepCopyInto ¶
func (in *CitaNodeList) DeepCopyInto(out *CitaNodeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CitaNodeList) DeepCopyObject ¶
func (in *CitaNodeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CitaNodeSpec ¶
type CitaNodeSpec struct {
// chain name
ChainName string `json:"chainName"`
// EnableTLS
EnableTLS bool `json:"enableTls,omitempty"`
// ConsensusType
// +kubebuilder:validation:Enum=BFT;Raft
ConsensusType ConsensusType `json:"consensusType"`
// config.toml && kms.db configmap ref
ConfigMapRef string `json:"configMapRef"`
// log level
// +kubebuilder:default:=info
LogLevel LogLevel `json:"logLevel,omitempty"`
// storage class name
StorageClassName *string `json:"storageClassName"`
// storage size
StorageSize *int64 `json:"storageSize"`
// ImageInfo
ImageInfo `json:"imageInfo,omitempty"`
// desire status
// +kubebuilder:validation:Enum=Running;Stopped
DesiredState Status `json:"desiredState"`
}
CitaNodeSpec defines the desired state of CitaNode
func (*CitaNodeSpec) DeepCopy ¶
func (in *CitaNodeSpec) DeepCopy() *CitaNodeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CitaNodeSpec.
func (*CitaNodeSpec) DeepCopyInto ¶
func (in *CitaNodeSpec) DeepCopyInto(out *CitaNodeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CitaNodeStatus ¶
type CitaNodeStatus struct {
Status Status `json:"status,omitempty"`
Conditions status.Conditions `json:"conditions,omitempty"`
}
CitaNodeStatus defines the observed state of CitaNode
func (*CitaNodeStatus) DeepCopy ¶
func (in *CitaNodeStatus) DeepCopy() *CitaNodeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CitaNodeStatus.
func (*CitaNodeStatus) DeepCopyInto ¶
func (in *CitaNodeStatus) DeepCopyInto(out *CitaNodeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConsensusType ¶
type ConsensusType string
const ( BFT ConsensusType = "BFT" Raft ConsensusType = "Raft" )
type ImageInfo ¶
type ImageInfo struct {
// PullPolicy
PullPolicy v1.PullPolicy `json:"pullPolicy,omitempty"`
// NetworkImage the image of network container
NetworkImage string `json:"networkImage,omitempty"`
// ConsensusImage the image of consensus container
ConsensusImage string `json:"consensusImage,omitempty"`
// ExecutorImage the image of executor container
ExecutorImage string `json:"executorImage,omitempty"`
// StorageImage the image of storage container
StorageImage string `json:"storageImage,omitempty"`
// ControllerImage the image of controller container
ControllerImage string `json:"controllerImage,omitempty"`
// KmsImage the image of kms container
KmsImage string `json:"kmsImage,omitempty"`
}
+k8s:deepcopy-gen=false
type JobConditionType ¶
type JobConditionType string
const ( // JobActive means the job is active. JobActive JobConditionType = "Active" // JobComplete means the job has completed its execution. JobComplete JobConditionType = "Complete" // JobFailed means the job has failed its execution. JobFailed JobConditionType = "Failed" )
These are valid conditions of a job.
type Restore ¶
type Restore struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec RestoreSpec `json:"spec,omitempty"`
Status RestoreStatus `json:"status,omitempty"`
}
Restore is the Schema for the restores API
func (*Restore) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Restore.
func (*Restore) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Restore) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RestoreList ¶
type RestoreList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Restore `json:"items"`
}
RestoreList contains a list of Restore
func (*RestoreList) DeepCopy ¶
func (in *RestoreList) DeepCopy() *RestoreList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreList.
func (*RestoreList) DeepCopyInto ¶
func (in *RestoreList) DeepCopyInto(out *RestoreList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RestoreList) DeepCopyObject ¶
func (in *RestoreList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RestoreSpec ¶
type RestoreSpec struct {
// Chain
Chain string `json:"chain"`
// Node
Node string `json:"node"`
// DeployMethod
DeployMethod nodepkg.DeployMethod `json:"deployMethod"`
// Backup
Backup string `json:"backup"`
// Action
Action nodepkg.Action `json:"action,omitempty"`
// Image
Image string `json:"image,omitempty"`
// PullPolicy
PullPolicy v1.PullPolicy `json:"pullPolicy,omitempty"`
// ttlSecondsAfterFinished clean up finished Jobs (either Complete or Failed) automatically
TTLSecondsAfterFinished int64 `json:"ttlSecondsAfterFinished,omitempty"`
}
RestoreSpec defines the desired state of Restore
func (*RestoreSpec) DeepCopy ¶
func (in *RestoreSpec) DeepCopy() *RestoreSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreSpec.
func (*RestoreSpec) DeepCopyInto ¶
func (in *RestoreSpec) DeepCopyInto(out *RestoreSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RestoreStatus ¶
type RestoreStatus struct {
// Status
Status JobConditionType `json:"status,omitempty"`
// StartTime
StartTime *metav1.Time `json:"startTime,omitempty"`
// EndTime
EndTime *metav1.Time `json:"endTime,omitempty"`
}
RestoreStatus defines the observed state of Restore
func (*RestoreStatus) DeepCopy ¶
func (in *RestoreStatus) DeepCopy() *RestoreStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreStatus.
func (*RestoreStatus) DeepCopyInto ¶
func (in *RestoreStatus) DeepCopyInto(out *RestoreStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.