Skip to content

Commit 792deab

Browse files
authored
Merge pull request #4 from angel9484/feature/make_configurable_port_and_gossip_in_redis
Feature/make configurable port and gossip in redis
2 parents f34d70e + b0f468c commit 792deab

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

pkg/controller/distributedrediscluster/sync_handler.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package distributedrediscluster
22

33
import (
44
"fmt"
5-
"strconv"
65
"time"
76

87
"github.com/go-logr/logr"
@@ -356,7 +355,7 @@ func (r *ReconcileDistributedRedisCluster) resetClusterPassword(ctx *syncContext
356355
// Update the password recorded in the file /data/redis_password, redis pod preStop hook
357356
// need /data/redis_password do CLUSTER FAILOVER
358357
cmd := fmt.Sprintf("echo %s > /data/redis_password", newPassword)
359-
if err := r.execer.ExecCommandInPodSet(podSet, "/bin/sh", "-c", "-p", strconv.Itoa(ctx.cluster.Spec.ClientPort), cmd); err != nil {
358+
if err := r.execer.ExecCommandInPodSet(podSet, "/bin/sh", "-c", cmd); err != nil {
360359
return err
361360
}
362361

pkg/resources/statefulsets/statefulset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func redisServerContainer(cluster *redisv1alpha1.DistributedRedisCluster, passwo
297297
Lifecycle: &corev1.Lifecycle{
298298
PostStart: &corev1.Handler{
299299
Exec: &corev1.ExecAction{
300-
Command: []string{"/bin/sh", "-p", strconv.Itoa(cluster.Spec.ClientPort), "-c", "echo ${REDIS_PASSWORD} > /data/redis_password"},
300+
Command: []string{"/bin/sh", "-c", "echo ${REDIS_PASSWORD} > /data/redis_password"},
301301
},
302302
},
303303
PreStop: &corev1.Handler{

0 commit comments

Comments
 (0)