Skip to content

Commit

Permalink
fix label redis_setup_type to sentinel
Browse files Browse the repository at this point in the history
Signed-off-by: drivebyer <wuyangmuc@gmail.com>
  • Loading branch information
drivebyer committed Oct 23, 2023
1 parent 5a4b6cf commit 7bb0bc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions k8sutils/redis-sentinel.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (service RedisSentinelSTS) CreateRedisSentinelSetup(ctx context.Context, cr

stateFulName := cr.ObjectMeta.Name + "-" + service.RedisStateFulType
logger := statefulSetLogger(cr.Namespace, stateFulName)
labels := getRedisLabels(stateFulName, cluster, service.RedisStateFulType, cr.ObjectMeta.Labels)
labels := getRedisLabels(stateFulName, sentinel, service.RedisStateFulType, cr.ObjectMeta.Labels)
annotations := generateStatefulSetsAnots(cr.ObjectMeta, cr.Spec.KubernetesConfig.IgnoreAnnotations)
objectMetaInfo := generateObjectMetaInformation(stateFulName, cr.Namespace, labels, annotations)
err := CreateOrUpdateStateFul(
Expand Down Expand Up @@ -199,7 +199,7 @@ func (service RedisSentinelSTS) getSentinelCount(cr *redisv1beta2.RedisSentinel)
func (service RedisSentinelService) CreateRedisSentinelService(cr *redisv1beta2.RedisSentinel) error {
serviceName := cr.ObjectMeta.Name + "-" + service.RedisServiceRole
logger := serviceLogger(cr.Namespace, serviceName)
labels := getRedisLabels(serviceName, cluster, service.RedisServiceRole, cr.ObjectMeta.Labels)
labels := getRedisLabels(serviceName, sentinel, service.RedisServiceRole, cr.ObjectMeta.Labels)
annotations := generateServiceAnots(cr.ObjectMeta, nil)

if cr.Spec.RedisExporter != nil && cr.Spec.RedisExporter.Enabled {
Expand Down

0 comments on commit 7bb0bc9

Please sign in to comment.