diff --git a/changelog/20251210_other_remove_unused_mdb_image_type_env_variable.md b/changelog/20251210_other_remove_unused_mdb_image_type_env_variable.md new file mode 100644 index 0000000000..8385badbf4 --- /dev/null +++ b/changelog/20251210_other_remove_unused_mdb_image_type_env_variable.md @@ -0,0 +1,6 @@ +--- +kind: other +date: 2025-12-10 +--- + +* **Operator configuration**: Removed the unused `MDB_IMAGE_TYPE` environment variable and the corresponding `mongodb.imageType` Helm value. This variable was deprecated in v1.28.0 of the MongoDB Enterprise Kubernetes Operator when it switched to architecture-based image selection (ubi9 for static, ubi8 for non-static). This is a cleanup change with no functional impact. diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 31dc1095cc..bb10ba1d8a 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -94,8 +94,6 @@ spec: value: mongodb-enterprise-server - name: MONGODB_REPO_URL value: quay.io/mongodb - - name: MDB_IMAGE_TYPE - value: ubi8 - name: PERFORM_FAILOVER value: 'true' - name: MDB_WEBHOOK_REGISTER_CONFIGURATION diff --git a/helm_chart/templates/operator.yaml b/helm_chart/templates/operator.yaml index ebae9c8787..60b0409595 100644 --- a/helm_chart/templates/operator.yaml +++ b/helm_chart/templates/operator.yaml @@ -197,12 +197,6 @@ spec: value: {{ .Values.mongodb.name }} - name: MONGODB_REPO_URL value: {{ .Values.mongodb.repo }} - - name: MDB_IMAGE_TYPE - {{- if eq .Values.operator.mdbDefaultArchitecture "static" }} - value: "ubi9" - {{- else }} - value: {{ .Values.mongodb.imageType }} - {{- end }} {{- if eq .Values.mongodb.appdbAssumeOldFormat true }} - name: MDB_APPDB_ASSUME_OLD_FORMAT value: 'true' diff --git a/helm_chart/values.yaml b/helm_chart/values.yaml index 4d903d94b6..46c71c5f60 100644 --- a/helm_chart/values.yaml +++ b/helm_chart/values.yaml @@ -166,7 +166,6 @@ mongodb: name: mongodb-enterprise-server repo: quay.io/mongodb appdbAssumeOldFormat: false - imageType: ubi8 ## Registry registry: diff --git a/mongodb-community-operator/controllers/construct/mongodbstatefulset.go b/mongodb-community-operator/controllers/construct/mongodbstatefulset.go index e0243e9105..0caf128750 100644 --- a/mongodb-community-operator/controllers/construct/mongodbstatefulset.go +++ b/mongodb-community-operator/controllers/construct/mongodbstatefulset.go @@ -28,10 +28,9 @@ var OfficialMongodbRepoUrls = []string{"docker.io/mongodb", "quay.io/mongodb"} // Environment variables used to configure the MongoDB StatefulSet. const ( - MongodbRepoUrlEnv = "MONGODB_REPO_URL" - MongodbImageEnv = "MONGODB_IMAGE" - MongoDBImageTypeEnv = "MDB_IMAGE_TYPE" - AgentImageEnv = "AGENT_IMAGE" + MongodbRepoUrlEnv = "MONGODB_REPO_URL" + MongodbImageEnv = "MONGODB_IMAGE" + AgentImageEnv = "AGENT_IMAGE" ) // MCO only diff --git a/pkg/images/Imageurls_test.go b/pkg/images/Imageurls_test.go index 60b4233f7b..447446b08c 100644 --- a/pkg/images/Imageurls_test.go +++ b/pkg/images/Imageurls_test.go @@ -129,7 +129,6 @@ func TestGetAppDBImage(t *testing.T) { want: "quay.io/mongodb/mongodb-enterprise-server:4.2.11-ubi8", setupEnvs: func(t *testing.T) { t.Setenv("RELATED_IMAGE_MONGODB_IMAGE_4_2_11_ubi8", "quay.io/mongodb/mongodb-enterprise-server:4.2.11-ubi8") - t.Setenv(construct.MongoDBImageTypeEnv, "ubi8") t.Setenv(construct.MongodbImageEnv, util.DeprecatedImageAppdbUbiUrl) t.Setenv(construct.MongodbRepoUrlEnv, construct.OfficialMongodbRepoUrls[1]) }, @@ -141,7 +140,6 @@ func TestGetAppDBImage(t *testing.T) { setupEnvs: func(t *testing.T) { t.Setenv("RELATED_IMAGE_MONGODB_IMAGE_4_2_11_ubi8", "quay.io/mongodb/mongodb-enterprise-server:4.2.11-ubi8") t.Setenv("RELATED_IMAGE_MONGODB_IMAGE_4_2_11_ent", "quay.io/mongodb/mongodb-enterprise-server:4.2.11-ent") - t.Setenv(construct.MongoDBImageTypeEnv, "ubi8") t.Setenv(construct.MongodbImageEnv, util.OfficialEnterpriseServerImageUrl) t.Setenv(construct.MongodbRepoUrlEnv, construct.OfficialMongodbRepoUrls[1]) }, diff --git a/public/architectures/setup-multi-cluster/ra-02-setup-operator/output/ra-02_0210_helm_install_operator.out b/public/architectures/setup-multi-cluster/ra-02-setup-operator/output/ra-02_0210_helm_install_operator.out index 7627b0a119..283bd16ce2 100644 --- a/public/architectures/setup-multi-cluster/ra-02-setup-operator/output/ra-02_0210_helm_install_operator.out +++ b/public/architectures/setup-multi-cluster/ra-02-setup-operator/output/ra-02_0210_helm_install_operator.out @@ -338,8 +338,6 @@ spec: value: mongodb-enterprise-server - name: MONGODB_REPO_URL value: quay.io/mongodb - - name: MDB_IMAGE_TYPE - value: ubi8 - name: PERFORM_FAILOVER value: 'true' - name: MDB_MAX_CONCURRENT_RECONCILES diff --git a/public/mongodb-kubernetes-multi-cluster.yaml b/public/mongodb-kubernetes-multi-cluster.yaml index 27e9b8d445..36f17ba404 100644 --- a/public/mongodb-kubernetes-multi-cluster.yaml +++ b/public/mongodb-kubernetes-multi-cluster.yaml @@ -405,8 +405,6 @@ spec: value: mongodb-enterprise-server - name: MONGODB_REPO_URL value: quay.io/mongodb - - name: MDB_IMAGE_TYPE - value: ubi8 - name: PERFORM_FAILOVER value: 'true' - name: MDB_MAX_CONCURRENT_RECONCILES diff --git a/public/mongodb-kubernetes-openshift.yaml b/public/mongodb-kubernetes-openshift.yaml index 22e4b27b3f..3cc09506ce 100644 --- a/public/mongodb-kubernetes-openshift.yaml +++ b/public/mongodb-kubernetes-openshift.yaml @@ -400,8 +400,6 @@ spec: value: mongodb-enterprise-server - name: MONGODB_REPO_URL value: quay.io/mongodb - - name: MDB_IMAGE_TYPE - value: ubi8 - name: PERFORM_FAILOVER value: 'true' - name: MDB_MAX_CONCURRENT_RECONCILES diff --git a/public/mongodb-kubernetes.yaml b/public/mongodb-kubernetes.yaml index ff3d7a68f4..ec760a94f7 100644 --- a/public/mongodb-kubernetes.yaml +++ b/public/mongodb-kubernetes.yaml @@ -401,8 +401,6 @@ spec: value: mongodb-enterprise-server - name: MONGODB_REPO_URL value: quay.io/mongodb - - name: MDB_IMAGE_TYPE - value: ubi8 - name: PERFORM_FAILOVER value: 'true' - name: MDB_MAX_CONCURRENT_RECONCILES diff --git a/scripts/dev/contexts/root-context b/scripts/dev/contexts/root-context index 3c3dc998b8..66a83a92bf 100644 --- a/scripts/dev/contexts/root-context +++ b/scripts/dev/contexts/root-context @@ -108,7 +108,6 @@ export SIGNING_PUBLIC_KEY_URL="https://cosign.mongodb.com/mongodb-enterprise-kub export CLUSTER_DOMAIN="cluster.local" export MDB_MAX_CONCURRENT_RECONCILES=10 -export MDB_IMAGE_TYPE="ubi9" # leaving them empty for now export OM_HOST=https://cloud-qa.mongodb.com diff --git a/scripts/dev/print_operator_env.sh b/scripts/dev/print_operator_env.sh index 59c8fe94c4..51057550e7 100755 --- a/scripts/dev/print_operator_env.sh +++ b/scripts/dev/print_operator_env.sh @@ -28,7 +28,6 @@ MONGODB_AGENT_VERSION=\"${MONGODB_AGENT_VERSION:-}\" MONGODB_REPO_URL=\"${MONGODB_REPO_URL:-}\" IMAGE_PULL_SECRETS=\"image-registries-secret\" MDB_DEFAULT_ARCHITECTURE=\"${MDB_DEFAULT_ARCHITECTURE:-non-static}\" -MDB_IMAGE_TYPE=\"${MDB_IMAGE_TYPE:-ubi8}\" MDB_OPERATOR_TELEMETRY_COLLECTION_FREQUENCY=\"${MDB_OPERATOR_TELEMETRY_COLLECTION_FREQUENCY:-1m}\" MDB_OPERATOR_TELEMETRY_SEND_ENABLED=\"${MDB_OPERATOR_TELEMETRY_SEND_ENABLED:-false}\" MDB_COMMUNITY_IMAGE=\"${MDB_COMMUNITY_IMAGE}\" diff --git a/scripts/evergreen/deployments/test-app/templates/mongodb-enterprise-tests.yaml b/scripts/evergreen/deployments/test-app/templates/mongodb-enterprise-tests.yaml index dae01c1460..cfa24884fd 100644 --- a/scripts/evergreen/deployments/test-app/templates/mongodb-enterprise-tests.yaml +++ b/scripts/evergreen/deployments/test-app/templates/mongodb-enterprise-tests.yaml @@ -166,8 +166,6 @@ spec: {{ end }} - name: MDB_DEFAULT_ARCHITECTURE value: {{ .Values.mdbDefaultArchitecture }} - - name: MDB_IMAGE_TYPE - value: {{ .Values.mdbImageType }} - name: CLUSTER_DOMAIN value: {{ .Values.clusterDomain }} {{ if .Values.omDebugHttp }} diff --git a/scripts/evergreen/deployments/test-app/values.yaml b/scripts/evergreen/deployments/test-app/values.yaml index 579bc426b8..440dc56d43 100644 --- a/scripts/evergreen/deployments/test-app/values.yaml +++ b/scripts/evergreen/deployments/test-app/values.yaml @@ -39,7 +39,6 @@ otel_parent_id: otel_endpoint: otel_resource_attributes: mdbDefaultArchitecture: "non-static" -mdbImageType: "ubi8" # set to "true" to set OM_DEBUG_HTTP=true for the operator omDebugHttp: diff --git a/scripts/evergreen/e2e/single_e2e.sh b/scripts/evergreen/e2e/single_e2e.sh index 3c881f19cc..b43cb9205b 100755 --- a/scripts/evergreen/e2e/single_e2e.sh +++ b/scripts/evergreen/e2e/single_e2e.sh @@ -77,7 +77,6 @@ deploy_test_app() { "--set" "managedSecurityContext=${MANAGED_SECURITY_CONTEXT:-false}" "--set" "registry=${REGISTRY}" "--set" "mdbDefaultArchitecture=${MDB_DEFAULT_ARCHITECTURE:-'non-static'}" - "--set" "mdbImageType=${MDB_IMAGE_TYPE:-'ubi8'}" "--set" "clusterDomain=${CLUSTER_DOMAIN:-'cluster.local'}" "--set" "cognito_user_pool_id=${cognito_user_pool_id}" "--set" "cognito_workload_federation_client_id=${cognito_workload_federation_client_id}" diff --git a/scripts/funcs/operator_deployment b/scripts/funcs/operator_deployment index b7f68ffcc5..7ea588922c 100644 --- a/scripts/funcs/operator_deployment +++ b/scripts/funcs/operator_deployment @@ -26,7 +26,6 @@ get_operator_helm_values() { "database.version=${DATABASE_VERSION}" "agent.version=${AGENT_VERSION}" "mongodb.name=mongodb-enterprise-server" - "mongodb.imageType=${MDB_IMAGE_TYPE:-ubi8}" "operator.mdbDefaultArchitecture=${MDB_DEFAULT_ARCHITECTURE:-non-static}" "operator.enablePVCResize=${MDB_ENABLE_PVC_RESIZE:-true}" # only send the telemetry to the backend on a specific variant, thus default to false