Documentation ¶
Index ¶
- func New(cfg Config, k8sService k8s.Services, redisClient redis.Client, ...) (controller.Controller, error)
- func NewRedisFailoverRetriever(cli k8s.Services) controller.Retriever
- type Config
- type RedisFailoverHandler
- func (r *RedisFailoverHandler) CheckAndHeal(rf *redisfailoverv1.RedisFailover) error
- func (w *RedisFailoverHandler) Ensure(rf *redisfailoverv1.RedisFailover, labels map[string]string, ...) error
- func (r *RedisFailoverHandler) Handle(_ context.Context, obj runtime.Object) 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, kooperMetricsRecorder metrics.Recorder, logger log.Logger) (controller.Controller, error)
New will create an operator that is responsible of managing all the required stuff to create redis failovers.
func NewRedisFailoverRetriever ¶ added in v1.1.0
func NewRedisFailoverRetriever(cli k8s.Services) controller.Retriever
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.Recorder, 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) 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) Handle ¶ added in v1.1.0
Handle will ensure the redis failover is in the expected state.
func (*RedisFailoverHandler) UpdateRedisesPods ¶
func (r *RedisFailoverHandler) UpdateRedisesPods(rf *redisfailoverv1.RedisFailover) error
UpdateRedisesPods if the running version of pods are equal to the statefulset one