Skip to content

Commit 6593b18

Browse files
committed
Merge remote-tracking branch 'origin/master' into fealebenpae/search-grpc
# Conflicts: # controllers/searchcontroller/mongodbsearch_reconcile_helper.go
2 parents 3ec055e + e26dc91 commit 6593b18

File tree

51 files changed

+442
-778
lines changed

Some content is hidden

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

51 files changed

+442
-778
lines changed

.evergreen.yml

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ patch_aliases:
208208
- alias: "release_all_agents_manually"
209209
variant_tags: [ "release_all_agents_manually" ]
210210
task: ".*"
211+
- alias: "release_current_agents_manually"
212+
variant_tags: [ "release_current_agents_manually" ]
213+
task: ".*"
211214
- alias: "smoke_test_release"
212215
variant_tags: [ "e2e_smoke_release_test_suite" ]
213216
task_tags: [ "patch-run" ]
@@ -282,19 +285,19 @@ tasks:
282285
- func: setup_docker_sbom
283286
- func: pipeline_agent
284287
vars:
285-
BUILD_SCENARIO: manual_release
288+
BUILD_SCENARIO: release
286289

287290
- name: migrate_all_agents
288-
# this enables us to run this variant manually to build all the agents for the new registry
291+
# this enables us to run this variant manually to build all the agents for the new agent registry
289292
allowed_requesters: [ "patch" ]
290293
commands:
291294
- func: clone
292295
- func: setup_building_host
293296
- func: quay_login
294297
- func: pipeline_agent
295298
vars:
296-
BUILD_SCENARIO: manual_release
297-
FLAGS: "--all-agents -r quay.io/mongodb/mongodb-agent"
299+
BUILD_SCENARIO: release
300+
FLAGS: "--all-agents -r quay.io/mongodb/mongodb-agent --skip-if-exists=false"
298301

299302
- name: run_precommit_and_push
300303
tags: [ "patch-run" ]
@@ -315,27 +318,29 @@ tasks:
315318
working_dir: src/github.com/mongodb/mongodb-kubernetes
316319
binary: scripts/evergreen/precommit_bump.sh
317320

318-
- name: release_all_agents_on_ecr
319-
# this enables us to run this manually (patch) and release all agent versions to ECR to verify
321+
- name: rebuild_all_agents
322+
# this enables us to run this manually (patch) and rebuild all agent versions to verify
320323
# Dockerfile, script changes etc.
321324
allowed_requesters: [ "patch" ]
322325
commands:
323326
- func: clone
324327
- func: setup_building_host
328+
- func: quay_login
325329
- func: pipeline_agent
326330
vars:
327-
FLAGS: "--all-agents"
331+
FLAGS: "--all-agents --skip-if-exists=false"
328332

329-
- name: release_all_currently_used_agents_on_ecr
330-
# this enables us to run this manually (patch) and release all agent versions to ECR to verify
333+
- name: rebuild_currently_used_agents
334+
# this enables us to run this manually (patch) and rebuild current agent versions to verify
331335
# Dockerfile, script changes etc.
332336
allowed_requesters: [ "patch" ]
333337
commands:
334338
- func: clone
335339
- func: setup_building_host
340+
- func: quay_login
336341
- func: pipeline_agent
337342
vars:
338-
FLAGS: "--current-agents"
343+
FLAGS: "--current-agents --skip-if-exists=false"
339344

340345
- name: build_test_image
341346
commands:
@@ -405,7 +410,10 @@ tasks:
405410
commands:
406411
- func: clone
407412
- func: setup_building_host
413+
- func: quay_login
408414
- func: pipeline_agent
415+
vars:
416+
FLAGS: "--current-agents"
409417

410418
- name: build_init_database_image_ubi
411419
commands:
@@ -491,7 +499,7 @@ tasks:
491499
- func: setup_docker_sbom
492500
- func: pipeline_ops_manager
493501
vars:
494-
BUILD_SCENARIO: manual_release
502+
BUILD_SCENARIO: release
495503

496504
- name: prepare_and_upload_openshift_bundles_for_e2e
497505
commands:
@@ -1810,25 +1818,25 @@ buildvariants:
18101818
tasks:
18111819
- name: release_agent
18121820

1813-
# Only called manually, It's used for testing the task release_agents_on_ecr in case the release.json
1814-
# has not changed, and you still want to push the images to ecr.
1815-
- name: manual_ecr_release_agent
1821+
# Only called manually, It's used for testing the task release_agents in case the release.json
1822+
# has not changed, and you still want to push the images to registry.
1823+
- name: manual_release_all_agents
18161824
display_name: Manual Agent Release for all versions
18171825
tags: [ "manual_patch", "release_all_agents_manually" ]
18181826
run_on:
18191827
- ubuntu2404-large
18201828
tasks:
1821-
- name: release_all_agents_on_ecr
1829+
- name: rebuild_all_agents
18221830

