-
Notifications
You must be signed in to change notification settings - Fork 161
K8SPSMDB-1496: Add volume for mongosh homedir #2090
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
Conversation
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.
Pull Request Overview
This PR adds a volume mount for the mongosh home directory to resolve permission issues when performing physical restores in OpenShift. The change addresses warnings that occur when mongosh attempts to create directories in /.mongodb without proper write permissions.
- Adds a new emptyDir volume named "mongosh" mounted at
/.mongodbfor operator version 1.21.0+ - Updates container configuration to include the new mongosh home directory mount
- Updates all E2E test comparison files to include the new volume mount
Reviewed Changes
Copilot reviewed 182 out of 182 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/psmdb/config/const.go | Defines constants for mongosh volume name and mount path |
| pkg/psmdb/statefulset.go | Adds mongosh volume to StatefulSet volumes for version 1.21.0+ |
| pkg/psmdb/container.go | Adds mongosh volume mount to container configuration for version 1.21.0+ |
| e2e-tests//compare/.yml | Updates test comparison files to include new mongosh volume configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| name: config | ||
| - mountPath: /opt/percona | ||
| name: bin | ||
| - mountPath: /.mongod |
Copilot
AI
Oct 15, 2025
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.
The mount path should be /.mongodb to match the constant MongoshHomeMountPath, not /.mongod.
| - mountPath: /.mongod | |
| - mountPath: /.mongodb |
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.
what an useful bot you are
| name: config | ||
| - mountPath: /opt/percona | ||
| name: bin | ||
| - mountPath: /.mongod |
Copilot
AI
Oct 15, 2025
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.
The mount path should be /.mongodb to match the constant MongoshHomeMountPath, not /.mongod.
| - mountPath: /.mongod | |
| - mountPath: /.mongodb |
394b0cb to
bd157fb
Compare
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.
Pull Request Overview
Copilot reviewed 191 out of 191 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| }) | ||
| } | ||
|
|
||
| if cr.CompareVersion("1.14.0") >= 0 { |
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.
why dont we remove this compare statement for 1.14? I think we dont support it anymore.
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.
it's a last minute fix for the release, let's not make changes other than what's absolutely necessary
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.
Pull Request Overview
Copilot reviewed 220 out of 220 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
* K8SPSMDB-1496: Add volume for mongosh homedir * fix unit tests * update compare files * bump k8s version * fix upgrade-consistency * fix more compare files * fix upgrade tests * fix upgrade-consistency-sharded-tls --------- Co-authored-by: Viacheslav Sarzhan <[email protected]>
CHANGE DESCRIPTION
When a physical restore is performed in Openshift, we get the following
Warning due to lack of permissions to write in /.mongod folder. This causes Operator to malfunction and don’t get the true result fromdb.hello().isWritablePrimaryCHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
compare/*-oc.yml)?Config/Logging/Testability