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:
|
try:
|
||||||
for reconcile_key in self.reconcile_order:
|
for reconcile_key in self.reconcile_order:
|
||||||
reconciler = self.reconcilers[reconcile_key](self)
|
reconciler = self.reconcilers[reconcile_key](self)
|
||||||
|
self.logger.debug("Tearing down object", name=reconcile_key)
|
||||||
reconciler.down()
|
reconciler.down()
|
||||||
|
|
||||||
except ApiException as exc:
|
except ApiException as exc:
|
||||||
|
|
|
@ -41,11 +41,9 @@ while True:
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
redis = Redis(
|
redis = Redis.from_url(
|
||||||
host=CONFIG.y("redis.host"),
|
f"redis://:{CONFIG.y('redis.password')}@{CONFIG.y('redis.host')}:6379"
|
||||||
port=6379,
|
f"/{CONFIG.y('redis.ws_db')}"
|
||||||
db=CONFIG.y("redis.message_queue_db"),
|
|
||||||
password=CONFIG.y("redis.password"),
|
|
||||||
)
|
)
|
||||||
redis.ping()
|
redis.ping()
|
||||||
break
|
break
|
||||||
|
|
Reference in a new issue