cluster

package
v0.0.0-...-2ea7a04 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

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 NewCommand(ctx context.Context) *cli.Command

func Ping

func Ping(ctx context.Context, addr string, authInfo redis.AuthInfo) error

Ping

func Readiness

func Readiness(ctx context.Context, addr string, authInfo redis.AuthInfo) error

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,从而确保服务一直可用,切数据不会丢失

func TcpSocket

func TcpSocket(ctx context.Context, addr string, t time.Duration) error

TcpSocket

Types

type FailoverAction

type FailoverAction string
const (
	NoFailoverAction    FailoverAction = ""
	ForceFailoverAction FailoverAction = "FORCE"
)

type HealOptions

type HealOptions struct {
	Namespace  string
	PodName    string
	Workspace  string
	TargetName string
	Prefix     string
	ShardID    string
	NodeFile   string
}

Jump to

Keyboard shortcuts

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