Documentation ¶
Index ¶
- func Cause(err error) error
- func CheackandUpdateClusterHealth(clusterStatus *rediskunv1alpha1.DistributedRedisClusterStatus, ...) bool
- func CheckallZonesActive(cluster *redisv1alpha1.DistributedRedisCluster, reqLogger logr.Logger, ...) (bool, int32, error)
- func FlagSet() *pflag.FlagSet
- func New(msg string) error
- func Newf(msg string, args ...interface{}) error
- func SetClusterFailed(status *redisv1alpha1.DistributedRedisClusterStatus, reason string)
- func SetClusterNOK(status *redisv1alpha1.DistributedRedisClusterStatus, reason string)
- func SetClusterOK(status *redisv1alpha1.DistributedRedisClusterStatus, reason string)
- func SetClusterRebalancing(status *redisv1alpha1.DistributedRedisClusterStatus, reason string)
- func SetClusterResetPassword(status *redisv1alpha1.DistributedRedisClusterStatus, reason string)
- func SetClusterScaling(status *redisv1alpha1.DistributedRedisClusterStatus, reason string)
- func SetClusterUpdating(status *redisv1alpha1.DistributedRedisClusterStatus, reason string)
- func SetHAStatus(status *redisv1alpha1.DistributedRedisClusterStatus, ...)
- func SetSecretStatus(status *redisv1alpha1.DistributedRedisClusterStatus, secretstate string)
- func Wrap(err error, msg string) error
- func Wrapf(err error, msg string, args ...interface{}) error
- type DistributedRedisClusterReconciler
- func (r *DistributedRedisClusterReconciler) IsSlaveReady(ip string, admin redisutil.IAdmin, ctx context.Context) (bool, error)
- func (r *DistributedRedisClusterReconciler) PlaceMastersbySTS(cluster *rediskunv1alpha1.DistributedRedisCluster, ...) error
- func (r *DistributedRedisClusterReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
- func (r *DistributedRedisClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
- type ErrorType
- type IWaitHandle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheackandUpdateClusterHealth ¶ added in v0.1.2
func CheackandUpdateClusterHealth(clusterStatus *rediskunv1alpha1.DistributedRedisClusterStatus, clusterInfos *redisutil.ClusterInfos, cluster *rediskunv1alpha1.DistributedRedisCluster, reqLogger logr.Logger) bool
func CheckallZonesActive ¶ added in v0.1.2
func CheckallZonesActive(cluster *redisv1alpha1.DistributedRedisCluster, reqLogger logr.Logger, Client client.Client) (bool, int32, error)
func SetClusterFailed ¶
func SetClusterFailed(status *redisv1alpha1.DistributedRedisClusterStatus, reason string)
func SetClusterNOK ¶ added in v0.1.2
func SetClusterNOK(status *redisv1alpha1.DistributedRedisClusterStatus, reason string)
func SetClusterOK ¶
func SetClusterOK(status *redisv1alpha1.DistributedRedisClusterStatus, reason string)
func SetClusterRebalancing ¶
func SetClusterRebalancing(status *redisv1alpha1.DistributedRedisClusterStatus, reason string)
func SetClusterResetPassword ¶
func SetClusterResetPassword(status *redisv1alpha1.DistributedRedisClusterStatus, reason string)
func SetClusterScaling ¶
func SetClusterScaling(status *redisv1alpha1.DistributedRedisClusterStatus, reason string)
func SetClusterUpdating ¶
func SetClusterUpdating(status *redisv1alpha1.DistributedRedisClusterStatus, reason string)
func SetHAStatus ¶
func SetHAStatus(status *redisv1alpha1.DistributedRedisClusterStatus, HAstate redisv1alpha1.HaStatus)
func SetSecretStatus ¶
func SetSecretStatus(status *redisv1alpha1.DistributedRedisClusterStatus, secretstate string)
Types ¶
type DistributedRedisClusterReconciler ¶
type DistributedRedisClusterReconciler struct { client.Client Scheme *runtime.Scheme Ensurer clustermanger.IEnsureResource Checker clustermanger.ICheck Execer exec.IExec StatefulSetController k8sutil.IStatefulSetControl ServiceController k8sutil.IServiceControl PdbController k8sutil.IPodDisruptionBudgetControl PvcController k8sutil.IPvcControl CrController k8sutil.ICustomResource PodController k8sutil.IPodControl NodeController k8sutil.INodeControl }
DistributedRedisClusterReconciler reconciles a DistributedRedisCluster object
func (*DistributedRedisClusterReconciler) IsSlaveReady ¶
func (*DistributedRedisClusterReconciler) PlaceMastersbySTS ¶ added in v0.1.2
func (r *DistributedRedisClusterReconciler) PlaceMastersbySTS(cluster *rediskunv1alpha1.DistributedRedisCluster, displacedMasters redisutil.Nodes, clusterinfos *redisutil.ClusterInfos, admin redisutil.IAdmin, context context.Context, reqLogger logr.Logger) error
func (*DistributedRedisClusterReconciler) Reconcile ¶
func (r *DistributedRedisClusterReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the DistributedRedisCluster object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.1/pkg/reconcile
func (*DistributedRedisClusterReconciler) SetupWithManager ¶
func (r *DistributedRedisClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Click to show internal directories.
Click to hide internal directories.