-
Notifications
You must be signed in to change notification settings - Fork 23
CLOUDP: 327089, CLOUDP: 317939 add status field #554
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: master
Are you sure you want to change the base?
Conversation
MCK 1.6.0 Release NotesNew Features
Bug Fixes
|
2536abe to
ae52bb4
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.
LGTM!
| --- | ||
| title: Surface reconciled MongoDBSearch version | ||
| kind: fix | ||
| date: 2025-10-24 | ||
| --- | ||
|
|
||
| * MongoDBSearch now records the reconciled mongot version in status and exposes it via a dedicated kubectl print column. |
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!
| } | ||
| } | ||
|
|
||
| func markStatefulSetReady(ctx context.Context, t *testing.T, c client.Client, name types.NamespacedName) { |
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.
consider using https://github.com/mongodb/mongodb-kubernetes/blob/master/controllers/operator/mock/mockedkubeclient.go#L136
it looks similar
Summary
This pull request introduces support for tracking and updating the reconciled MongoDB Search version within the operator and its CRD status. The changes ensure that the
Status.Versionfield is set only after the StatefulSet becomes ready, and add mechanisms to pass and validate the version throughout the reconciliation workflow. Additional test coverage verifies the correct behavior before and after readiness.CRD and Status Enhancements:
Versioncolumn to theMongoDBSearchCRD for visibility inkubectl getoutput.UpdateStatusmethod to accept and set theMongoDBSearchVersionOption, allowing the controller to update the reconciled version in status.MongoDBSearchVersionOptionand related helpers instatus_options.goto encapsulate version updates for status.Controller and Reconciliation Logic:
Testing Improvements:
Status.Versionremains empty before readiness and is set correctly after the StatefulSet is ready; added a helper to simulate readiness. [1] [2] [3] [4]Proof of Work
Tests pass
Checklist
skip-changeloglabel if not needed