Skip to content

wip - refactor - agent matrix work #267

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

Draft
wants to merge 27 commits into
base: master
Choose a base branch
from
Draft

wip - refactor - agent matrix work #267

wants to merge 27 commits into from

Conversation

nammn
Copy link
Collaborator

@nammn nammn commented Jul 15, 2025

Summary

This pull request introduces significant changes to the MongoDB operator codebase, focusing on improving the handling of static and non-static architectures, simplifying configuration, and updating tests to reflect the new architecture. The most important changes are grouped into architecture handling, configuration updates, and test adjustments.

Architecture Handling:

  • Introduced separate functions for building pod templates for static and non-static architectures, improving modularity and clarity (buildStaticArchitecturePodTemplateSpec and buildNonStaticArchitecturePodTemplateSpec in database_construction.go).
  • Updated the shared database configuration to remove architecture-specific logic, delegating it to the newly introduced architecture-specific functions.

Configuration Updates:

  • Renamed InitDatabaseNonStaticImage to InitDatabaseImage in DatabaseStatefulSetOptions for clarity and consistency. [1] [2]
  • Simplified the handling of ShareProcessNamespace by using a pointer utility function (ptr.To(true)) instead of manually creating a boolean pointer.

Test Adjustments:

  • Updated tests for various cluster types (e.g., replica set, sharded, standalone) to account for the addition of a third container in the static architecture. [1] [2] [3] [4]

Code Cleanup:

  • Removed unused versionutil import and associated logic for appending the operator version to the agent version. [1] [2]

Miscellaneous:

  • Added TODO comments for probes to address static architecture compatibility in the future.

Proof of Work

Checklist

  • Have you linked a jira ticket and/or is the ticket in the title?
  • Have you checked whether your jira ticket required DOCSP changes?
  • Have you checked for release_note changes?

Reminder (Please remove this when merging)

  • Please try to Approve or Reject Changes the PR, keep PRs in review as short as possible
  • Our Short Guide for PRs: Link
  • Remember the following Communication Standards - use comment prefixes for clarity:
    • blocking: Must be addressed before approval.
    • follow-up: Can be addressed in a later PR or ticket.
    • q: Clarifying question.
    • nit: Non-blocking suggestions.
    • note: Side-note, non-actionable. Example: Praise
    • --> no prefix is considered a question

@nammn nammn force-pushed the remove-agent-matrix branch from d76eda3 to 08c2c49 Compare July 16, 2025 09:25
@nammn nammn added the wip label Jul 16, 2025
@nammn nammn changed the title refactor - agent matrix work wip - refactor - agent matrix work Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant