Documentation ¶
Index ¶
- Constants
- func AddOwnerRefToObject(obj metav1.Object, ownerRef metav1.OwnerReference)
- func AddRedisClusterFinalizer(cr *redisv1beta1.RedisCluster, cl client.Client) error
- func AddRedisFinalizer(cr *redisv1beta1.Redis, cl client.Client) error
- func CheckRedisClusterState(cr *redisv1beta1.RedisCluster) int
- func CheckRedisNodeCount(cr *redisv1beta1.RedisCluster, nodeType string) int32
- func CreateMultipleLeaderRedisCommand(cr *redisv1beta1.RedisCluster) []string
- func CreateOrUpdatePodDisruptionBudget(pdbDef *policyv1.PodDisruptionBudget) error
- func CreateOrUpdateService(namespace string, serviceMeta metav1.ObjectMeta, ...) error
- func CreateOrUpdateStateFul(namespace string, stsMeta metav1.ObjectMeta, params statefulSetParameters, ...) error
- func CreateRedisFollower(cr *redisv1beta1.RedisCluster) error
- func CreateRedisFollowerService(cr *redisv1beta1.RedisCluster) error
- func CreateRedisLeader(cr *redisv1beta1.RedisCluster) error
- func CreateRedisLeaderService(cr *redisv1beta1.RedisCluster) error
- func CreateSingleLeaderRedisCommand(cr *redisv1beta1.RedisCluster) []string
- func CreateStandaloneRedis(cr *redisv1beta1.Redis) error
- func CreateStandaloneService(cr *redisv1beta1.Redis) error
- func ExecuteFailoverOperation(cr *redisv1beta1.RedisCluster) error
- func ExecuteRedisClusterCommand(cr *redisv1beta1.RedisCluster)
- func ExecuteRedisReplicationCommand(cr *redisv1beta1.RedisCluster)
- func GenerateTLSEnvironmentVariables(tlsconfig *redisv1beta1.TLSConfig) []corev1.EnvVar
- func GetPodDisruptionBudget(namespace string, pdb string) (*policyv1.PodDisruptionBudget, error)
- func GetStatefulSet(namespace string, stateful string) (*appsv1.StatefulSet, error)
- func HandleRedisClusterFinalizer(cr *redisv1beta1.RedisCluster, cl client.Client) error
- func HandleRedisFinalizer(cr *redisv1beta1.Redis, cl client.Client) error
- func LabelSelectors(labels map[string]string) *metav1.LabelSelector
- func ReconcileRedisPodDisruptionBudget(cr *redisv1beta1.RedisCluster, role string, ...) error
- type RedisClusterSTS
- type RedisClusterService
- type RedisDetails
Constants ¶
const ( RedisFinalizer string = "redisFinalizer" RedisClusterFinalizer string = "redisClusterFinalizer" )
Variables ¶
This section is empty.
Functions ¶
func AddOwnerRefToObject ¶
func AddOwnerRefToObject(obj metav1.Object, ownerRef metav1.OwnerReference)
AddOwnerRefToObject adds the owner references to object
func AddRedisClusterFinalizer ¶
func AddRedisClusterFinalizer(cr *redisv1beta1.RedisCluster, cl client.Client) error
AddRedisClusterFinalizer add finalizer for graceful deletion
func AddRedisFinalizer ¶
func AddRedisFinalizer(cr *redisv1beta1.Redis, cl client.Client) error
AddRedisFinalizer add finalizer for graceful deletion
func CheckRedisClusterState ¶
func CheckRedisClusterState(cr *redisv1beta1.RedisCluster) int
CheckRedisClusterState will check the redis cluster state
func CheckRedisNodeCount ¶
func CheckRedisNodeCount(cr *redisv1beta1.RedisCluster, nodeType string) int32
CheckRedisNodeCount will check the count of redis nodes
func CreateMultipleLeaderRedisCommand ¶ added in v0.13.0
func CreateMultipleLeaderRedisCommand(cr *redisv1beta1.RedisCluster) []string
CreateMultipleLeaderRedisCommand will create command for single leader cluster creation
func CreateOrUpdatePodDisruptionBudget ¶
func CreateOrUpdatePodDisruptionBudget(pdbDef *policyv1.PodDisruptionBudget) error
CreateOrUpdateService method will create or update Redis service
func CreateOrUpdateService ¶
func CreateOrUpdateService(namespace string, serviceMeta metav1.ObjectMeta, ownerDef metav1.OwnerReference, enableMetrics, headless bool, serviceType string) error
CreateOrUpdateService method will create or update Redis service
func CreateOrUpdateStateFul ¶
func CreateOrUpdateStateFul(namespace string, stsMeta metav1.ObjectMeta, params statefulSetParameters, ownerDef metav1.OwnerReference, containerParams containerParameters, sidecars *[]redisv1beta1.Sidecar) error
CreateOrUpdateStateFul method will create or update Redis service
func CreateRedisFollower ¶
func CreateRedisFollower(cr *redisv1beta1.RedisCluster) error
CreateRedisFollower will create a follower redis setup
func CreateRedisFollowerService ¶
func CreateRedisFollowerService(cr *redisv1beta1.RedisCluster) error
CreateRedisFollowerService method will create service for Redis Follower
func CreateRedisLeader ¶
func CreateRedisLeader(cr *redisv1beta1.RedisCluster) error
CreateRedisLeader will create a leader redis setup
func CreateRedisLeaderService ¶
func CreateRedisLeaderService(cr *redisv1beta1.RedisCluster) error
CreateRedisLeaderService method will create service for Redis Leader
func CreateSingleLeaderRedisCommand ¶ added in v0.13.0
func CreateSingleLeaderRedisCommand(cr *redisv1beta1.RedisCluster) []string
CreateSingleLeaderRedisCommand will create command for single leader cluster creation
func CreateStandaloneRedis ¶
func CreateStandaloneRedis(cr *redisv1beta1.Redis) error
CreateStandaloneRedis will create a standalone redis setup
func CreateStandaloneService ¶
func CreateStandaloneService(cr *redisv1beta1.Redis) error
CreateStandaloneService method will create standalone service for Redis
func ExecuteFailoverOperation ¶
func ExecuteFailoverOperation(cr *redisv1beta1.RedisCluster) error
ExecuteFailoverOperation will execute redis failover operations
func ExecuteRedisClusterCommand ¶
func ExecuteRedisClusterCommand(cr *redisv1beta1.RedisCluster)
ExecuteRedisClusterCommand will execute redis cluster creation command
func ExecuteRedisReplicationCommand ¶
func ExecuteRedisReplicationCommand(cr *redisv1beta1.RedisCluster)
ExecuteRedisReplicationCommand will execute the replication command
func GenerateTLSEnvironmentVariables ¶
func GenerateTLSEnvironmentVariables(tlsconfig *redisv1beta1.TLSConfig) []corev1.EnvVar
func GetPodDisruptionBudget ¶
func GetPodDisruptionBudget(namespace string, pdb string) (*policyv1.PodDisruptionBudget, error)
GetPodDisruptionBudget is a method to get PodDisruptionBudgets in Kubernetes
func GetStatefulSet ¶
func GetStatefulSet(namespace string, stateful string) (*appsv1.StatefulSet, error)
GetStateFulSet is a method to get statefulset in Kubernetes
func HandleRedisClusterFinalizer ¶
func HandleRedisClusterFinalizer(cr *redisv1beta1.RedisCluster, cl client.Client) error
HandleRedisClusterFinalizer finalize resource if instance is marked to be deleted
func HandleRedisFinalizer ¶
func HandleRedisFinalizer(cr *redisv1beta1.Redis, cl client.Client) error
HandleRedisFinalizer finalize resource if instance is marked to be deleted
func LabelSelectors ¶
func LabelSelectors(labels map[string]string) *metav1.LabelSelector
LabelSelectors generates object for label selection
func ReconcileRedisPodDisruptionBudget ¶
func ReconcileRedisPodDisruptionBudget(cr *redisv1beta1.RedisCluster, role string, pdbParams *redisv1beta1.RedisPodDisruptionBudget) error
CreateRedisLeaderPodDisruptionBudget check and create a PodDisruptionBudget for Leaders
Types ¶
type RedisClusterSTS ¶
type RedisClusterSTS struct { RedisStateFulType string ExternalConfig *string Affinity *corev1.Affinity `json:"affinity,omitempty"` ReadinessProbe *redisv1beta1.Probe LivenessProbe *redisv1beta1.Probe NodeSelector map[string]string Tolerations *[]corev1.Toleration }
RedisClusterSTS is a interface to call Redis Statefulset function
func (RedisClusterSTS) CreateRedisClusterSetup ¶
func (service RedisClusterSTS) CreateRedisClusterSetup(cr *redisv1beta1.RedisCluster) error
CreateRedisClusterSetup will create Redis Setup for leader and follower
type RedisClusterService ¶
type RedisClusterService struct {
RedisServiceRole string
}
RedisClusterService is a interface to call Redis Service function
func (RedisClusterService) CreateRedisClusterService ¶
func (service RedisClusterService) CreateRedisClusterService(cr *redisv1beta1.RedisCluster) error
CreateRedisClusterService method will create service for Redis
type RedisDetails ¶
RedisDetails will hold the information for Redis Pod