1823-
# Only called manually, It's used for testing the task release_agents_on_ecr in case the release.json
1824-
# has not changed, and you still want to push the images to ecr.
1825-
- name: manual_ecr_release_agent_currently_used
1826-
display_name: manual_ecr_release_agent_currently_used
1827-
tags: [ "manual_patch", "release_all_agents_manually" ]
1831+
# Only called manually, It's used for testing the task release_agents in case the release.json
1832+
# has not changed, and you still want to push the images to registry.
1833+
- name: manual_release_agent_currently_used
1834+
display_name: manual_release_agent_currently_used
1835+
tags: [ "manual_patch", "release_current_agents_manually" ]
18281836
run_on:
18291837
- ubuntu2404-large
18301838
tasks:
1831-
- name: release_all_currently_used_agents_on_ecr
1839+
- name: rebuild_currently_used_agents
18321840

18331841
### Build variants for manual patch only
18341842

.github/workflows/preview_release_notes.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ jobs:
3737
# not be available in the pull requests running from forks.
3838
RELEASE_INITIAL_COMMIT_SHA: ${{ env.RELEASE_INITIAL_COMMIT_SHA }}
3939
RELEASE_INITIAL_VERSION: ${{ env.RELEASE_INITIAL_VERSION }}
40-
- name: Add disclaimer to release notes preview
40+
- name: Add disclaimer to release notes preview for Pull Requests
41+
if: github.event_name == 'pull_request'
4142
run: |
4243
echo -e "_:warning: (this preview might not be accurate if the PR is not rebased on current master branch)_\n" > release_notes_preview.md
4344
cat release_notes_tmp.md >> release_notes_preview.md

