Skip to content

Commit fed0f08

Browse files
committed
add enterprise snippets for search tls updates
1 parent d59c707 commit fed0f08

File tree

4 files changed

+33
-4
lines changed

4 files changed

+33
-4
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
required=(
2+
K8S_CTX
3+
MDB_NS
4+
MDB_RESOURCE_NAME
5+
MDB_VERSION
6+
MDB_MEMBERS
7+
CERT_MANAGER_NAMESPACE
8+
MDB_TLS_CA_SECRET_NAME
9+
MDB_TLS_SERVER_CERT_SECRET_NAME
10+
MDB_SEARCH_TLS_SECRET_NAME
11+
MDB_ADMIN_USER_PASSWORD
12+
MDB_SEARCH_SYNC_USER_PASSWORD
13+
MDB_USER_PASSWORD
14+
OPERATOR_HELM_CHART
15+
OPS_MANAGER_PROJECT_NAME
16+
OPS_MANAGER_API_URL
17+
OPS_MANAGER_API_USER
18+
OPS_MANAGER_API_KEY
19+
)
20+
21+
missing_req=()
22+
for v in "${required[@]}"; do [[ -n "${!v:-}" ]] || missing_req+=("$v"); done
23+
if (( ${#missing_req[@]} )); then
24+
echo "ERROR: Missing required environment variables:" >&2
25+
for m in "${missing_req[@]}"; do echo " - $m" >&2; done
26+
else
27+
echo "All required environment variables present."
28+
fi

docs/search/02-search-enterprise-deploy/code_snippets/02_0305_create_mongodb_database_resource.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ spec:
1818
modes:
1919
- SCRAM
2020
certsSecretPrefix: ${MDB_TLS_CERT_SECRET_PREFIX}
21-
tls:
22-
enabled: true
23-
ca: ${MDB_TLS_CA_CONFIGMAP}
21+
tls:
22+
enabled: true
23+
ca: ${MDB_TLS_CA_CONFIGMAP}
2424
agent:
2525
logLevel: INFO
2626
podSpec:

docs/search/02-search-enterprise-deploy/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ cd "${script_dir}"
1111

1212
prepare_snippets
1313

14+
run 02_0040_validate_env.sh
1415
run 02_0045_create_namespaces.sh
1516
run 02_0046_create_image_pull_secrets.sh
1617
run 02_0048_configure_prerelease_image_pullsecret.sh

docs/search/03-search-query-usage/code_snippets/03_0410_run_mongodb_tools_pod.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
volumes:
2020
- name: mongo-ca
2121
configMap:
22-
name: ${MDB_TLS_CA_CONFIGMAP}
22+
name: ${MDB_TLS_CA_CONFIGMAP:-"${MDB_RESOURCE_NAME}-ca-configmap"}
2323
optional: true
2424
items:
2525
- key: ca.crt

0 commit comments

Comments
 (0)