Skip to content

Commit 8b5472b

Browse files
nammnlucian-tosaJulien-BenMaciejKarasmms-build-account
authored
CLOUDP-339609 - migrate repo from mongodb/mongodb-agent-ubi to mongodb/mongodb-agent (#357)
# Summary This pull request updates all references to the MongoDB agent image to remove the `-ubi` suffix, standardizing on `mongodb-agent` instead of `mongodb-agent-ubi` throughout the codebase, configuration files, tests, and documentation. This change ensures consistency across the project and aligns image names with the new naming convention. **Image Reference Standardization** * Updated all references in Kubernetes manifests, Helm charts, and configuration files to use `quay.io/mongodb/mongodb-agent` instead of `quay.io/mongodb/mongodb-agent-ubi` for agent images and repositories. [[1]](diffhunk://#diff-ce0d597a9e5f20a8fe61c3ba5e6185a6b90cfef2c00bb5b5ef3e97b15b79f480L90-R92) [[2]](diffhunk://#diff-ce0d597a9e5f20a8fe61c3ba5e6185a6b90cfef2c00bb5b5ef3e97b15b79f480L113-R113) [[3]](diffhunk://#diff-ce0d597a9e5f20a8fe61c3ba5e6185a6b90cfef2c00bb5b5ef3e97b15b79f480L134-R166) [[4]](diffhunk://#diff-bea58e6c4af1864777b1666c77dbdca5408ed045490647b75c72f5865b8fe5eaL513-R515) [[5]](diffhunk://#diff-bea58e6c4af1864777b1666c77dbdca5408ed045490647b75c72f5865b8fe5eaL534-R534) [[6]](diffhunk://#diff-239878330b8ecfb1d07fef9586382ed93193c3a08ac70a05e153ebf86c1450ebL48-R48) [[7]](diffhunk://#diff-27a85ff682a5b1cbd1c7114fc422eb2ad93fefeda6c83d20ba985008d1128650L50-R50) [[8]](diffhunk://#diff-ff27d78754635dd120f1b00c8c8747d1af3329500135dfe2ccf0dc68fd1db7edL146-R146) [[9]](diffhunk://#diff-ff27d78754635dd120f1b00c8c8747d1af3329500135dfe2ccf0dc68fd1db7edL199-R199) [[10]](diffhunk://#diff-d77d6b22626c434c154dc42bed17cc4fa49b6f5adaaa18bf6cee12100cb6b86bL2-R2) * Updated `build_info.json` to use the new image repository names for both patch and release builds. [[1]](diffhunk://#diff-ac3b10589f332066db566cb08c01afea746d5f16e704beef946107a0c5de5225L253-R253) [[2]](diffhunk://#diff-ac3b10589f332066db566cb08c01afea746d5f16e704beef946107a0c5de5225L270-R270) **Code and Test Updates** * Changed all code comments, environment variables, and default values to reference the new agent image name. * Updated all test cases and test configurations to use the new image name, ensuring test coverage matches the new convention. [[1]](diffhunk://#diff-dc7b8e9312069dfda96a4550e699f2e6a4773db2264e0207828b9ba6f8b4a187L445-R453) [[2]](diffhunk://#diff-dc7b8e9312069dfda96a4550e699f2e6a4773db2264e0207828b9ba6f8b4a187L469-R477) [[3]](diffhunk://#diff-dc7b8e9312069dfda96a4550e699f2e6a4773db2264e0207828b9ba6f8b4a187L495-R503) [[4]](diffhunk://#diff-67860757b43aff75ae2a656e47ac7d6c8556393edcdf9b050ba5c6423e4cbeb3L141-R141) [[5]](diffhunk://#diff-b08ee4b5c878509c5285d61013dfae3c561f09a0fee609dd8d524fa4f4f3b4b8L554-R554) [[6]](diffhunk://#diff-8b14eb5f38f98ab7672baa0a05be8e51744444677753390c2806be25c38f23d3L132-R132) [[7]](diffhunk://#diff-8b14eb5f38f98ab7672baa0a05be8e51744444677753390c2806be25c38f23d3L160-R160) [[8]](diffhunk://#diff-da71fae5b66898a115c77ac62de9055ed38b1a21e5b960f07783df9a8111a29eL297-R297) [[9]](diffhunk://#diff-b617c391a0cf12957a3e85468362a7f6222738b16391c7d6b6891f957fca65abL112-R112) [[10]](diffhunk://#diff-f8c985ec51c81f08f0ad0418caebb08ac51a4be33c2031cad5bf48ce4eef538cL166-R166) **Documentation and Output Updates** * Updated documentation and generated output files to reflect the new agent image name, ensuring user-facing materials are consistent. * Modified scripts and supporting files to use the new image repository for reporting and automation. ## Proof of Work - manually released all the agents to ecr `mongodb-agent`: [Link](https://spruce.mongodb.com/task/mongodb_kubernetes_manual_ecr_release_agent_release_all_agents_on_ecr_patch_cda9f730105c7b461ebb9a5fcf6adfea66006d35_68a6d0ec14d69200071b7420_25_08_21_07_55_26/logs?execution=0) - passing ci - script that relocated all agents ## Checklist - [x] Have you linked a jira ticket and/or is the ticket in the title? - [x] 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 --------- Co-authored-by: Lucian Tosa <[email protected]> Co-authored-by: Julien Benhaim <[email protected]> Co-authored-by: Maciej Karaś <[email protected]> Co-authored-by: Maciej Karaś <[email protected]> Co-authored-by: mms-build-account <[email protected]> Co-authored-by: Evergreen <[email protected]> Co-authored-by: Vivek Singh <[email protected]> Co-authored-by: Lucian Tosa <[email protected]>
1 parent 3f4cd2b commit 8b5472b

File tree

41 files changed

+179
-132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+179
-132
lines changed

build_info.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,14 +243,14 @@
243243
"agent": {
244244
"dockerfile-path": "docker/mongodb-agent/Dockerfile.atomic",
245245
"patch": {
246-
"repositories": ["268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-agent-ubi"],
246+
"repositories": ["268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-agent"],
247247
"platforms": [
248248
"linux/amd64"
249249
]
250250
},
251251
"staging": {
252252
"sign": true,
253-
"repositories": ["268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-agent-ubi"],
253+
"repositories": ["268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-agent"],
254254
"platforms": [
255255
"linux/arm64",
256256
"linux/amd64",
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: migrate agent repo
3+
kind: feature
4+
date: 2025-08-26
5+
---
6+
7+
* MongoDB Agent images have been migrated to new container repository: `quay.io/mongodb/mongodb-agent`.
8+
* the agents in the new repository will support the x86-64, ARM64, s390x, and ppc64le architectures. More can be read in the [public docs](https://www.mongodb.com/docs/kubernetes/upcoming/tutorial/plan-k8s-op-container-images/).
9+
* operator running >=MCK1.3.0 and static cannot use the agent images from the old container repository `quay.io/mongodb/mongodb-agent-ubi`.
10+
* `quay.io/mongodb/mongodb-agent-ubi` should not be used anymore, it's only there for backwards compatibility.

config/manager/manager.yaml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ spec:
8787
- name: OPS_MANAGER_IMAGE_PULL_POLICY
8888
value: Always
8989
- name: AGENT_IMAGE
90-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.2.8729-1"
90+
value: "quay.io/mongodb/mongodb-agent:108.0.2.8729-1"
9191
- name: MDB_AGENT_IMAGE_REPOSITORY
92-
value: "quay.io/mongodb/mongodb-agent-ubi"
92+
value: "quay.io/mongodb/mongodb-agent"
9393
- name: MONGODB_IMAGE
9494
value: mongodb-enterprise-server
9595
- name: MONGODB_REPO_URL
@@ -110,7 +110,7 @@ spec:
110110
value: mongodb-kubernetes-operator
111111
# Community Env Vars Start
112112
- name: MDB_COMMUNITY_AGENT_IMAGE
113-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.2.8729-1"
113+
value: "quay.io/mongodb/mongodb-agent:108.0.2.8729-1"
114114
- name: VERSION_UPGRADE_HOOK_IMAGE
115115
value: "quay.io/mongodb/mongodb-kubernetes-operator-version-upgrade-post-start-hook:1.0.9"
116116
- name: READINESS_PROBE_IMAGE
@@ -131,37 +131,35 @@ spec:
131131
- name: RELATED_IMAGE_INIT_APPDB_IMAGE_REPOSITORY_1_2_0
132132
value: "quay.io/mongodb/mongodb-kubernetes-init-appdb:1.2.0"
133133
- name: RELATED_IMAGE_AGENT_IMAGE_107_0_12_8669_1
134-
value: "quay.io/mongodb/mongodb-agent-ubi:107.0.12.8669-1"
134+
value: "quay.io/mongodb/mongodb-agent:107.0.12.8669-1"
135135
- name: RELATED_IMAGE_AGENT_IMAGE_107_0_13_8702_1
136-
value: "quay.io/mongodb/mongodb-agent-ubi:107.0.13.8702-1"
136+
value: "quay.io/mongodb/mongodb-agent:107.0.13.8702-1"
137137
- name: RELATED_IMAGE_AGENT_IMAGE_107_0_15_8741_1
138-
value: "quay.io/mongodb/mongodb-agent-ubi:107.0.15.8741-1"
138+
value: "quay.io/mongodb/mongodb-agent:107.0.15.8741-1"
139139
- name: RELATED_IMAGE_AGENT_IMAGE_107_0_17_8771_1
140-
value: "quay.io/mongodb/mongodb-agent-ubi:107.0.17.8771-1"
140+
value: "quay.io/mongodb/mongodb-agent:107.0.17.8771-1"
141141
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_0_8694_1
142-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.0.8694-1"
142+
value: "quay.io/mongodb/mongodb-agent:108.0.0.8694-1"
143143
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_1_8718_1
144-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.1.8718-1"
144+
value: "quay.io/mongodb/mongodb-agent:108.0.1.8718-1"
145145
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_11_8830_1
146-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.11.8830-1"
146+
value: "quay.io/mongodb/mongodb-agent:108.0.11.8830-1"
147147
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_12_8846_1
148-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.12.8846-1"
148+
value: "quay.io/mongodb/mongodb-agent:108.0.12.8846-1"
149149
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_2_8729_1
150-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.2.8729-1"
150+
value: "quay.io/mongodb/mongodb-agent:108.0.2.8729-1"
151151
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_3_8758_1
152-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.3.8758-1"
152+
value: "quay.io/mongodb/mongodb-agent:108.0.3.8758-1"
153153
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_4_8770_1
154-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.4.8770-1"
154+
value: "quay.io/mongodb/mongodb-agent:108.0.4.8770-1"
155155
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_6_8796_1
156-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.6.8796-1"
156+
value: "quay.io/mongodb/mongodb-agent:108.0.6.8796-1"
157157
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_7_8810_1
158-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.7.8810-1"
159-
- name: RELATED_IMAGE_AGENT_IMAGE_12_0_34_7888_1
160-
value: "quay.io/mongodb/mongodb-agent-ubi:12.0.34.7888-1"
158+
value: "quay.io/mongodb/mongodb-agent:108.0.7.8810-1"
161159
- name: RELATED_IMAGE_AGENT_IMAGE_12_0_35_7911_1
162-
value: "quay.io/mongodb/mongodb-agent-ubi:12.0.35.7911-1"
160+
value: "quay.io/mongodb/mongodb-agent:12.0.35.7911-1"
163161
- name: RELATED_IMAGE_AGENT_IMAGE_13_38_0_9654_1
164-
value: "quay.io/mongodb/mongodb-agent-ubi:13.38.0.9654-1"
162+
value: "quay.io/mongodb/mongodb-agent:13.38.0.9654-1"
165163
- name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_6_0_26
166164
value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:6.0.26"
167165
- name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_6_0_27

controllers/operator/appdbreplicaset_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ func (r *ReconcileAppDbReplicaSet) ReconcileAppDB(ctx context.Context, opsManage
594594

595595
appdbOpts.LegacyMonitoringAgentImage = images.ContainerImage(r.imageUrls, mcoConstruct.AgentImageEnv, legacyMonitoringAgentVersion)
596596

597-
// AgentImageEnv contains the full container image uri e.g. quay.io/mongodb/mongodb-agent-ubi:107.0.0.8502-1
597+
// AgentImageEnv contains the full container image uri e.g. quay.io/mongodb/mongodb-agent:107.0.0.8502-1
598598
// In non-static containers we don't ask OM for the correct version, therefore we just rely on the provided
599599
// environment variable.
600600
appdbOpts.AgentImage = r.imageUrls[mcoConstruct.AgentImageEnv]

controllers/operator/appdbreplicaset_controller_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -442,15 +442,15 @@ func TestTryConfigureMonitoringInOpsManagerWithCustomTemplate(t *testing.T) {
442442
Containers: []corev1.Container{
443443
{
444444
Name: "mongodb-agent",
445-
Image: "quay.io/mongodb/mongodb-agent-ubi:10",
445+
Image: "quay.io/mongodb/mongodb-agent:10",
446446
},
447447
{
448448
Name: "mongod",
449449
Image: "quay.io/mongodb/mongodb:10",
450450
},
451451
{
452452
Name: "mongodb-agent-monitoring",
453-
Image: "quay.io/mongodb/mongodb-agent-ubi:20",
453+
Image: "quay.io/mongodb/mongodb-agent:20",
454454
},
455455
},
456456
},
@@ -466,15 +466,15 @@ func TestTryConfigureMonitoringInOpsManagerWithCustomTemplate(t *testing.T) {
466466
foundImages := 0
467467
for _, c := range appDbSts.Spec.Template.Spec.Containers {
468468
if c.Name == "mongodb-agent" {
469-
assert.Equal(t, "quay.io/mongodb/mongodb-agent-ubi:10", c.Image)
469+
assert.Equal(t, "quay.io/mongodb/mongodb-agent:10", c.Image)
470470
foundImages += 1
471471
}
472472
if c.Name == "mongod" {
473473
assert.Equal(t, "quay.io/mongodb/mongodb:10", c.Image)
474474
foundImages += 1
475475
}
476476
if c.Name == "mongodb-agent-monitoring" {
477-
assert.Equal(t, "quay.io/mongodb/mongodb-agent-ubi:20", c.Image)
477+
assert.Equal(t, "quay.io/mongodb/mongodb-agent:20", c.Image)
478478
foundImages += 1
479479
}
480480
}
@@ -492,15 +492,15 @@ func TestTryConfigureMonitoringInOpsManagerWithCustomTemplate(t *testing.T) {
492492
foundImages := 0
493493
for _, c := range appDbSts.Spec.Template.Spec.Containers {
494494
if c.Name == "mongodb-agent" {
495-
assert.Equal(t, "quay.io/mongodb/mongodb-agent-ubi:10", c.Image)
495+
assert.Equal(t, "quay.io/mongodb/mongodb-agent:10", c.Image)
496496
foundImages += 1
497497
}
498498
if c.Name == "mongod" {
499499
assert.Equal(t, "quay.io/mongodb/mongodb:10", c.Image)
500500
foundImages += 1
501501
}
502502
if c.Name == "mongodb-agent-monitoring" {
503-
assert.Equal(t, "quay.io/mongodb/mongodb-agent-ubi:20", c.Image)
503+
assert.Equal(t, "quay.io/mongodb/mongodb-agent:20", c.Image)
504504
foundImages += 1
505505
}
506506
}

controllers/operator/mongodbmultireplicaset_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func TestMultiReplicaSetClusterReconcileContainerImagesWithStaticArchitecture(t
138138
databaseRelatedImageEnv := fmt.Sprintf("RELATED_IMAGE_%s_8_0_0_ubi9", mcoConstruct.MongodbImageEnv)
139139

140140
imageUrlsMock := images.ImageUrls{
141-
architectures.MdbAgentImageRepo: "quay.io/mongodb/mongodb-agent-ubi",
141+
architectures.MdbAgentImageRepo: "quay.io/mongodb/mongodb-agent",
142142
mcoConstruct.MongodbImageEnv: "quay.io/mongodb/mongodb-enterprise-server",
143143
databaseRelatedImageEnv: "quay.io/mongodb/mongodb-enterprise-server:@sha256:MONGODB_DATABASE",
144144
}

controllers/operator/mongodbopsmanager_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ func TestOpsManagerReconcileContainerImagesWithStaticArchitecture(t *testing.T)
551551

552552
// AppDB images
553553
mongodbRelatedImageEnv: "quay.io/mongodb/mongodb-enterprise-appdb-database-ubi@sha256:MONGODB_SHA",
554-
architectures.MdbAgentImageRepo: "quay.io/mongodb/mongodb-agent-ubi",
554+
architectures.MdbAgentImageRepo: "quay.io/mongodb/mongodb-agent",
555555
}
556556

557557
ctx := context.Background()

controllers/operator/mongodbreplicaset_controller_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func TestReplicaSetClusterReconcileContainerImagesWithStaticArchitecture(t *test
129129
databaseRelatedImageEnv := fmt.Sprintf("RELATED_IMAGE_%s_8_0_0_ubi9", mcoConstruct.MongodbImageEnv)
130130

131131
imageUrlsMock := images.ImageUrls{
132-
architectures.MdbAgentImageRepo: "quay.io/mongodb/mongodb-agent-ubi",
132+
architectures.MdbAgentImageRepo: "quay.io/mongodb/mongodb-agent",
133133
mcoConstruct.MongodbImageEnv: "quay.io/mongodb/mongodb-enterprise-server",
134134
databaseRelatedImageEnv: "quay.io/mongodb/mongodb-enterprise-server:@sha256:MONGODB_DATABASE",
135135
}
@@ -157,7 +157,7 @@ func TestReplicaSetClusterReconcileContainerImagesWithStaticArchitecture(t *test
157157
func VerifyStaticContainers(t *testing.T, containers []corev1.Container) {
158158
agentContainerImage := findContainerImage(containers, util.AgentContainerName)
159159
require.NotNil(t, agentContainerImage, "Agent container not found")
160-
assert.Equal(t, "quay.io/mongodb/mongodb-agent-ubi:12.0.30.7791-1", agentContainerImage)
160+
assert.Equal(t, "quay.io/mongodb/mongodb-agent:12.0.30.7791-1", agentContainerImage)
161161

162162
mongoContainerImage := findContainerImage(containers, util.DatabaseContainerName)
163163
require.NotNil(t, mongoContainerImage, "MongoDB container not found")

controllers/operator/mongodbshardedcluster_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ func TestShardedClusterReconcileContainerImagesWithStaticArchitecture(t *testing
294294
sc := test.DefaultClusterBuilder().SetVersion("8.0.0").SetShardCountSpec(1).Build()
295295

296296
imageUrlsMock := images.ImageUrls{
297-
architectures.MdbAgentImageRepo: "quay.io/mongodb/mongodb-agent-ubi",
297+
architectures.MdbAgentImageRepo: "quay.io/mongodb/mongodb-agent",
298298
mcoConstruct.MongodbImageEnv: "quay.io/mongodb/mongodb-enterprise-server",
299299
databaseRelatedImageEnv: "quay.io/mongodb/mongodb-enterprise-server:@sha256:MONGODB_DATABASE",
300300
}

controllers/operator/mongodbstandalone_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func TestStandaloneClusterReconcileContainerImagesWithStaticArchitecture(t *test
109109
databaseRelatedImageEnv := fmt.Sprintf("RELATED_IMAGE_%s_8_0_0_ubi9", mcoConstruct.MongodbImageEnv)
110110

111111
imageUrlsMock := images.ImageUrls{
112-
architectures.MdbAgentImageRepo: "quay.io/mongodb/mongodb-agent-ubi",
112+
architectures.MdbAgentImageRepo: "quay.io/mongodb/mongodb-agent",
113113
mcoConstruct.MongodbImageEnv: "quay.io/mongodb/mongodb-enterprise-server",
114114
databaseRelatedImageEnv: "quay.io/mongodb/mongodb-enterprise-server:@sha256:MONGODB_DATABASE",
115115
}

0 commit comments

Comments
 (0)