-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Separate PV/PVC for Mongo and Redis + fixed mount paths #5
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: main
Are you sure you want to change the base?
Conversation
WalkthroughRemove Mongo PV's Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
kubernetes/persistentVolume.yaml(2 hunks)kubernetes/persistentVolumeClaim.yaml(2 hunks)kubernetes/redis.yaml(1 hunks)
🔇 Additional comments (4)
kubernetes/persistentVolume.yaml (2)
1-13: Verify MongoDB hostPath aligns with PR objectives.The MongoDB hostPath is configured as
/data/mongo, but the PR objectives specify "MongoDB uses/data/db". Verify whether this deviation is intentional or if the path should match the stated objective.
15-28: Redis PersistentVolume is properly configured.The Redis PV is correctly separated from MongoDB with appropriate capacity (2Gi) and the hostPath
/data/redismatches the PR objectives. Good separation of storage concerns.kubernetes/persistentVolumeClaim.yaml (2)
1-12: Verify removal of storageClassName from MongoDB PVC is intentional.The
storageClassName: ""was removed from the MongoDB PVC. This explicit configuration prevented dynamic provisioning. Without it, the PVC may attempt to use a default storage class. Verify this change aligns with your cluster's storage configuration and that a suitable storage class exists or that static binding to mongo-pv is guaranteed.
14-26: Redis PersistentVolumeClaim properly configured.The Redis PVC is correctly created as a separate resource with matching capacity (2Gi) and proper namespace/access mode configuration. The new claim name
redis-pvcenables proper separation from MongoDB storage.
This PR improves the Kubernetes deployment setup by:
Creating separate PersistentVolumes (PV) and PersistentVolumeClaims (PVC) for MongoDB and Redis to avoid conflicts and ensure data isolation.
Fixing the volume mount paths for both MongoDB (/data/db) and Redis (/data/redis), ensuring the pods use the correct directories.
Keeping the deployment ready for production-friendly EKS cluster deployment.
These changes make the storage configuration more robust and prevent data corruption when running MongoDB and Redis on the same cluster.
Summary by CodeRabbit