Documentation ¶
Index ¶
Constants ¶
const ReconcileTime = 60 * time.Second
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ReconcileRedisCluster ¶
type ReconcileRedisCluster struct {
// contains filtered or unexported fields
}
ReconcileRedisCluster reconciles a RedisCluster object
func (*ReconcileRedisCluster) Reconcile ¶
Reconcile reads that state of the cluster for a RedisCluster object and makes changes based on the state read and what is in the RedisCluster.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
type RedisClusterHandler ¶
type RedisClusterHandler struct {
// contains filtered or unexported fields
}
RedisClusterHandler is the RedisCluster handler. This handler will create the required resources that a RedisCluster needs.
func (*RedisClusterHandler) CheckAndHeal ¶
func (r *RedisClusterHandler) CheckAndHeal(meta *clustercache.Meta) error
CheckAndHeal Check the health of the cluster and heal, Waiting Number of ready redis is equal as the set on the RedisCluster spec Waiting Number of ready sentinel is equal as the set on the RedisCluster spec Check only one master Number of redis master is 1 All redis slaves have the same master Set Custom Redis config All sentinels points to the same redis master Sentinel has not death nodes Sentinel knows the correct slave number
func (*RedisClusterHandler) Do ¶
func (r *RedisClusterHandler) Do(rc *redisv1beta1.RedisCluster) error
Do will ensure the RedisCluster is in the expected state and update the RedisCluster status.
func (*RedisClusterHandler) Ensure ¶
func (r *RedisClusterHandler) Ensure(rc *redisv1beta1.RedisCluster, labels map[string]string, or []metav1.OwnerReference) error
Ensure the RedisCluster's components are correct.