-
Notifications
You must be signed in to change notification settings - Fork 30
[CLOUDP-361632] Add information about latest OM and agent in release.json #622
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
MCK 1.6.1 Release NotesBug Fixes
|
1. Move mapping field in json to root level 2. Change log lever for logs
MaciejKaras
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.
LGTM!
mircea-cosbuc
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.
I like this approach, LGTM!
| "search": { | ||
| "version": "0.55.0" | ||
| }, | ||
| "latestOpsManagerAgentMapping": [ |
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.
do you think we can replace the existing code here to use what you've implemented here?
mongodb-kubernetes/pkg/agentVersionManagement/get_agent_version.go
Lines 57 to 77 in f0050b8
| func newAgentVersionManager(omVersionToAgentVersion map[omv1.OpsManagerVersion]omv1.AgentVersion, cmVersion string) *AgentVersionManager { | |
| omVersionsByMajor := make(map[string]string) | |
| if cmVersion == "" { | |
| zap.S().Warnf("No version provided for Cloud Manager agent") | |
| } | |
| for omVersion := range omVersionToAgentVersion { | |
| majorOmVersion := getMajorVersion(string(omVersion)) | |
| if currentVersion, exists := omVersionsByMajor[majorOmVersion]; !exists || isLaterVersion(string(omVersion), currentVersion) { | |
| omVersionsByMajor[majorOmVersion] = string(omVersion) | |
| } | |
| } | |
| return &AgentVersionManager{ | |
| omToAgentVersionMapping: omVersionToAgentVersion, | |
| latestOMVersionsByMajor: omVersionsByMajor, | |
| agentVersionCM: cmVersion, | |
| } | |
| } |
Summary
We have been getting some request from the customers where they wanted to know the combination of the container images that they require to run a specific version of operator and Mongo DB instance. As part of that work we are going to add a new file (release_info.json) as the assets in the GitHub release.
That file is going to have details about the latest released images. These images are going to be the images that MCK publishes as well as the latest OM and Agent version mappings. To enable that, as part of this PR we are adding a new field in the
release.jsonthat has the mapping between OM version and agent version of latest OM releases. This new field in therelease.jsonis going to have the opsManaget to agent image version mapping for every major opsmanager version.We are adding this information in the
release.jsonso that it can easily be used later (in next PR), to create the release_info.json file.This PR also updated the precommit hook so that when new version of OM is released, the newly added field of release.json would properly be updated with newly release OM/agent.
Proof of Work
Manual:
supportedImages.ops-manager.versionsand respective entry inmongodb-agent.opsManagerMapping. Runmake precommitand verify that thesupportedImages.latestOpsManagerAgentMappinghas been updated for major version 8 with updated versions.supportedImages.ops-manager.versionsand respective entry inmongodb-agent.opsManagerMapping. Runmake precommitand verify that a new entry for major version 9 has been added tosupportedImages.latestOpsManagerAgentMapping.Checklist
skip-changeloglabel if not needed