From 23fca62e86d5d66ca45ec837ee68806456cc6f99 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Thu, 31 Jul 2025 10:43:50 +0800 Subject: [PATCH] feat: add MongoDB connection configuration to notification service - Add MongoDB configuration to values.yaml, values.alpha.yaml, and values.prod.yaml - Add MongoDB environment variables to notification-config.yaml - Include mongodbName, mongodbPort, and mongodbUri settings - Use same MongoDB Atlas connection as central storage service --- .../templates/notification/notification-config.yaml | 3 +++ freeleaps/helm-pkg/notification/values.alpha.yaml | 3 +++ freeleaps/helm-pkg/notification/values.prod.yaml | 3 +++ freeleaps/helm-pkg/notification/values.yaml | 6 ++++++ 4 files changed, 15 insertions(+) diff --git a/freeleaps/helm-pkg/notification/templates/notification/notification-config.yaml b/freeleaps/helm-pkg/notification/templates/notification/notification-config.yaml index e8bfe28f..0aa7e354 100644 --- a/freeleaps/helm-pkg/notification/templates/notification/notification-config.yaml +++ b/freeleaps/helm-pkg/notification/templates/notification/notification-config.yaml @@ -9,6 +9,9 @@ data: APP_NAME: {{ .Values.notification.configs.appName | b64enc | quote }} SERVICE_API_ACCESS_HOST: {{ .Values.notification.configs.serviceApiAccessHost | b64enc | quote }} SERVICE_API_ACCESS_PORT: {{ .Values.notification.configs.serviceApiAccessPort | toString | b64enc }} + MONGODB_NAME: {{ .Values.notification.configs.mongodbName | b64enc | quote }} + MONGODB_PORT: {{ .Values.notification.configs.mongodbPort | toString | b64enc }} + MONGODB_URI: {{ .Values.notification.configs.mongodbUri | b64enc | quote }} RABBITMQ_HOST: {{ .Values.notification.configs.rabbitmqHost | b64enc | quote }} RABBITMQ_PORT: {{ .Values.notification.configs.rabbitmqPort | toString | b64enc }} RABBITMQ_USERNAME: {{ .Values.notification.configs.rabbitmqUsername | b64enc | quote }} diff --git a/freeleaps/helm-pkg/notification/values.alpha.yaml b/freeleaps/helm-pkg/notification/values.alpha.yaml index d0af765e..fe4aa8ef 100644 --- a/freeleaps/helm-pkg/notification/values.alpha.yaml +++ b/freeleaps/helm-pkg/notification/values.alpha.yaml @@ -80,6 +80,9 @@ notification: appName: notification serviceApiAccessHost: 0.0.0.0 serviceApiAccessPort: 8003 + mongodbName: freeleaps2 + mongodbPort: 27017 + mongodbUri: mongodb+srv://jetli:8IHKx6dZK8BfugGp@freeleaps2.hanbj.mongodb.net/ rabbitmqHost: freeleaps-alpha-rabbitmq.freeleaps-alpha.svc.freeleaps.cluster rabbitmqPort: 5672 rabbitmqUsername: user diff --git a/freeleaps/helm-pkg/notification/values.prod.yaml b/freeleaps/helm-pkg/notification/values.prod.yaml index 62e9effe..1e87efb7 100644 --- a/freeleaps/helm-pkg/notification/values.prod.yaml +++ b/freeleaps/helm-pkg/notification/values.prod.yaml @@ -66,6 +66,9 @@ notification: appName: notification serviceApiAccessHost: 0.0.0.0 serviceApiAccessPort: 8003 + mongodbName: freeleaps2 + mongodbPort: 27017 + mongodbUri: mongodb+srv://jetli:8IHKx6dZK8BfugGp@freeleaps2.hanbj.mongodb.net/ rabbitmqHost: freeleaps-prod-rabbitmq-headless.freeleaps-prod.svc.freeleaps.cluster rabbitmqPort: 5672 rabbitmqUsername: user diff --git a/freeleaps/helm-pkg/notification/values.yaml b/freeleaps/helm-pkg/notification/values.yaml index 221c3bcd..52adad9d 100644 --- a/freeleaps/helm-pkg/notification/values.yaml +++ b/freeleaps/helm-pkg/notification/values.yaml @@ -55,6 +55,12 @@ notification: serviceApiAccessHost: "0.0.0.0" # SERVICE_API_ACCESS_PORT serviceApiAccessPort: "8003" + # MONGODB_NAME + mongodbName: "freeleaps2" + # MONGODB_PORT + mongodbPort: "27017" + # MONGODB_URI + mongodbUri: "mongodb+srv://jetli:8IHKx6dZK8BfugGp@freeleaps2.hanbj.mongodb.net/" # RABBITMQ_HOST rabbitmqHost: "" # RABBITMQ_PORT