diff --git a/weed/command/scaffold.go b/weed/command/scaffold.go index a0908912c..e24d7b56a 100644 --- a/weed/command/scaffold.go +++ b/weed/command/scaffold.go @@ -141,6 +141,7 @@ addresses = [ "localhost:30005", "localhost:30006", ] +password = "" ` diff --git a/weed/filer2/redis/redis_cluster_store.go b/weed/filer2/redis/redis_cluster_store.go index 4f74a8a22..11c315391 100644 --- a/weed/filer2/redis/redis_cluster_store.go +++ b/weed/filer2/redis/redis_cluster_store.go @@ -21,12 +21,14 @@ func (store *RedisClusterStore) GetName() string { func (store *RedisClusterStore) Initialize(configuration util.Configuration) (err error) { return store.initialize( configuration.GetStringSlice("addresses"), + configuration.GetString("password"), ) } -func (store *RedisClusterStore) initialize(addresses []string) (err error) { +func (store *RedisClusterStore) initialize(addresses []string, password string) (err error) { store.Client = redis.NewClusterClient(&redis.ClusterOptions{ - Addrs: addresses, + Addrs: addresses, + Password: password, }) return }