redis

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

View Source
const (
	RedisFailoverType = "redis-failover"
	RedisClusterType  = "distributed-redis-cluster"
)
View Source
const (
	// storage
	StorageProvisionerKey = "volume.beta.kubernetes.io/storage-provisioner"
	TopoLVMProvisionerKey = "topolvm.cybozu.com"
)
View Source
const (
	ControllerVersionLabel = "controllerVersion"
)
View Source
const (
	PauseAnnotationKey = "app.cpaas.io/pause-timestamp"
)

Variables

This section is empty.

Functions

func ClusterIsUp

func ClusterIsUp(cluster *v1alpha1.DistributedRedisCluster) bool

func GenerateClusterRedisByManagerUI

func GenerateClusterRedisByManagerUI(cluster *v1alpha1.DistributedRedisCluster, scheme *runtime.Scheme, secret *corev1.Secret) *v1.Redis

func GenerateFailoverRedisByManagerUI

func GenerateFailoverRedisByManagerUI(failover *redisfailover.RedisFailover, sts *appsv1.StatefulSet, secret *corev1.Secret) *v1.Redis

func GenerateRedisCluster

func GenerateRedisCluster(instance *v1.Redis, bv *vc.BundleVersion) (*v1alpha1.DistributedRedisCluster, error)

func GenerateRedisFailover

func GenerateRedisFailover(instance *v1.Redis, bv *vc.BundleVersion) (*redisfailover.RedisFailover, error)

func GetRedisClusterLabels

func GetRedisClusterLabels(instanceName, clusterName string) map[string]string

func GetRedisClusterName

func GetRedisClusterName(instanceName string) string

func GetRedisConfigsApplyPolicyByVersion

func GetRedisConfigsApplyPolicyByVersion(ver string) map[string]ApplyPolicy

func GetRedisFailoverName

func GetRedisFailoverName(instanceName string) string

func GetRedisSentinelLabels

func GetRedisSentinelLabels(instanceName, failoverName string) map[string]string

func GetRedisStorageVolumeName

func GetRedisStorageVolumeName(instanceName string) string

func GetRedisVersion

func GetRedisVersion(image string) string

func GetShardMaxPVCQuantity

func GetShardMaxPVCQuantity(ctx context.Context, client ctrlClient.Client, namespace string, labels map[string]string) (*resource.Quantity, error)

func MergeAnnotations

func MergeAnnotations(t, s map[string]string) map[string]string

func ResizePVCs

func ResizePVCs(ctx context.Context, client ctrlClient.Client, namespace string, labels map[string]string, storageQuantity resource.Quantity) error

func ShouldUpdateCluster

func ShouldUpdateCluster(cluster, newCluster *v1alpha1.DistributedRedisCluster, logger logr.Logger) bool

func ShouldUpdateFailover

func ShouldUpdateFailover(failover, newFailover *redisfailover.RedisFailover, logger logr.Logger) bool

Types

type ApplyPolicy

type ApplyPolicy string
const (
	Unsupported  ApplyPolicy = "Unsupported"
	RestartApply ApplyPolicy = "RestartApply"
)

Jump to

Keyboard shortcuts

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