-
Notifications
You must be signed in to change notification settings - Fork 13
CLOUDP-331841 - remove the 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
Conversation
d76eda3
to
08c2c49
Compare
changelog/20250806_breaking_changing_container_setup_of_static_architecture.md
Outdated
Show resolved
Hide resolved
changelog/20250806_breaking_changing_container_setup_of_static_architecture.md
Outdated
Show resolved
Hide resolved
} else { | ||
staticMounts := []corev1.VolumeMount{hooksVolumeMount, scriptsVolumeMount, tmpVolumeMount} | ||
withStaticContainerModification = podtemplatespec.WithContainer(util.AgentContainerUtilitiesName, mongodbAgentUtilitiesContainer(staticMounts, initAppDBImage)) | ||
mongodbAgentVolumeMounts = append(mongodbAgentVolumeMounts, staticMounts...) | ||
shareProcessNs = func(sts *appsv1.StatefulSet) { | ||
sts.Spec.Template.Spec.ShareProcessNamespace = ptr.To(true) | ||
} |
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.
Could you add a comment to make it clear what each branch is for? Is the else branch for static appdb?
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.
yes you are correct -added 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.
this is not enough?
// we need the upgrade hook and readinessProbe either via init containers or via a side-car and /proc access
// if we don't use init containers we need to use static containers
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.
Does this mean that for non-static appdb we are now adding 2 init containers?
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.
we've always had 2 init containers for non static
…ros propagation (#328) # Summary Fixes issue with conflicting `Dockerfile` files on master. Sonar is creating Dockerfiles in the directory where new Dockerfile existed already. They were added here -> #289. Additionally another PR #267 made changes to how the agent images were built and especially to agent Dockerfile ARGs: https://github.com/mongodb/mongodb-kubernetes/blob/89866b79233745e27ade51dc2d9fd0e73c6124e5/docker/mongodb-agent/Dockerfile#L3-L6 This conflicted with #303 where new `atomic_pipeline.py` was still depending on the old Dockerfile structure: https://github.com/mongodb/mongodb-kubernetes/blob/774bbaca930a1752060cfe5e5bf60f24cd6c999c/docker/mongodb-agent/Dockerfile#L25-L26 ## Proof of Work Passing CI (especially agent build task) ## 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? - [x] Have you added changelog file? - use `skip-changelog` label if not needed - refer to [Changelog files and Release Notes](https://github.com/mongodb/mongodb-kubernetes/blob/master/CONTRIBUTING.md#changelog-files-and-release-notes) section in CONTRIBUTING.md for more details
Summary
Database:
from:
to:
AppDB:
from:
to:
Summary Changes
This pull request introduces significant changes to the MongoDB Kubernetes operator, focusing on refactoring, architecture updates, and bug fixes. The changes include removing unused dependencies, improving the handling of static and non-static architectures, and enhancing test coverage. Below is a categorized summary of the most important changes:
Refactoring and Code Simplification
buildDatabaseStatefulSetConfigurationFunction
by introducing shared and architecture-specific modifications. [1] [2]InitDatabaseNonStaticImage
toInitDatabaseImage
inDatabaseStatefulSetOptions
for clarity.Static and Non-Static Architecture Handling
buildStaticArchitecturePodTemplateSpec
andbuildNonStaticArchitecturePodTemplateSpec
) to handle static and non-static architectures, improving modularity and maintainability.AppDbStatefulSet
function to includeopts.InitAppDBImage
when defining init containers, ensuring proper handling of both architectures.Enhancements to StatefulSet and Pod Templates
automationUtilitiesPodTemplateFunc
) to theappDbPodSpec
for managing utility scripts and hooks, along with corresponding volume mounts. [1] [2]AutomationAgentCommand
to include additional startup parameters for better configuration.Proof of Work
Checklist