Documentation ¶
Index ¶
- Constants
- Variables
- func AclConfigMapName(clusterName string) string
- func GenerateAclconf(conflog logr.Logger, client client.Client, ...) (string, map[string]string, error)
- func GetAclStringFromSecrets(conflog logr.Logger, client client.Client, ...) (string, string, error)
- func GetAcldataFromSecrets(client client.Client, cluster *redisv1alpha1.DistributedRedisCluster, ...) (map[string]string, string, error)
- func GetHashedPassword(password string) string
- func Getsecretversions(conflog logr.Logger, client client.Client, ...) (map[string]string, error)
- func NewACLConfigMap(conflog logr.Logger, client client.Client, ...) (*corev1.ConfigMap, map[string]string, error, bool)
- func NewConfigMapForCR(cluster *redisv1alpha1.DistributedRedisCluster, labels map[string]string) *corev1.ConfigMap
- func NewConfigMapForRestore(cluster *redisv1alpha1.DistributedRedisCluster, labels map[string]string) *corev1.ConfigMap
- func RedisConfigMapName(clusterName string) string
- func RestoreConfigMapName(clusterName string) string
Constants ¶
View Source
const ( RestoreSucceeded = "succeeded" RedisConfKey = "redis.conf" Aclfile = "users.acl" )
Variables ¶
View Source
var ErrBadInput = errors.New("admin-secret-missing")
Functions ¶
func AclConfigMapName ¶
func GenerateAclconf ¶
func GenerateAclconf(conflog logr.Logger, client client.Client, cluster *redisv1alpha1.DistributedRedisCluster) (string, map[string]string, error)
func Getsecretversions(conflog logr.Logger, client client.Client, cluster *redisv1alpha1.DistributedRedisCluster) (map[string]string, error) { secretversion := make(map[string]string) if cluster.Spec.AdminSecret == nil { err := fmt.Errorf("admin secret refrence not defined in CR") conflog.Error(err, "in Getsecretversions:") secretversion["admin-secret"] = "default" } else { conflog.Info("Getsecretversions", "fetting secret revision for", cluster.Spec.AdminSecret.Name) _, versionID, err := GetAclStringFromSecrets(conflog, client, cluster, cluster.Spec.AdminSecret.Name) if err != nil { conflog.Error(err, "admin secret unable to get") return secretversion, err } else { secretversion[cluster.Spec.AdminSecret.Name] = versionID } } if cluster.Spec.DefaultSecret == nil { err := fmt.Errorf("default secret refrence not defined in CR") conflog.Error(err, "in Getsecretversions:") return secretversion, err } else { conflog.Info("Getsecretversions", "fetting secret revision for", cluster.Spec.DefaultSecret.Name) _, versionID, err := GetAclStringFromSecrets(conflog, client, cluster, cluster.Spec.DefaultSecret.Name) if err != nil { conflog.Error(err, "default secret unable to get") return secretversion, err } else { secretversion[cluster.Spec.DefaultSecret.Name] = versionID } } if cluster.Spec.AdditionalSecret != nil { for _, ref := range cluster.Spec.AdditionalSecret { sceretrefname := ref.Name conflog.Info("Getsecretversions", "fetting secret revision for", sceretrefname) _, versionID, err := GetAclStringFromSecrets(conflog, client, cluster, sceretrefname) if err != nil { conflog.Error(err, "additional secret unable to get") } else { secretversion[sceretrefname] = versionID } } } return secretversion, nil }
func GetAclStringFromSecrets ¶
func GetAclStringFromSecrets(conflog logr.Logger, client client.Client, cluster *redisv1alpha1.DistributedRedisCluster, secretname string) (string, string, error)
func GetAcldataFromSecrets ¶
func GetAcldataFromSecrets(client client.Client, cluster *redisv1alpha1.DistributedRedisCluster, secretname string) (map[string]string, string, error)
Extract the auth,acldata from secrets.
func GetHashedPassword ¶
func Getsecretversions ¶
func Getsecretversions(conflog logr.Logger, client client.Client, cluster *redisv1alpha1.DistributedRedisCluster) (map[string]string, error)
func NewACLConfigMap ¶
func NewConfigMapForCR ¶
func NewConfigMapForCR(cluster *redisv1alpha1.DistributedRedisCluster, labels map[string]string) *corev1.ConfigMap
NewConfigMapForCR creates a new ConfigMap for the given Cluster
func NewConfigMapForRestore ¶
func NewConfigMapForRestore(cluster *redisv1alpha1.DistributedRedisCluster, labels map[string]string) *corev1.ConfigMap
func RedisConfigMapName ¶
func RestoreConfigMapName ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.