Skip to content

Commit 91e96ae

Browse files
authored
Merge branch 'master' into lsierant/archive-snippets-fixes
2 parents bdeda51 + b2ff5a7 commit 91e96ae

File tree

100 files changed

+1205
-314
lines changed

Some content is hidden

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

100 files changed

+1205
-314
lines changed

.evergreen-functions.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,8 @@ functions:
524524
download_multi_cluster_binary:
525525
- command: subprocess.exec
526526
params:
527+
include_expansions_in_env:
528+
- workdir
527529
working_dir: src/github.com/mongodb/mongodb-kubernetes
528530
binary: scripts/release/kubectl_mongodb/download_kubectl_plugin.sh
529531
env:
@@ -791,6 +793,8 @@ functions:
791793
- code_snippets_reset
792794
- task_name
793795
- MDB_BASH_DEBUG
796+
add_to_path:
797+
- ${workdir}/bin
794798
script: |
795799
./scripts/code_snippets/tests/${task_name}
796800

.evergreen.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ include:
1313
variables:
1414
- &ops_manager_60_latest 6.0.27 # The order/index is important, since these are anchors. Please do not change
1515

16-
- &ops_manager_70_latest 7.0.18 # The order/index is important, since these are anchors. Please do not change
16+
- &ops_manager_70_latest 7.0.19 # The order/index is important, since these are anchors. Please do not change
1717

18-
- &ops_manager_80_latest 8.0.15 # The order/index is important, since these are anchors. Please do not change
18+
- &ops_manager_80_latest 8.0.16 # The order/index is important, since these are anchors. Please do not change
1919

2020
# The dependency unification between static and non-static is intentional here.
2121
# Even though some images are exclusive, in EVG they all are built once and in parallel.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,5 @@ logs
9494

