-
Notifications
You must be signed in to change notification settings - Fork 23
fix: notification failing in kubernetes #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: stage
Are you sure you want to change the base?
Conversation
Hi @cidopenup0 Thanks for creating a PR for your Issue!
|
| DB_NAME: empdir | ||
| JWT_EXPIRATION_MS: "86400000" | ||
| NOTIFICATION_SERVICE_URL: http://api.microforge.manojm.site | ||
| NOTIFICATION_SERVICE_URL: http://notification-service:8083 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need url to be http://api.microforge.manojm.site
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright iam working it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Manoj-14 i have tried to add ip of ingress-nginx-controller cluster IP but this is considered as bad practice so i consider the old http://notification-service:8083 way as better option and using service names is standard practice for service to service communication
spec:
+ hostAliases:
+ - ip: "10.102.83.6" # ingress-nginx-controller ClusterIP
+ hostnames:
+ - "api.microforge.manojm.site"There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worked on it but it not worked for some cases when it is mapped to dns resolver so please update the url
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ip is dynamic, so have to update it manually when the k8s namespace gets created
that is why i have been suggesting http://notification-service:8083 thingy
Manoj-14
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check the comment please |
📌 Description
This PR fixes the notification service failure in the Kubernetes deployment by correcting configuration mismatches and missing secrets.
What does this PR do?
Why is this change needed?
The notification service was unable to connect to its database and receive events due to incorrect database configuration, missing authentication credentials, and improper inter-service communication. These issues prevented notifications from being stored and delivered in the Kubernetes environment.
🔗 Related Issue
Fixes #52
🛠️ Type of Change
Please mark the relevant option:
🧪 How Was This Tested?
Verification steps:
Confirmed all pods are running in the microforge-dev-ns namespace
Checked notification service logs for database connection errors
Verified internal service discovery using Kubernetes DNS
Tested
/api/notificationsendpoint using an in-cluster curl podConfirmed notifications are triggered on user login/registration events
Docker Compose runs successfully
Frontend loads correctly
Service builds without errors
Documentation renders correctly
Manual testing
📸 Screenshots
✅ Checklist
Please confirm the following:
📝 Additional Notes
Nothing