failoverbuilder

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: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RedisConfig_MaxMemory               = "maxmemory"
	RedisConfig_MaxMemoryPolicy         = "maxmemory-policy"
	RedisConfig_ClientOutputBufferLimit = "client-output-buffer-limit"
	RedisConfig_Save                    = "save"
	RedisConfig_RenameCommand           = "rename-command"
	RedisConfig_Appendonly              = "appendonly"
	RedisConfig_ReplDisklessSync        = "repl-diskless-sync"
)
View Source
const (
	BaseName               = "rf"
	SentinelName           = "s"
	SentinelRoleName       = "sentinel"
	SentinelConfigFileName = "sentinel.conf"
	RedisConfigFileName    = "redis.conf"
	RedisName              = "r"
	RedisShutdownName      = "r-s"
	RedisReadinessName     = "r-readiness"
	RedisRoleName          = "redis"
	RedisMasterName        = "mymaster"

	// TODO: reserverd for compatibility, remove in 3.22
	RedisSentinelSVCHostKey = "RFS_REDIS_SERVICE_HOST"
	RedisSentinelSVCPortKey = "RFS_REDIS_SERVICE_PORT_SENTINEL"
)
View Source
const (
	ExporterPort                  = 9121
	SentinelExporterPort          = 9355
	SentinelPort                  = "26379"
	ExporterPortName              = "http-metrics"
	RedisPort                     = 6379
	RedisPortString               = "6379"
	RedisPortName                 = "redis"
	ExporterContainerName         = "redis-exporter"
	SentinelExporterContainerName = "sentinel-exporter"
)

variables refering to the redis exporter port

View Source
const (
	LabelInstanceName     = "app.kubernetes.io/name"
	LabelPartOf           = "app.kubernetes.io/part-of"
	LabelRedisConfig      = "redis.middleware.alauda.io/config"
	LabelRedisConfigValue = "true"
	LabelRedisRole        = "redis.middleware.alauda.io/role"
)

label

View Source
const (
	Standalone = "standalone"
	Sentinel   = "sentinel"
	Cluster    = "cluster"
)

Redis arch

View Source
const (
	Master = "master"
	Slave  = "slave"
)

Redis role

View Source
const (
	AnnotationStandaloneLoadFilePath = "redis-standalone/filepath"
	AnnotationStandaloneInitStorage  = "redis-standalone/storage-type"
	AnnotationStandaloneInitPvcName  = "redis-standalone/pvc-name"
	AnnotationStandaloneInitHostPath = "redis-standalone/hostpath"
)

Redis standalone annotation

View Source
const (
	RedisArchRoleRedis = "redis"
	RedisArchRoleSEN   = "sentinel"
	RedisRoleMaster    = "master"
	RedisRoleReplica   = "slave"
	RedisRoleLabel     = "redis.middleware.alauda.io/role"
	RedisSVCPort       = 6379
	RedisSVCPortName   = "redis"
)
View Source
const (
	DefaultScrapInterval = "60s"
	DefaultScrapeTimeout = "10s"
)
View Source
const (
	PasswordENV = "REDIS_PASSWORD"

	RedisTmpVolumeName = "redis-tmp"
	RedisTLSVolumeName = "redis-tls"

	OperatorUsername          = "OPERATOR_USERNAME"
	OperatorSecretName        = "OPERATOR_SECRET_NAME"
	MonitorOperatorSecretName = "MONITOR_OPERATOR_SECRET_NAME"
	ServerContainerName       = "redis"
)

Variables

This section is empty.

Functions

func GenerateFailoverACLConfigMapName

func GenerateFailoverACLConfigMapName(name string) string

func GenerateFailoverACLOperatorSecretName

func GenerateFailoverACLOperatorSecretName(name string) string

acl operator secret

func GenerateFailoverDefaultRedisUserName

func GenerateFailoverDefaultRedisUserName(name string) string

func GenerateFailoverOperatorsRedisUserName

func GenerateFailoverOperatorsRedisUserName(name string) string

func GenerateFailoverRedisUser

func GenerateFailoverRedisUser(obj metav1.Object, u *user.User) *midv1.RedisUser

func GenerateFailoverRedisUserName

func GenerateFailoverRedisUserName(instName, name string) string

func GenerateName

func GenerateName(typeName, metaName string) string

func GenerateRedisStatefulSet

func GenerateRedisStatefulSet(inst types.RedisFailoverInstance, selectors map[string]string, isAllACLSupported bool) *appv1.StatefulSet