build_info.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"release": {
2222
"sign": true,
2323
"olm-tag": true,
24+
"skip-if-exists": true,
2425
"repositories": ["quay.io/mongodb/mongodb-kubernetes"],
2526
"platforms": [
2627
"linux/arm64",
@@ -68,6 +69,7 @@
6869
"release": {
6970
"sign": true,
7071
"olm-tag": true,
72+
"skip-if-exists": true,
7173
"repositories": ["quay.io/mongodb/mongodb-kubernetes-init-database"],
7274
"platforms": [
7375
"linux/arm64",
@@ -99,6 +101,7 @@
99101
"release": {
100102
"sign": true,
101103
"olm-tag": true,
104+
"skip-if-exists": true,
102105
"repositories": ["quay.io/mongodb/mongodb-kubernetes-init-appdb"],
103106
"platforms": [
104107
"linux/arm64",
@@ -127,6 +130,7 @@
127130
"release": {
128131
"sign": true,
129132
"olm-tag": true,
133+
"skip-if-exists": true,
130134
"repositories": ["quay.io/mongodb/mongodb-kubernetes-init-ops-manager"],
131135
"platforms": [
132136
"linux/amd64"
@@ -155,6 +159,7 @@
155159
"release": {
156160
"sign": true,
157161
"olm-tag": true,
162+
"skip-if-exists": true,
158163
"repositories": ["quay.io/mongodb/mongodb-kubernetes-database"],
159164
"platforms": [
160165
"linux/arm64",
@@ -180,6 +185,7 @@
180185
]
181186
},
182187
"release": {
188+
"skip-if-exists": true,
183189
"repositories": ["quay.io/mongodb/mongodb-kubernetes-tests"],
184190
"platforms": [
185191
"linux/amd64"
@@ -262,13 +268,15 @@
262268
"agent": {
263269
"dockerfile-path": "docker/mongodb-agent/Dockerfile",
264270
"patch": {
271+
"skip-if-exists": true,
265272
"repositories": ["268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-agent"],
266273
"platforms": [
267274
"linux/amd64"
268275
]
269276
},
270277
"staging": {
271278
"sign": true,
279+
"skip-if-exists": true,
272280
"repositories": ["268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-agent"],
273281
"platforms": [
274282
"linux/arm64",
@@ -277,9 +285,10 @@
277285
"linux/ppc64le"
278286
]
279287
},
280-
"manual_release": {
288+
"release": {
281289
"sign": true,
282290
"olm-tag": true,
291+
"skip-if-exists": true,
283292
"repositories": ["quay.io/mongodb/mongodb-agent-ubi", "quay.io/mongodb/mongodb-agent"],
284293
"platforms": [
285294
"linux/arm64",
@@ -292,21 +301,24 @@
292301
"ops-manager": {
293302
"dockerfile-path": "docker/mongodb-enterprise-ops-manager/Dockerfile",
294303
"patch": {
304+
"skip-if-exists": true,
295305
"repositories": ["268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-enterprise-ops-manager-ubi"],
296306
"platforms": [
297307
"linux/amd64"
298308
]
299309
},
300310
"staging": {
301311
"sign": true,
312+
"skip-if-exists": true,
302313
"repositories": ["268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-enterprise-ops-manager-ubi"],
303314
"platforms": [
304315
"linux/amd64"
305316
]
306317
},
307-
"manual_release": {
318+
"release": {
308319
"sign": true,
309320
"olm-tag": true,
321+
"skip-if-exists": true,
310322
"repositories": ["quay.io/mongodb/mongodb-enterprise-ops-manager-ubi"],
311323
"platforms": [
312324
"linux/amd64"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
kind: feature
3+
date: 2025-09-25
4+
---
5+
6+
* **MongoDBCommunity**: Added support to configure custom cluster domain via newly introduced `spec.clusterDomain` resource field. If `spec.clusterDomain` is not set, environment variable `CLUSTER_DOMAIN` is used as cluster domain. If the environment variable `CLUSTER_DOMAIN` is also not set, operator falls back to `cluster.local` as default cluster domain.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
kind: feature
3+
date: 2025-10-07
4+
---
5+
6+
* **Helm Chart**: Introduced two new helm fields `operator.podSecurityContext` and `operator.securityContext` that can be used to configure `securityContext` for Operator deployment through Helm Chart.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
kind: fix
3+
date: 2025-10-10
4+
---
5+
6+
* Fixed parsing of the `customEnvVars` Helm value when values contain `=` characters.

config/crd/bases/mongodbcommunity.mongodb.com_mongodbcommunity.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ spec:
240240
x-kubernetes-preserve-unknown-fields: true
241241
type: object
242242
type: object
243+
clusterDomain:
244+
format: hostname
245+
type: string
243246
featureCompatibilityVersion:
244247
description: |-
245248
FeatureCompatibilityVersion configures the feature compatibility version that will

controllers/operator/mongodbreplicaset_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ func (r *ReconcileMongoDbReplicaSet) applySearchOverrides(ctx context.Context, r
656656
if rs.Spec.AdditionalMongodConfig == nil {
657657
rs.Spec.AdditionalMongodConfig = mdbv1.NewEmptyAdditionalMongodConfig()
658658
}
659-
searchMongodConfig := searchcontroller.GetMongodConfigParameters(search)
659+
searchMongodConfig := searchcontroller.GetMongodConfigParameters(search, rs.Spec.GetClusterDomain())
660660
rs.Spec.AdditionalMongodConfig.AddOption("setParameter", searchMongodConfig["setParameter"])
661661

662662
if searchcontroller.NeedsSearchCoordinatorRolePolyfill(rs.Spec.GetMongoDBVersion()) {

controllers/searchcontroller/community_search_source.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ type CommunitySearchSource struct {
2626

2727
func (r *CommunitySearchSource) HostSeeds() []string {
2828
seeds := make([]string, r.Spec.Members)
29+
clusterDomain := r.Spec.GetClusterDomain()
2930
for i := range seeds {
30-
seeds[i] = fmt.Sprintf("%s-%d.%s.%s.svc.cluster.local:%d", r.Name, i, r.ServiceName(), r.Namespace, r.GetMongodConfiguration().GetDBPort())
31+
seeds[i] = fmt.Sprintf("%s-%d.%s.%s.svc.%s:%d", r.Name, i, r.ServiceName(), r.Namespace, clusterDomain, r.GetMongodConfiguration().GetDBPort())
3132
}
3233
return seeds
3334
}

controllers/searchcontroller/enterprise_search_source.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ func NewEnterpriseResourceSearchSource(mdb *mdbv1.MongoDB) SearchSourceDBResourc
2424

2525
func (r EnterpriseResourceSearchSource) HostSeeds() []string {
2626
seeds := make([]string, r.Spec.Members)
27+
clusterDomain := r.Spec.GetClusterDomain()
2728
for i := range seeds {
28-
seeds[i] = fmt.Sprintf("%s-%d.%s.%s.svc.cluster.local:%d", r.Name, i, r.ServiceName(), r.Namespace, r.Spec.GetAdditionalMongodConfig().GetPortOrDefault())
29+
seeds[i] = fmt.Sprintf("%s-%d.%s.%s.svc.%s:%d", r.Name, i, r.ServiceName(), r.Namespace, clusterDomain, r.Spec.GetAdditionalMongodConfig().GetPortOrDefault())
2930
}
3031
return seeds
3132
}

0 commit comments

Comments
 (0)