Update MongoDB configuration in values.yaml and enhance Ingestor class to utilize MongoDB connection parameters

This commit is contained in:
vitor-aignosi
2025-07-01 12:31:46 -03:00
parent d79f882018
commit c5b23da373
3 changed files with 34 additions and 10 deletions

View File

@@ -42,6 +42,11 @@ class Ingestor:
self.heartbeat_ttl = int(getenv("HEARTBEAT_TTL", "20"))
self.pod_id = getenv("HOSTNAME", "localhost")
self.poll_interval = int(getenv("POLL_INTERVAL", "5"))
mongo_url = getenv("MONGO_URL", 'localhost:27017')
mongo_username = getenv("MONGO_USERNAME", 'sientia')
mongo_password = getenv("MONGO_PASSWORD", 'sientia')
self.mongo_database = getenv("MONGO_DATABASE", 'sientia')
self.mongo_connection_string = f"mongodb://{mongo_username}:{mongo_password}@{mongo_url}"
self.kafka_servers = kafka_servers.split(",")
self.logger = None
@@ -138,6 +143,8 @@ class Ingestor:
self.heartbeat_ttl,
self.pod_id,
self.poll_interval,
self.mongo_connection_string,
self.mongo_database,
self.logger,
self.notification_handler,
self.redis_username,