func GenerateSelectorLabels

func GenerateSelectorLabels(component, name string) map[string]string

func GetCommonLabels

func GetCommonLabels(name string, extra ...map[string]string) map[string]string

func GetCronJobName

func GetCronJobName(redisName, scheduleName string) string

func GetFailoverDeploymentName

func GetFailoverDeploymentName(sentinelName string) string

GetFailoverDeploymentName Deprecated in favor of standalone sentinel

func GetFailoverNodePortServiceName

func GetFailoverNodePortServiceName(rf *v1.RedisFailover, index int) string

func GetFailoverStatefulSetName

func GetFailoverStatefulSetName(sentinelName string) string

func GetRedisConfigMapName

func GetRedisConfigMapName(rf *databasesv1.RedisFailover) string

func GetRedisName

func GetRedisName(rf *v1.RedisFailover) string

func GetRedisNameExporter

func GetRedisNameExporter(rf *v1.RedisFailover) string

func GetRedisNodePortSvc

func GetRedisNodePortSvc(rf *v1.RedisFailover) string

func GetRedisROServiceName

func GetRedisROServiceName(failoverName string) string

func GetRedisRWServiceName

func GetRedisRWServiceName(failoverName string) string

func GetRedisScriptConfigMapName

func GetRedisScriptConfigMapName(name string) string

func GetRedisSecretName

func GetRedisSecretName(rf *v1.RedisFailover) string

func GetRedisShutdownConfigMapName

func GetRedisShutdownConfigMapName(rf *v1.RedisFailover) string

func GetRedisShutdownName

func GetRedisShutdownName(rf *v1.RedisFailover) string

func GetSentinelConfigmap

func GetSentinelConfigmap(name string) string

func GetSentinelHeadlessSvc

func GetSentinelHeadlessSvc(name string) string

func GetSentinelName

func GetSentinelName(name string) string

func GetSentinelReadinessConfigmap

func GetSentinelReadinessConfigmap(name string) string

Sentinel

func NeedStandaloneInit

func NeedStandaloneInit(rf *v1.RedisFailover) bool

func NewCertificate

func NewCertificate(rf *v1.RedisFailover, selectors map[string]string) *certv1.Certificate

NewCertificate

func NewExporterServiceForCR

func NewExporterServiceForCR(rf *v1.RedisFailover, selectors map[string]string) *corev1.Service

func NewFailoverAclConfigMap

func NewFailoverAclConfigMap(rf *databasesv1.RedisFailover, data map[string]string) *corev1.ConfigMap

func NewFailoverOpSecret

func NewFailoverOpSecret(rf *databasesv1.RedisFailover) *corev1.Secret

func NewFailoverSentinel

func NewFailoverSentinel(inst types.RedisFailoverInstance) *v1.RedisSentinel

func NewPodDisruptionBudgetForCR

func NewPodDisruptionBudgetForCR(rf *databasesv1.RedisFailover, selectors map[string]string) *policyv1.PodDisruptionBudget

func NewPodNodePortService

func NewPodNodePortService(rf *v1.RedisFailover, index int, selectors map[string]string, nodePort int32) *corev1.Service

func NewPodService

func NewPodService(rf *v1.RedisFailover, index int, selectors map[string]string) *corev1.Service

NewPodService returns a new Service for the given RedisFailover and index, with the configed service type

func NewRWSvcForCR

func NewRWSvcForCR(rf *v1.RedisFailover) *corev1.Service

func NewReadOnlyForCR

func NewReadOnlyForCR(rf *v1.RedisFailover) *corev1.Service

func NewRedisConfigMap

func NewRedisConfigMap(st types.RedisFailoverInstance, selectors map[string]string) (*corev1.ConfigMap, error)

func NewRedisFailoverDetailedStatusConfigMap

func NewRedisFailoverDetailedStatusConfigMap(inst types.RedisFailoverInstance, status *v1.RedisFailoverDetailedStatus) (*corev1.ConfigMap, error)

NewRedisFailoverDetailedStatusConfigMap creates a new ConfigMap for the given Cluster

func NewServiceMonitorForCR

func NewServiceMonitorForCR(rf *v1.RedisFailover) *smv1.ServiceMonitor

func ShouldUpdateDetailedStatusConfigMap

func ShouldUpdateDetailedStatusConfigMap(cm *corev1.ConfigMap, status *v1.RedisFailoverDetailedStatus) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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