Skip to content

Conversation

lucian-tosa
Copy link
Contributor

@lucian-tosa lucian-tosa commented Aug 21, 2025

Summary

This pull request introduces a new manual pipeline for migrating and publishing all agent images to a new registry. The main changes add support for running this migration as a manual task in Evergreen, including the necessary pipeline configuration, scripts, and build variant.

Evergreen pipeline and build variant additions:

  • Added a new pipeline_migrate_agents function to .evergreen-functions.yml, which runs the pipeline_migrate_agent.sh script for agent migration.
  • Added a new migrate_all_agents task to .evergreen.yml, enabling manual execution to build and migrate all agent images.
  • Created a new publish_agent_images_manual build variant in .evergreen.yml, allowing patch requesters to trigger the migration task.

Script additions for manual migration:

  • Added scripts/release/pipeline_migrate_agent.sh to execute the migration logic using the main pipeline Python script, targeting the new registry.

To trigger this task, the following command will be run

evergreen patch -p mongodb-kubernetes -v migrate_all_agents -t migrate_all_agents -y -f -u --browse -d "" --param evergreen_retry=false

Proof of Work

This patch migrates all the agents to my private ECR
There are 17 agents in release.json. For each of them there will 4 be images (4 architectures), 1 aggregated manifest, and one signature, therefore 102 entries.

This patch ran the static tests using my private ECR registry.

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 added changelog file?

Copy link

github-actions bot commented Aug 21, 2025

⚠️ (this preview might not be accurate if the PR is not rebased on current master branch)

MCK 1.3.0 Release Notes

New Features

Multi-Architecture Support

We've added comprehensive multi-architecture support for the kubernetes operator. This enhancement enables deployment on IBM Power (ppc64le) and IBM Z (s390x) architectures alongside
existing x86_64 support. Core images (operator, agent, init containers, database, readiness probe) now support multiple architectures. We do not add support IBM and ARM support for Ops-Manager and the init-ops-manager image.

Bug Fixes

  • This change fixes the current complex and difficult-to-maintain architecture for stateful set containers, which relies on an "agent matrix" to map operator and agent versions which led to a sheer amount of images.
  • We solve this by shifting to a 3-container setup. This new design eliminates the need for the operator-version/agent-version matrix by adding one additional container containing all required binaries. This architecture maps to what we already do with the mongodb-database container.
  • Fixed an issue where the readiness probe reported the node as ready even when its authentication mechanism was not in sync with the other nodes, potentially causing premature restarts.

Other Changes

  • Optional permissions for PersistentVolumeClaim moved to a separate role. When managing the operator with Helm it is possible to disable permissions for PersistentVolumeClaim resources by setting operator.enablePVCResize value to false (true by default). When enabled, previously these permissions were part of the primary operator role. With this change, permissions have a separate role.
  • subresourceEnabled Helm value was removed. This setting used to be true by default and made it possible to exclude subresource permissions from the operator role by specifying false as the value. We are removing this configuration option, making the operator roles always have subresource permissions. This setting was introduced as a temporary solution for this OpenShift issue. The issue has since been resolved and the setting is no longer needed.
  • We have deliberately not published the container images for OpsManager versions 7.0.16, 8.0.8, 8.0.9 and 8.0.10 due to a bug in the OpsManager which prevents MCK customers to upgrade their OpsManager deployments to those versions.

@lucian-tosa lucian-tosa changed the title Migrate all agents script CLOUDP-337357 - Migrate all agents script Aug 25, 2025
@lucian-tosa lucian-tosa added the skip-changelog Use this label in Pull Request to not require new changelog entry file label Aug 25, 2025
@lucian-tosa lucian-tosa marked this pull request as ready for review August 25, 2025 16:09
@lucian-tosa lucian-tosa requested a review from a team as a code owner August 25, 2025 16:09
Copy link
Collaborator

@Julien-Ben Julien-Ben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ! Good to see the agents available on all these platforms 🎉

.evergreen.yml Outdated
@@ -2097,3 +2106,11 @@ buildvariants:
tasks:
- name: publish_ops_manager
- name: release_agent

- name: publish_agent_images_manual
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the variant name doesn't match the task its running

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed it now

@lucian-tosa lucian-tosa enabled auto-merge (squash) August 26, 2025 14:55
@lucian-tosa lucian-tosa disabled auto-merge August 26, 2025 14:57
@lucian-tosa lucian-tosa enabled auto-merge (squash) August 26, 2025 15:15
@lucian-tosa lucian-tosa merged commit 3279a03 into master Aug 26, 2025
9 of 10 checks passed
@lucian-tosa lucian-tosa deleted the migrate-agents branch August 26, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Use this label in Pull Request to not require new changelog entry file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants