[ONPREM-2564] - Provide script to upgrade to Mongo 7.0#67
Merged
Conversation
Provide README with instructions to upgrade to Mongo 7.0
imlogang
commented
Oct 31, 2025
| local image_tag="$1" | ||
| local major_version="$2" | ||
|
|
||
| if [ "$major_version" -ge 5 ]; then |
Contributor
Author
There was a problem hiding this comment.
Replacing the liveness/readiness Probes is needed as a patch during the upgrade due to anything above Mongo 5.0 replacesmongo with mongosh.
imlogang
commented
Oct 31, 2025
|
|
||
| if [ "$major_version" -ge 7 ]; then | ||
| echo "Note: MongoDB 7.0+ upgrade is one-way and cannot be downgraded without support assistance" | ||
| result=$(kubectl -n "$NAMESPACE" exec "$MONGO_POD" -- $shell_cmd -u "$MONGODB_USERNAME" -p "$MONGODB_PASSWORD" --eval "db.adminCommand({ setFeatureCompatibilityVersion: '$1', confirm: true })") |
Contributor
Author
There was a problem hiding this comment.
the confirm: true command here is due to Mongo 7.0 not being able to be downgraded after the fact, and this is to confirm you understand that.
imlogang
commented
Oct 31, 2025
| echo " image:" | ||
| echo " tag: 7.0.15-debian-12-r2" | ||
| echo " pullSecrets: []" | ||
| echo " livenessProbe:" |
Contributor
Author
There was a problem hiding this comment.
Similar to the comment above, mongo is replaced with mongosh, which means the current hardcoded probes will not work.
Luckily, the chart does allow for custom probes, which is what this prints to add to your values.yaml.
soulchips
approved these changes
Nov 18, 2025
atulsingh0
approved these changes
Nov 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
⚙️ Issue
https://circleci.atlassian.net/browse/ONPREM-2564
✅ Fix
This script provides the ability to upgrade from Mongo 4.4 to 7.0 and provides an output to put in your server's
vaules.yamlto redeploy.❓ Tests
This was tested on both a 4.7.12 instance and a 4.9.0 instance.