failover

package
v0.0.0-...-3430a5a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailoverRetry = errors.New("failover retry")
	ErrFailoverAbort = errors.New("failover abort")
)

Functions

func Access

func Access(ctx context.Context, client *kubernetes.Clientset, namespace, podName, ipfamily string, serviceType corev1.ServiceType, logger logr.Logger) error

func NewCommand

func NewCommand(ctx context.Context) *cli.Command

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

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL