Skip to content

Commit 81c6f56

Browse files
committed
Merge remote-tracking branch 'origin/master' into search/public-preview
2 parents bf7a25e + 8b5472b commit 81c6f56

File tree

55 files changed

+256
-164
lines changed

Some content is hidden

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

55 files changed

+256
-164
lines changed

.evergreen-functions.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,17 @@ functions:
541541
- ${workdir}/bin
542542
binary: scripts/evergreen/e2e/build_tests_image_ibm.sh
543543

544+
pipeline_migrate_agents:
545+
- *switch_context
546+
- command: subprocess.exec
547+
retry_on_failure: false
548+
type: setup
549+
params:
550+
shell: bash
551+
<<: *e2e_include_expansions_in_env
552+
working_dir: src/github.com/mongodb/mongodb-kubernetes
553+
binary: scripts/release/pipeline_migrate_agent.sh
554+
544555
pipeline:
545556
- *switch_context
546557
- command: subprocess.exec

.evergreen.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,15 @@ tasks:
356356
image_name: agent
357357
build_scenario: --build-scenario manual_release
358358

359+
- name: migrate_all_agents
360+
# this enables us to run this variant manually to build all the agents for the new registry
361+
allowed_requesters: [ "patch" ]
362+
commands:
363+
- func: clone
364+
- func: setup_building_host
365+
- func: quay_login
366+
- func: pipeline_migrate_agents
367+
359368
- name: run_precommit_and_push
360369
tags: ["patch-run"]
361370
commands:
@@ -1378,7 +1387,7 @@ buildvariants:
13781387
display_name: e2e_om60_kind_ubi
13791388
tags: [ "e2e_test_suite" ]
13801389
run_on:
1381-
- ubuntu2204-large
1390+
- ubuntu2204-medium-high-memory
13821391
<<: *base_om6_dependency
13831392
tasks:
13841393
- name: e2e_ops_manager_kind_only_task_group
@@ -1390,7 +1399,7 @@ buildvariants:
13901399
display_name: e2e_static_om60_kind_ubi
13911400
tags: [ "e2e_test_suite" ]
13921401
run_on:
1393-
- ubuntu2204-large
1402+
- ubuntu2204-medium
13941403
<<: *base_om6_dependency
13951404
tasks:
13961405
- name: e2e_static_ops_manager_kind_only_task_group
@@ -1400,7 +1409,7 @@ buildvariants:
14001409
display_name: e2e_om70_kind_ubi
14011410
tags: [ "e2e_test_suite" ]
14021411
run_on:
1403-
- ubuntu2204-large
1412+
- ubuntu2204-medium-high-memory
14041413
<<: *base_om7_dependency
14051414
tasks:
14061415
- name: e2e_ops_manager_kind_only_task_group
@@ -1423,7 +1432,7 @@ buildvariants:
14231432
display_name: e2e_om80_kind_ubi
14241433
tags: [ "e2e_test_suite" ]
14251434
run_on:
1426-
- ubuntu2204-large
1435+
- ubuntu2204-medium-high-memory
14271436
<<: *base_om8_dependency
14281437
tasks:
14291438
- name: e2e_ops_manager_kind_only_task_group
@@ -2100,3 +2109,11 @@ buildvariants:
21002109
tasks:
21012110
- name: publish_ops_manager
21022111
- name: release_agent
2112+
2113+
- name: migrate_all_agents
2114+
display_name: migrate_all_agents
2115+
allowed_requesters: [ "patch" ]
2116+
run_on:
2117+
- ubuntu2204-large
2118+
tasks:
2119+
- name: migrate_all_agents

.githooks/pre-commit

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ wait_for_all_background_jobs() {
202202
for failure in "${failures[@]}"; do
203203
echo -e "$failure"
204204
done
205-
echo -e "${RED}To see the details look for the job's logs by it's prefixed name (e.g. \"shellcheck:\").${NO_COLOR}"
205+
echo -e "${RED}To see the details look/filter for the job's logs by it's prefixed name (e.g. \"start_shellcheck:\", \"lint_code:\", \"shellcheck failed\").${NO_COLOR}"
206206
return 1
207207
fi
208208

@@ -229,10 +229,17 @@ pre_commit() {
229229
# Function to run shellcheck on a single file
230230
run_shellcheck() {
231231
local file="$1"
232-
echo "Running shellcheck on $file"
233-
if ! shellcheck --color=always -x "$file" -e SC2154 -e SC1091 -e SC1090 -e SC2148 -o require-variable-braces -P "scripts"; then
232+
233+
local diff_output
234+
diff_output=$(shellcheck -f diff "$file" -e SC2154 -e SC1091 -e SC1090 -e SC2148 -o require-variable-braces -P "scripts" 2>&1)
235+
236+
if [[ -n "$diff_output" && "$diff_output" != *"Issues were detected, but none were auto-fixable"* ]]; then
237+
echo "$diff_output" | git apply
238+
echo "Applied auto-fixes for $file"
239+
elif [[ "$diff_output" == *"Issues were detected, but none were auto-fixable"* ]]; then
234240
echo -e "${RED}shellcheck failed on $file${NO_COLOR}"
235-
exit 1
241+
shellcheck --color=always -x "$file" -e SC2154 -e SC1091 -e SC1090 -e SC2148 -o require-variable-braces -P "scripts"
242+
return 1
236243
fi
237244
}
238245

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 & 22 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
@@ -130,40 +130,36 @@ spec:
130130
value: "quay.io/mongodb/mongodb-kubernetes-init-ops-manager:1.2.0"
131131
- name: RELATED_IMAGE_INIT_APPDB_IMAGE_REPOSITORY_1_2_0
132132
value: "quay.io/mongodb/mongodb-kubernetes-init-appdb:1.2.0"
133-
- name: RELATED_IMAGE_AGENT_IMAGE_107_0_11_8645_1
134-
value: "quay.io/mongodb/mongodb-agent-ubi:107.0.11.8645-1"
135133
- name: RELATED_IMAGE_AGENT_IMAGE_107_0_12_8669_1
136-
value: "quay.io/mongodb/mongodb-agent-ubi:107.0.12.8669-1"
134+
value: "quay.io/mongodb/mongodb-agent:107.0.12.8669-1"
137135
- name: RELATED_IMAGE_AGENT_IMAGE_107_0_13_8702_1
138-
value: "quay.io/mongodb/mongodb-agent-ubi:107.0.13.8702-1"
136+
value: "quay.io/mongodb/mongodb-agent:107.0.13.8702-1"
139137
- name: RELATED_IMAGE_AGENT_IMAGE_107_0_15_8741_1
140-
value: "quay.io/mongodb/mongodb-agent-ubi:107.0.15.8741-1"
138+
value: "quay.io/mongodb/mongodb-agent:107.0.15.8741-1"
141139
- name: RELATED_IMAGE_AGENT_IMAGE_107_0_17_8771_1
142-
value: "quay.io/mongodb/mongodb-agent-ubi:107.0.17.8771-1"
140+
value: "quay.io/mongodb/mongodb-agent:107.0.17.8771-1"
143141
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_0_8694_1
144-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.0.8694-1"
142+
value: "quay.io/mongodb/mongodb-agent:108.0.0.8694-1"
145143
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_1_8718_1
146-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.1.8718-1"
144+
value: "quay.io/mongodb/mongodb-agent:108.0.1.8718-1"
147145
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_11_8830_1
148-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.11.8830-1"
146+
value: "quay.io/mongodb/mongodb-agent:108.0.11.8830-1"
149147
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_12_8846_1
150-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.12.8846-1"
148+
value: "quay.io/mongodb/mongodb-agent:108.0.12.8846-1"
151149
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_2_8729_1
152-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.2.8729-1"
150+
value: "quay.io/mongodb/mongodb-agent:108.0.2.8729-1"
153151
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_3_8758_1
154-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.3.8758-1"
152+
value: "quay.io/mongodb/mongodb-agent:108.0.3.8758-1"
155153
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_4_8770_1
156-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.4.8770-1"
154+
value: "quay.io/mongodb/mongodb-agent:108.0.4.8770-1"
157155
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_6_8796_1
158-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.6.8796-1"
156+
value: "quay.io/mongodb/mongodb-agent:108.0.6.8796-1"
159157
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_7_8810_1
160-
value: "quay.io/mongodb/mongodb-agent-ubi:108.0.7.8810-1"
161-
- name: RELATED_IMAGE_AGENT_IMAGE_12_0_34_7888_1
162-
value: "quay.io/mongodb/mongodb-agent-ubi:12.0.34.7888-1"
158+
value: "quay.io/mongodb/mongodb-agent:108.0.7.8810-1"
163159
- name: RELATED_IMAGE_AGENT_IMAGE_12_0_35_7911_1
164-
value: "quay.io/mongodb/mongodb-agent-ubi:12.0.35.7911-1"
160+
value: "quay.io/mongodb/mongodb-agent:12.0.35.7911-1"
165161
- name: RELATED_IMAGE_AGENT_IMAGE_13_38_0_9654_1
166-
value: "quay.io/mongodb/mongodb-agent-ubi:13.38.0.9654-1"
162+
value: "quay.io/mongodb/mongodb-agent:13.38.0.9654-1"
167163
- name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_6_0_26
168164
value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:6.0.26"
169165
- 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()

0 commit comments

Comments
 (0)