Documentation ¶
Index ¶
- func ExposeNodePort(ctx context.Context, client *kubernetes.Clientset, ...) error
- func Heal(ctx context.Context, c *cli.Context, client *kubernetes.Clientset, ...) error
- func NewCommand(ctx context.Context) *cli.Command
- func Ping(ctx context.Context, addr string, authInfo redis.AuthInfo) error
- func Readiness(ctx context.Context, addr string, authInfo redis.AuthInfo) error
- func Shutdown(ctx context.Context, c *cli.Context, client *kubernetes.Clientset, ...) error
- func TcpSocket(ctx context.Context, addr string, t time.Duration) error
- type FailoverAction
- type HealOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExposeNodePort ¶
func ExposeNodePort(ctx context.Context, client *kubernetes.Clientset, namespace, podName, ipfamily string, serviceType corev1.ServiceType, logger logr.Logger) error
ExposeNodePort
func Heal ¶
func Heal(ctx context.Context, c *cli.Context, client *kubernetes.Clientset, logger logr.Logger) error
Heal heal may fail when updated password for redis 4,5
func NewCommand ¶
func Shutdown ¶
func Shutdown(ctx context.Context, c *cli.Context, client *kubernetes.Clientset, logger logr.Logger) error
Shutdown 在退出时做 failover
NOTE: 在4.0, 5.0中,在更新密码时,会重启实例。但是由于密码在重启前已经热更新,导致其他脚本无法连接到实例,包括shutdown脚本 为了解决这个问题,针对4,5 版本,会在重启前,先做failover,将master failover 到-0 节点。 由于重启是逆序的,最后一个pod启动成功之后,会使用新密码连接到 master,从而确保服务一直可用,切数据不会丢失
Types ¶
type FailoverAction ¶
type FailoverAction string
const ( NoFailoverAction FailoverAction = "" ForceFailoverAction FailoverAction = "FORCE" )
Click to show internal directories.
Click to hide internal directories.