class IngressService(CephService):
TYPE = 'ingress'
+ MAX_KEEPALIVED_PASS_LEN = 8
def primary_daemon_type(self) -> str:
return 'haproxy'
password = self.mgr.get_store(pw_key)
if password is None:
if not spec.monitor_password:
- password = ''.join(random.choice(string.ascii_lowercase) for _ in range(20))
+ password = ''.join(random.choice(string.ascii_lowercase) for _ in range(self.MAX_KEEPALIVED_PASS_LEN))
self.mgr.set_store(pw_key, password)
else:
if spec.monitor_password:
password = self.mgr.get_store(pw_key)
if password is None:
if not spec.keepalived_password:
- password = ''.join(random.choice(string.ascii_lowercase) for _ in range(20))
+ password = ''.join(random.choice(string.ascii_lowercase) for _ in range(self.MAX_KEEPALIVED_PASS_LEN))
self.mgr.set_store(pw_key, password)
else:
if spec.keepalived_password: