Documentation ¶
Index ¶
- func New(cfg Config, k8sService k8s.Services, redisClient redis.Client, ...) operator.Operator
- type Config
- type RedisFailoverHandler
- func (r *RedisFailoverHandler) Add(_ context.Context, obj runtime.Object) error
- func (r *RedisFailoverHandler) CheckAndHeal(rf *redisfailoverv1.RedisFailover) error
- func (r *RedisFailoverHandler) Delete(_ context.Context, name string) error
- func (w *RedisFailoverHandler) Ensure(rf *redisfailoverv1.RedisFailover, labels map[string]string, ...) error
- func (r *RedisFailoverHandler) UpdateRedisesPods(rf *redisfailoverv1.RedisFailover) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(cfg Config, k8sService k8s.Services, redisClient redis.Client, mClient metrics.Instrumenter, kooperMetricsRecorder kmetrics.Recorder, logger log.Logger) operator.Operator
New will create an operator that is responsible of managing all the required stuff to create redis failovers.
Types ¶
type RedisFailoverHandler ¶
type RedisFailoverHandler struct {
// contains filtered or unexported fields
}
RedisFailoverHandler is the Redis Failover handler. This handler will create the required resources that a RF needs.
func NewRedisFailoverHandler ¶
func NewRedisFailoverHandler(config Config, rfService rfservice.RedisFailoverClient, rfChecker rfservice.RedisFailoverCheck, rfHealer rfservice.RedisFailoverHeal, k8sservice k8s.Service, mClient metrics.Instrumenter, logger log.Logger) *RedisFailoverHandler
NewRedisFailoverHandler returns a new RF handler
func (*RedisFailoverHandler) CheckAndHeal ¶
func (r *RedisFailoverHandler) CheckAndHeal(rf *redisfailoverv1.RedisFailover) error
CheckAndHeal runs verifcation checks to ensure the RedisFailover is in an expected and healthy state. If the checks do not match up to expectations, an attempt will be made to "heal" the RedisFailover into a healthy state.
func (*RedisFailoverHandler) Delete ¶
func (r *RedisFailoverHandler) Delete(_ context.Context, name string) error
Delete handles the deletion of a RF.
func (*RedisFailoverHandler) Ensure ¶
func (w *RedisFailoverHandler) Ensure(rf *redisfailoverv1.RedisFailover, labels map[string]string, or []metav1.OwnerReference) error
Ensure is called to ensure all of the resources associated with a RedisFailover are created
func (*RedisFailoverHandler) UpdateRedisesPods ¶
func (r *RedisFailoverHandler) UpdateRedisesPods(rf *redisfailoverv1.RedisFailover) error
UpdateRedisesPods if the running version of pods are equal to the statefulset one