9595
# locally packaged chart
9696
mongodb-kubernetes-*.tgz
97+
98+
scripts/code_snippets/tests/outputs/*

api/v1/mdb/mongodb_roles_validation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ func validatePrivilege(privilege Privilege, mdbVersion string) v1.ValidationResu
246246
if !*privilege.Resource.Cluster {
247247
return v1.ValidationError("The only valid value for privilege.cluster, if set, is true")
248248
}
249-
if privilege.Resource.Collection != "" || privilege.Resource.Db != "" {
249+
if privilege.Resource.Collection != nil || privilege.Resource.Db != nil {
250250
return v1.ValidationError("Cluster: true is not compatible with setting db/collection")
251251
}
252252
if res := validateClusterPrivilegeActions(privilege.Actions, mdbVersion); res.Level == v1.ErrorLevel {

api/v1/mdb/mongodb_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -965,10 +965,10 @@ type AuthenticationRestriction struct {
965965

966966
type Resource struct {
967967
// +optional
968-
Db string `json:"db"`
968+
Db *string `json:"db,omitempty"`
969969
// +optional
970-
Collection string `json:"collection"`
971-
Cluster *bool `json:"cluster,omitempty"`
970+
Collection *string `json:"collection,omitempty"`
971+
Cluster *bool `json:"cluster,omitempty"`
972972
}
973973

974974
type Privilege struct {

api/v1/search/mongodbsearch_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ type MongoDBSearchStatus struct {
105105
// +k8s:openapi-gen=true
106106
// +kubebuilder:subresource:status
107107
// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Current state of the MongoDB deployment."
108+
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".status.version",description="MongoDB Search version reconciled by the operator."
108109
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="The time since the MongoDB resource was created."
109110
// +kubebuilder:resource:path=mongodbsearch,scope=Namespaced,shortName=mdbs
110111
type MongoDBSearch struct {
@@ -145,6 +146,9 @@ func (s *MongoDBSearch) UpdateStatus(phase status.Phase, statusOptions ...status
145146
if option, exists := status.GetOption(statusOptions, status.WarningsOption{}); exists {
146147
s.Status.Warnings = append(s.Status.Warnings, option.(status.WarningsOption).Warnings...)
147148
}
149+
if option, exists := status.GetOption(statusOptions, MongoDBSearchVersionOption{}); exists {
150+
s.Status.Version = option.(MongoDBSearchVersionOption).Version
151+
}
148152
}
149153

150154
func (s *MongoDBSearch) NamespacedName() types.NamespacedName {

api/v1/search/status_options.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package search
2+
3+
import "github.com/mongodb/mongodb-kubernetes/api/v1/status"
4+
5+
type MongoDBSearchVersionOption struct {
6+
Version string
7+
}
8+
9+
var _ status.Option = MongoDBSearchVersionOption{}
10+
11+
func NewMongoDBSearchVersionOption(version string) MongoDBSearchVersionOption {
12+
return MongoDBSearchVersionOption{Version: version}
13+
}
14+
15+
func (o MongoDBSearchVersionOption) Value() interface{} {
16+
return o.Version
17+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Surface reconciled MongoDBSearch version
3+
kind: fix
4+
date: 2025-10-24
5+
---
6+
7+
* MongoDBSearch now records the reconciled mongot version in status and exposes it via a dedicated kubectl print column.
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-27
4+
---
5+
6+
* Fixed inability to specify cluster-wide privileges in custom roles.

config/manager/manager.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ spec:
140140
value: "quay.io/mongodb/mongodb-agent:107.0.17.8771-1"
141141
- name: RELATED_IMAGE_AGENT_IMAGE_107_0_18_8784_1
142142
value: "quay.io/mongodb/mongodb-agent:107.0.18.8784-1"
143+
- name: RELATED_IMAGE_AGENT_IMAGE_107_0_19_8805_1
144+
value: "quay.io/mongodb/mongodb-agent:107.0.19.8805-1"
143145
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_1_8718_1
144146
value: "quay.io/mongodb/mongodb-agent:108.0.1.8718-1"
145147
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_11_8830_1
@@ -150,6 +152,8 @@ spec:
150152
value: "quay.io/mongodb/mongodb-agent:108.0.13.8870-1"
151153
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_15_8888_1
152154
value: "quay.io/mongodb/mongodb-agent:108.0.15.8888-1"
155+
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_16_8895_1
156+
value: "quay.io/mongodb/mongodb-agent:108.0.16.8895-1"
153157
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_2_8729_1
154158
value: "quay.io/mongodb/mongodb-agent:108.0.2.8729-1"
155159
- name: RELATED_IMAGE_AGENT_IMAGE_108_0_3_8758_1
@@ -162,8 +166,8 @@ spec:
162166
value: "quay.io/mongodb/mongodb-agent:108.0.7.8810-1"
163167
- name: RELATED_IMAGE_AGENT_IMAGE_12_0_35_7911_1
164168
value: "quay.io/mongodb/mongodb-agent:12.0.35.7911-1"
165-
- name: RELATED_IMAGE_AGENT_IMAGE_13_41_0_9830_1
166-
value: "quay.io/mongodb/mongodb-agent:13.41.0.9830-1"
169+
- name: RELATED_IMAGE_AGENT_IMAGE_13_42_0_9892_1
170+
value: "quay.io/mongodb/mongodb-agent:13.42.0.9892-1"
167171
- name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_6_0_26
168172
value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:6.0.26"
169173
- name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_6_0_27
@@ -182,6 +186,8 @@ spec:
182186
value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:7.0.17"
183187
- name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_7_0_18
184188
value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:7.0.18"
189+
- name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_7_0_19
190+
value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:7.0.19"
185191
- name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_8_0_0
186192
value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:8.0.0"
187193
- name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_8_0_1
@@ -208,6 +214,8 @@ spec:
208214
value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:8.0.14"
209215
- name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_8_0_15
210216
value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:8.0.15"
217+
- name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_8_0_16
218+
value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:8.0.16"
211219
# since the official server images end with a different suffix we can re-use the same $mongodbImageEnv
212220
- name: RELATED_IMAGE_MONGODB_IMAGE_4_4_0_ubi8
213221
value: "quay.io/mongodb/mongodb-enterprise-server:4.4.0-ubi8"

0 commit comments

Comments
 (0)