Documentation ¶
Index ¶
- Constants
- func BuildOwnerReferences(obj client.Object) (refs []metav1.OwnerReference)
- func BuildOwnerReferencesWithParents(obj client.Object) (refs []metav1.OwnerReference)
- func CheckRule(aclRules string) error
- func CheckUserRuleUpdate(ruleSource string) error
- func CompareStrings(a, b string) int
- func ConvertMemoryUnit(p string) (string, error)
- func ExtractLastNumber(s string) int
- func GenerateClusterACLConfigMapName(name string) string
- func GenerateName(typeName, metaName string) string
- func GenerateRedisPasswordOptions() string
- func GenerateRedisRandPassword() string
- func GenerateRedisRebuildAnnotation() map[string]string
- func GenerateRedisTLSOptions() string
- func GetClaimName(backupDestination string) string
- func GetContainerByName(pod *corev1.PodSpec, name string) *corev1.Container
- func GetCronJobName(redisName, scheduleName string) string
- func GetEnvSentinelHost(name string) string
- func GetEnvSentinelPort(name string) string
- func GetRedisName(rf *v1.RedisFailover) string
- func GetRedisNameExporter(rf *v1.RedisFailover) string
- func GetRedisNodePortSvc(rf *v1.RedisFailover) string
- func GetRedisROServiceName(rfName string) string
- func GetRedisRWServiceName(rfName string) string
- func GetRedisSSLSecretName(rfName string) string
- func GetRedisSecretName(rf *v1.RedisFailover) string
- func GetRedisShutdownConfigMapName(rf *v1.RedisFailover) string
- func GetRedisShutdownName(rf *v1.RedisFailover) string
- func GetSentinelHeadlessSvc(rf *v1.RedisFailover) string
- func GetSentinelName(rf *v1.RedisFailover) string
- func GetSentinelReadinessConfigmap(rf *v1.RedisFailover) string
- func GetVolumeByName(vols []corev1.Volume, name string) *corev1.Volume
- func GetVolumeClaimTemplatesByName(vols []corev1.PersistentVolumeClaim, name string) *corev1.PersistentVolumeClaim
- func MapKeys(m map[string]string) (ret []string)
- func MergeMap(maps ...map[string]string) map[string]string
- func ParsePortSequence(portSequence string) ([]int32, error)
- func RedisInstancePersistence(ctx context.Context, mgrCli client.Client, namespace string, ...) error
- func RetryOnTimeout(f func() error, step int) error
- func UnifyValueUnit(v string) string
- type AuthConfig
- type Object
Constants ¶
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" AppLabel = "redis-failover" HostnameTopologyKey = "kubernetes.io/hostname" RedisBackupServiceAccountName = "redis-backup" RedisBackupRoleName = "redis-backup" RedisBackupRoleBindingName = "redis-backup" )
View Source
const ( RedisConfigFileNameBackup = "redis.conf.bk" RedisInitScript = "init.sh" SentinelEntrypoint = "entrypoint.sh" RedisBackupVolumeName = "backup-data" S3SecretVolumeName = "s3-secret" )
View Source
const ( ExporterPort = 9121 SentinelExporterPort = 9355 SentinelPort = "26379" ExporterPortName = "http-metrics" RedisPort = 6379 RedisPortString = "6379" RedisPortName = "redis" ExporterContainerName = "redis-exporter" SentinelExporterContainerName = "sentinel-exporter" RestoreContainerName = "restore" ExporterDefaultRequestCPU = "25m" ExporterDefaultLimitCPU = "50m" ExporterDefaultRequestMemory = "50Mi" ExporterDefaultLimitMemory = "100Mi" )
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 ( Master = "master" Slave = "slave" )
Redis role
View Source
const (
LabelRedisArch = "redisarch"
)
Redis arch
Variables ¶
This section is empty.
Functions ¶
func BuildOwnerReferences ¶
func BuildOwnerReferences(obj client.Object) (refs []metav1.OwnerReference)
func BuildOwnerReferencesWithParents ¶
func BuildOwnerReferencesWithParents(obj client.Object) (refs []metav1.OwnerReference)
func CheckUserRuleUpdate ¶
func GenerateName ¶
func GenerateRedisPasswordOptions ¶
func GenerateRedisPasswordOptions() string
func GenerateRedisRandPassword ¶
func GenerateRedisRandPassword() string
func GenerateRedisTLSOptions ¶
func GenerateRedisTLSOptions() string
func GetClaimName ¶
split storage name, example: pvc/redisfailover-persistent-keep-data-rfr-redis-sentinel-demo-0
func GetContainerByName ¶
GetContainerByName
func GetCronJobName ¶
func GetEnvSentinelHost ¶
func GetEnvSentinelPort ¶
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 GetRedisRWServiceName ¶
func GetRedisSSLSecretName ¶
GetRedisSSLSecretName return the name of redis ssl secret
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 GetSentinelHeadlessSvc ¶
func GetSentinelHeadlessSvc(rf *v1.RedisFailover) string
func GetSentinelName ¶
func GetSentinelName(rf *v1.RedisFailover) string
func GetSentinelReadinessConfigmap ¶
func GetSentinelReadinessConfigmap(rf *v1.RedisFailover) string
func GetVolumeByName ¶
GetVolumes
func GetVolumeClaimTemplatesByName ¶
func GetVolumeClaimTemplatesByName(vols []corev1.PersistentVolumeClaim, name string) *corev1.PersistentVolumeClaim
GetVolumeClaimTemplatesByName
func MergeMap ¶
MergeLabels merges all the label maps received as argument into a single new label map.
func ParsePortSequence ¶
func RetryOnTimeout ¶
func UnifyValueUnit ¶
UnifyValueUnit value convert, not care the config itself
Types ¶
type AuthConfig ¶
Click to show internal directories.
Click to hide internal directories.