From 23fca62e86d5d66ca45ec837ee68806456cc6f99 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Thu, 31 Jul 2025 10:43:50 +0800 Subject: [PATCH 1/3] 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 From cc73ad92a9f8eabfd6814652fd571058d223c9ed Mon Sep 17 00:00:00 2001 From: Nicolas Date: Thu, 31 Jul 2025 11:27:28 +0800 Subject: [PATCH 2/3] feat: add container logs collection to OpenTelemetry config for central storage --- .../templates/central-storage/opentelemetry.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/freeleaps/helm-pkg/centralStorage/templates/central-storage/opentelemetry.yaml b/freeleaps/helm-pkg/centralStorage/templates/central-storage/opentelemetry.yaml index 152f2bb3..c1626c8e 100644 --- a/freeleaps/helm-pkg/centralStorage/templates/central-storage/opentelemetry.yaml +++ b/freeleaps/helm-pkg/centralStorage/templates/central-storage/opentelemetry.yaml @@ -54,6 +54,16 @@ spec: - type: json_parser parse_from: body parse_to: attributes + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 + # Add container logs receiver + k8scluster: + collection_interval: 1s + auth_type: serviceAccount processors: resource: attributes: @@ -112,7 +122,7 @@ spec: level: info pipelines: logs: - receivers: [filelog] + receivers: [filelog, otlp, k8scluster] processors: [resource, transform, batch] exporters: [otlphttp/logs] {{- end }} \ No newline at end of file From 5fe4cf6d70a052c363d996d98eb27c29fd11d61d Mon Sep 17 00:00:00 2001 From: Nicolas Date: Thu, 31 Jul 2025 03:32:31 +0000 Subject: [PATCH 3/3] revert 23fca62e86d5d66ca45ec837ee68806456cc6f99 revert 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 deletions(-) diff --git a/freeleaps/helm-pkg/notification/templates/notification/notification-config.yaml b/freeleaps/helm-pkg/notification/templates/notification/notification-config.yaml index 0aa7e354..e8bfe28f 100644 --- a/freeleaps/helm-pkg/notification/templates/notification/notification-config.yaml +++ b/freeleaps/helm-pkg/notification/templates/notification/notification-config.yaml @@ -9,9 +9,6 @@ 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 fe4aa8ef..d0af765e 100644 --- a/freeleaps/helm-pkg/notification/values.alpha.yaml +++ b/freeleaps/helm-pkg/notification/values.alpha.yaml @@ -80,9 +80,6 @@ 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 1e87efb7..62e9effe 100644 --- a/freeleaps/helm-pkg/notification/values.prod.yaml +++ b/freeleaps/helm-pkg/notification/values.prod.yaml @@ -66,9 +66,6 @@ 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 52adad9d..221c3bcd 100644 --- a/freeleaps/helm-pkg/notification/values.yaml +++ b/freeleaps/helm-pkg/notification/values.yaml @@ -55,12 +55,6 @@ 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