util

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: Apache-2.0 Imports: 2 Imported by: 5

Documentation

Index

Constants

View Source
const (
	BaseName               = "redis"
	SentinelName           = "-sentinel"
	SentinelRoleName       = "sentinel"
	SentinelConfigFileName = "sentinel.conf"
	RedisConfigFileName    = "redis.conf"
	RedisName              = "-cluster"
	RedisShutdownName      = "r-s"
	RedisRoleName          = "redis"
	AppLabel               = "redis-cluster"
	HostnameTopologyKey    = "kubernetes.io/hostname"
)
View Source
const (
	// AnnotationScope annotation name for defining instance scope. Used for specifying cluster wide clusters.
	// A namespace-scoped operator watches and manages resources in a single namespace, whereas a cluster-scoped operator watches and manages resources cluster-wide.
	AnnotationScope = "redis.kun/scope"
	//AnnotationClusterScoped annotation value for cluster wide clusters.
	AnnotationClusterScoped = "cluster-scoped"
)

Variables

This section is empty.

Functions

func GenerateName

func GenerateName(typeName, metaName string) string

func GetRedisName

func GetRedisName(rc *redisv1beta1.RedisCluster) string

GetRedisName returns the name for redis resources

func GetRedisShutdownConfigMapName

func GetRedisShutdownConfigMapName(rc *redisv1beta1.RedisCluster) string

GetRedisShutdownConfigMapName returns the name for redis configmap

func GetRedisShutdownName

func GetRedisShutdownName(rc *redisv1beta1.RedisCluster) string

GetRedisShutdownName returns the name for redis resources

func GetSentinelHeadlessSvc

func GetSentinelHeadlessSvc(rc *redisv1beta1.RedisCluster) string

func GetSentinelName

func GetSentinelName(rc *redisv1beta1.RedisCluster) string

GetSentinelName returns the name for sentinel resources

func GetSentinelReadinessCm

func GetSentinelReadinessCm(rc *redisv1beta1.RedisCluster) string

func IsClusterScoped

func IsClusterScoped() bool

func MergeLabels

func MergeLabels(allLabels ...map[string]string) map[string]string

MergeLabels merges all the label maps received as argument into a single new label map.

func SetClusterScoped

func SetClusterScoped(namespace string)

Types

type AuthConfig

type AuthConfig struct {
	Password string
}

Jump to

Keyboard shortcuts

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