Skip to content

Commit 9e3aa8e

Browse files
mircea-cosbucfealebenpae
authored andcommitted
CLOUDP-302662: Disable cluster level telemetry on Openshift e2e (#4127)
# Summary Openshift e2e tests run on a static cluster. When running multiple tests in parallel or when a test has not been cleaned up, the installation of the operator fails when installing cluster roles since they need to be owned by a specific helm release. Sample error log: https://evergreen.mongodb.com/rest/v2/tasks/ops_manager_kubernetes_e2e_mdb_openshift_ubi_cloudqa_e2e_crd_validation_d9302abbec0e04333374b22e159fafce720d1f8b_25_02_25_10_03_37/build/TestLogs/770c8557b5948815e5c422e80d89d1e0?execution=4&print_time=true ## Proof of Work EVG patch with changes: https://spruce.mongodb.com/version/67bedad29518090007d220a2 ## 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 checked for release_note changes? ## Reminder (Please remove this when merging) - Please try to Approve or Reject Changes the PR, keep PRs in review as short as possible - Our Short Guide for PRs: [Link](REDACTED) - Remember the following Communication Standards - use comment prefixes for clarity: * **blocking**: Must be addressed before approval. * **follow-up**: Can be addressed in a later PR or ticket. * **q**: Clarifying question. * **nit**: Non-blocking suggestions. * **note**: Side-note, non-actionable. Example: Praise * --> no prefix is considered a question
1 parent 5bbf035 commit 9e3aa8e

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

scripts/dev/contexts/e2e_mdb_openshift_ubi_cloudqa

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export ecr_registry_needs_auth=ecr-registry
1313
export MANAGED_SECURITY_CONTEXT="true"
1414
export ALWAYS_REMOVE_TESTING_NAMESPACE="true"
1515
export ops_manager_version="cloud_qa"
16+
export MDB_OPERATOR_TELEMETRY_COLLECTION_CLUSTERS_ENABLED="false"
1617

1718
export CUSTOM_MDB_VERSION=6.0.16
1819

scripts/dev/contexts/e2e_openshift_static_mdb_ubi_cloudqa

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export ecr_registry_needs_auth=ecr-registry
1313
export MANAGED_SECURITY_CONTEXT="true"
1414
export ALWAYS_REMOVE_TESTING_NAMESPACE="true"
1515
export ops_manager_version="cloud_qa"
16+
export MDB_OPERATOR_TELEMETRY_COLLECTION_CLUSTERS_ENABLED="false"
1617

1718
export CUSTOM_MDB_VERSION=6.0.16
1819

scripts/funcs/operator_deployment

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ get_operator_helm_values() {
3131
"operator.mdbDefaultArchitecture=${MDB_DEFAULT_ARCHITECTURE:-non-static}"
3232
"operator.enablePVCResize=${MDB_ENABLE_PVC_RESIZE:-true}"
3333
"operator.telemetry.enabled=true"
34-
"operator.telemetry.collection.clusters.enabled=true"
34+
"operator.telemetry.collection.clusters.enabled=${MDB_OPERATOR_TELEMETRY_COLLECTION_CLUSTERS_ENABLED:-true}"
3535
"operator.telemetry.collection.deployments.enabled=true"
3636
"operator.telemetry.collection.operators.enabled=true"
3737
# only send the telemetry to the backend on a specific variant, thus default to false
@@ -40,11 +40,11 @@ get_operator_helm_values() {
4040
"operator.telemetry.collection.frequency=${MDB_OPERATOR_TELEMETRY_COLLECTION_FREQUENCY:-1m}"
4141
)
4242

43-
# shellcheck disable=SC2154
43+
# shellcheck disable=SC2154
4444
if [[ "${KUBE_ENVIRONMENT_NAME-}" = "multi" ]]; then
45-
comma_separated_list="$(echo "${MEMBER_CLUSTERS}" | tr ' ' ',')"
46-
# shellcheck disable=SC2154
47-
config+=("multiCluster.clusters={${comma_separated_list}}")
45+
comma_separated_list="$(echo "${MEMBER_CLUSTERS}" | tr ' ' ',')"
46+
# shellcheck disable=SC2154
47+
config+=("multiCluster.clusters={${comma_separated_list}}")
4848
fi
4949

5050
if [[ "${KUBE_ENVIRONMENT_NAME:-}" == "multi" ]]; then
@@ -56,31 +56,31 @@ get_operator_helm_values() {
5656
fi
5757

5858
if [[ "${MDB_MAX_CONCURRENT_RECONCILES:-}" != "" ]]; then
59-
config+=("operator.maxConcurrentReconciles=${MDB_MAX_CONCURRENT_RECONCILES}")
59+
config+=("operator.maxConcurrentReconciles=${MDB_MAX_CONCURRENT_RECONCILES}")
6060
fi
6161

6262
# change this locally or as changed in variant e2e_operator_race_ubi_with_telemetry which also sends telemetry
6363
if [[ "${MDB_OPERATOR_TELEMETRY_SEND_BASEURL:-}" != "" ]]; then
64-
config+=("operator.telemetry.send.baseUrl=${MDB_OPERATOR_TELEMETRY_SEND_BASEURL}")
64+
config+=("operator.telemetry.send.baseUrl=${MDB_OPERATOR_TELEMETRY_SEND_BASEURL}")
6565
fi
6666

6767
if [[ "${MDB_HELM_OPERATOR_WEBHOOK_INSTALL_CLUSTER_ROLE:-}" != "" ]]; then
68-
config+=("operator.webhook.installClusterRole=${MDB_HELM_OPERATOR_WEBHOOK_INSTALL_CLUSTER_ROLE}")
68+
config+=("operator.webhook.installClusterRole=${MDB_HELM_OPERATOR_WEBHOOK_INSTALL_CLUSTER_ROLE}")
6969
fi
7070

7171
echo "${config[@]}"
7272
}
7373

7474
prepare_operator_config_map() {
75-
local context=${1}
76-
kubectl --context "${context}" delete configmap operator-installation-config --ignore-not-found
77-
title "Preparing the ConfigMap with Operator installation configuration"
75+
local context=${1}
76+
kubectl --context "${context}" delete configmap operator-installation-config --ignore-not-found
77+
title "Preparing the ConfigMap with Operator installation configuration"
7878

79-
read -ra helm_values < <(get_operator_helm_values)
80-
declare -a config_map_values=()
81-
for param in "${helm_values[@]}"; do
82-
config_map_values+=("--from-literal" "${param}")
83-
done
84-
# shellcheck disable=SC2086,SC2048
85-
kubectl --context "${context}" create configmap operator-installation-config -n "${NAMESPACE}" ${config_map_values[*]} || true
79+
read -ra helm_values < <(get_operator_helm_values)
80+
declare -a config_map_values=()
81+
for param in "${helm_values[@]}"; do
82+
config_map_values+=("--from-literal" "${param}")
83+
done
84+
# shellcheck disable=SC2086,SC2048
85+
kubectl --context "${context}" create configmap operator-installation-config -n "${NAMESPACE}" ${config_map_values[*]} || true
8686
}

0 commit comments

Comments
 (0)