mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 02:05:41 +01:00
rollback to delete external redis username (#16353)
Signed-off-by: yminer <yminer@vmmware.com> Co-authored-by: yminer <yminer@vmmware.com>
This commit is contained in:
parent
77b6a130f8
commit
6c97d3f0c7
@ -172,10 +172,7 @@ _version: 2.5.0
|
||||
# # host for redis+sentinel:
|
||||
# # <host_sentinel1>:<port_sentinel1>,<host_sentinel2>:<port_sentinel2>,<host_sentinel3>:<port_sentinel3>
|
||||
# host: redis:6379
|
||||
# password:
|
||||
# # Redis AUTH command was extended in Redis 6, it is possible to use it in the two-arguments AUTH <username> <password> form.
|
||||
# # implicit username is "default", provide compatibility with past version of old AUTH <password> form
|
||||
# username:
|
||||
# password:
|
||||
# # sentinel_master_set must be set to support redis+sentinel
|
||||
# #sentinel_master_set:
|
||||
# # db_index 0 is for core, it's unchangeable
|
||||
|
@ -379,9 +379,8 @@ def get_redis_url(db, redis=None):
|
||||
kwargs['db_part'] = db and ("/%s" % db) or ""
|
||||
kwargs['sentinel_part'] = kwargs.get('sentinel_master_set', None) and ("/" + kwargs['sentinel_master_set']) or ''
|
||||
kwargs['password_part'] = kwargs.get('password', None) and (':%s@' % kwargs['password']) or ''
|
||||
kwargs['username_part'] = kwargs.get('username', None) or ''
|
||||
|
||||
return "{scheme}://{username_part}{password_part}{host}{sentinel_part}{db_part}".format(**kwargs) + get_redis_url_param(kwargs)
|
||||
return "{scheme}://{password_part}{host}{sentinel_part}{db_part}".format(**kwargs) + get_redis_url_param(kwargs)
|
||||
|
||||
|
||||
def get_redis_url_param(redis=None):
|
||||
|
Loading…
Reference in New Issue
Block a user