Documentation
¶
Index ¶
- Constants
- Variables
- func CleanJob(ctx context.Context, cli client.Client, job *v1.Job, ttl int64)
- func GeneratePVC(node *citacloudv1.CitaNode) []corev1.PersistentVolumeClaim
- func GetLogConfigName(nodeName string) string
- func GetNodePortServiceName(nodeName string) string
- func GetVolumes(node *citacloudv1.CitaNode) []corev1.Volume
- func IsEqual(obj1, obj2 interface{}) bool
- func LabelsForNode(chainName, nodeName string) map[string]string
- func MergeLabels(allLabels ...map[string]string) map[string]string
- type BackupReconciler
- type BlockHeightFallbackReconciler
- type ChainNodeServiceImpl
- type CitaNodeReconciler
- func (r *CitaNodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *CitaNodeReconciler) ReconcileAllRecourse(ctx context.Context, node *citacloudv1.CitaNode) error
- func (r *CitaNodeReconciler) ReconcileConfigMap(ctx context.Context, node *citacloudv1.CitaNode) (bool, error)
- func (r *CitaNodeReconciler) ReconcileLogConfigMap(ctx context.Context, node *citacloudv1.CitaNode) (bool, error)
- func (r *CitaNodeReconciler) ReconcileService(ctx context.Context, node *citacloudv1.CitaNode) error
- func (r *CitaNodeReconciler) ReconcileStatefulSet(ctx context.Context, node *citacloudv1.CitaNode) (*NodeValue, error)
- func (r *CitaNodeReconciler) SetDefaultStatus(ctx context.Context, node *citacloudv1.CitaNode) (bool, error)
- func (r *CitaNodeReconciler) SetStatusAndCondition(ctx context.Context, wantedStatus citacloudv1.Status, ...) error
- func (r *CitaNodeReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *CitaNodeReconciler) SyncStatus(ctx context.Context, node *citacloudv1.CitaNode) error
- type JobRbac
- type NodeService
- func (cns *NodeService) GenerateConsensusLogConfig() string
- func (cns *NodeService) GenerateControllerLogConfig() string
- func (cns *NodeService) GenerateExecutorLogConfig() string
- func (cns *NodeService) GenerateKmsLogConfig() string
- func (cns *NodeService) GenerateNetworkLogConfig() string
- func (cns *NodeService) GenerateStorageLogConfig() string
- type NodeValue
- type RestoreReconciler
Constants ¶
View Source
const ( NetworkContainer = "network" ConsensusContainer = "consensus" ExecutorContainer = "executor" StorageContainer = "storage" ControllerContainer = "controller" KmsContainer = "kms" AccountVolumeName = "account" KmsDBMountPath = "/mnt" LogConfigVolumeName = "log-config" NodeConfigVolumeName = "node-config" NodeConfigVolumeMountPath = "/etc/cita-cloud/config" DataVolumeName = "datadir" DataVolumeMountPath = "/data" LogConfigVolumeMountPath = "/etc/cita-cloud/log" LogDir = DataVolumeMountPath + "/logs" NodeConfigFile = "config.toml" ControllerLogConfigFile = "controller-log4rs.yaml" ExecutorLogConfigFile = "executor-log4rs.yaml" KmsLogConfigFile = "kms-log4rs.yaml" NetworkLogConfigFile = "network-log4rs.yaml" StorageLogConfigFile = "storage-log4rs.yaml" ConsensusLogConfigFile = "consensus-log4rs.yaml" NetworkPort = 40000 ControllerPort = 50004 ExecutorPort = 50002 )
Variables ¶
View Source
var NodeMap sync.Map
Functions ¶
func GeneratePVC ¶
func GeneratePVC(node *citacloudv1.CitaNode) []corev1.PersistentVolumeClaim
func GetLogConfigName ¶
GetLogConfigName get node's log config configmap name
func GetNodePortServiceName ¶
GetNodePortServiceName get node's clusterIP service name
func GetVolumes ¶
func GetVolumes(node *citacloudv1.CitaNode) []corev1.Volume
func LabelsForNode ¶
Types ¶
type BackupReconciler ¶
BackupReconciler reconciles a Backup object
func (*BackupReconciler) SetupWithManager ¶
func (r *BackupReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type BlockHeightFallbackReconciler ¶
BlockHeightFallbackReconciler reconciles a BlockHeightFallback object
func (*BlockHeightFallbackReconciler) SetupWithManager ¶
func (r *BlockHeightFallbackReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ChainNodeServiceImpl ¶
type CitaNodeReconciler ¶
type CitaNodeReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder record.EventRecorder
}
CitaNodeReconciler reconciles a CitaNode object
func (*CitaNodeReconciler) ReconcileAllRecourse ¶
func (r *CitaNodeReconciler) ReconcileAllRecourse(ctx context.Context, node *citacloudv1.CitaNode) error
func (*CitaNodeReconciler) ReconcileConfigMap ¶
func (r *CitaNodeReconciler) ReconcileConfigMap(ctx context.Context, node *citacloudv1.CitaNode) (bool, error)
func (*CitaNodeReconciler) ReconcileLogConfigMap ¶
func (r *CitaNodeReconciler) ReconcileLogConfigMap(ctx context.Context, node *citacloudv1.CitaNode) (bool, error)
func (*CitaNodeReconciler) ReconcileService ¶
func (r *CitaNodeReconciler) ReconcileService(ctx context.Context, node *citacloudv1.CitaNode) error
func (*CitaNodeReconciler) ReconcileStatefulSet ¶
func (r *CitaNodeReconciler) ReconcileStatefulSet(ctx context.Context, node *citacloudv1.CitaNode) (*NodeValue, error)
func (*CitaNodeReconciler) SetDefaultStatus ¶
func (r *CitaNodeReconciler) SetDefaultStatus(ctx context.Context, node *citacloudv1.CitaNode) (bool, error)
func (*CitaNodeReconciler) SetStatusAndCondition ¶
func (r *CitaNodeReconciler) SetStatusAndCondition(ctx context.Context, wantedStatus citacloudv1.Status, node *citacloudv1.CitaNode, conditionType status.ConditionType, conditionStatus corev1.ConditionStatus, reason status.ConditionReason, message string, eventType string) error
func (*CitaNodeReconciler) SetupWithManager ¶
func (r *CitaNodeReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*CitaNodeReconciler) SyncStatus ¶
func (r *CitaNodeReconciler) SyncStatus(ctx context.Context, node *citacloudv1.CitaNode) error
type JobRbac ¶
type NodeService ¶
type NodeService struct {
Node *citacloudv1.CitaNode
}
func NewChainNodeServiceForLog ¶
func NewChainNodeServiceForLog(node *citacloudv1.CitaNode) *NodeService
func (*NodeService) GenerateConsensusLogConfig ¶
func (cns *NodeService) GenerateConsensusLogConfig() string
func (*NodeService) GenerateControllerLogConfig ¶
func (cns *NodeService) GenerateControllerLogConfig() string
func (*NodeService) GenerateExecutorLogConfig ¶
func (cns *NodeService) GenerateExecutorLogConfig() string
func (*NodeService) GenerateKmsLogConfig ¶
func (cns *NodeService) GenerateKmsLogConfig() string
func (*NodeService) GenerateNetworkLogConfig ¶
func (cns *NodeService) GenerateNetworkLogConfig() string
func (*NodeService) GenerateStorageLogConfig ¶
func (cns *NodeService) GenerateStorageLogConfig() string
type NodeValue ¶
type NodeValue struct {
Status citacloudv1.Status
}
func NewNodeValue ¶
func NewNodeValue(status citacloudv1.Status) *NodeValue
type RestoreReconciler ¶
RestoreReconciler reconciles a Restore object
func (*RestoreReconciler) SetupWithManager ¶
func (r *RestoreReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Click to show internal directories.
Click to hide internal directories.