Documentation ¶
Index ¶
Constants ¶
const ( // OrchestratorFinalizer is set when the cluster is registered in // orchestrator and is removed when no nodes are in orchestrator OrchestratorFinalizer = "mysql.presslabs.org/registered-in-orchestrator" // OldOrchestratorFinalizer is the old finalizer name that is DEPRECATED OldOrchestratorFinalizer = "OrchestratorFinalizer" )
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add creates a new MysqlCluster Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started. USER ACTION REQUIRED: update cmd/manager/main.go to call this mysql.Add(mgr) to install this Controller
func NewOrcUpdater ¶
func NewOrcUpdater(cluster *mysqlcluster.MysqlCluster, r record.EventRecorder, orcClient orc.Interface) syncer.Interface
NewOrcUpdater returns a syncer that updates cluster status from orchestrator.
Types ¶
type InstancesSet ¶
InstancesSet type is a alias for []orc.Instance with extra utils functions
func (InstancesSet) DetermineMaster ¶
func (is InstancesSet) DetermineMaster() *orc.Instance
DetermineMaster returns a orc.Instance that is master or nil if can't find master
func (InstancesSet) GetInstance ¶
func (is InstancesSet) GetInstance(host string) *orc.Instance
GetInstance returns orc.Instance for a given hostname
func (InstancesSet) ToLog ¶ added in v0.4.0
func (is InstancesSet) ToLog() []map[string]string
ToLog returns a list of simplified output for logging
type ReconcileMysqlCluster ¶
ReconcileMysqlCluster reconciles a MysqlCluster object
func (*ReconcileMysqlCluster) Reconcile ¶
func (r *ReconcileMysqlCluster) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
Reconcile reconcile for each mysql cluster state from orchestrator to cluster, this reconcile is triggered in a loop.
Automatically generate RBAC rules to allow the Controller to read and write Deployments