lifecycle: use URl for redis on startup to prevent errors with no paswords
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
65b8a5bb8d
commit
f072c600cc
|
@ -61,6 +61,7 @@ class KubernetesController(BaseController):
|
|||
try:
|
||||
for reconcile_key in self.reconcile_order:
|
||||
reconciler = self.reconcilers[reconcile_key](self)
|
||||
self.logger.debug("Tearing down object", name=reconcile_key)
|
||||
reconciler.down()
|
||||
|
||||
except ApiException as exc:
|
||||
|
|
|
@ -41,11 +41,9 @@ while True:
|
|||
|
||||
while True:
|
||||
try:
|
||||
redis = Redis(
|
||||
host=CONFIG.y("redis.host"),
|
||||
port=6379,
|
||||
db=CONFIG.y("redis.message_queue_db"),
|
||||
password=CONFIG.y("redis.password"),
|
||||
redis = Redis.from_url(
|
||||
f"redis://:{CONFIG.y('redis.password')}@{CONFIG.y('redis.host')}:6379"
|
||||
f"/{CONFIG.y('redis.ws_db')}"
|
||||
)
|
||||
redis.ping()
|
||||
break
|
||||
|
|
Reference in New Issue