You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify hostname and service name in external mongod search snippets (#483)
# Summary
This pull request updates the configuration and code snippets for
setting up an external MongoDB Search service to improve clarity and
consistency in variable naming. The main change is the introduction of
the `MDB_SEARCH_SERVICE_NAME` variable, replacing the previous use of
`MDB_SEARCH_HOSTNAME` for Kubernetes service references, while
`MDB_SEARCH_HOSTNAME` is now used specifically for the DNS hostname.
**Configuration variable updates:**
* Introduced `MDB_SEARCH_SERVICE_NAME` to represent the Kubernetes
service name and updated all related references in `env_variables.sh`
and `README.md`. The `MDB_SEARCH_HOSTNAME` variable is now used to
specify the DNS hostname (e.g., `mdbs-search.example.com`).
[[1]](diffhunk://#diff-e45215de7c861006344586b40839be9eff775ee82754ace9f0d83f208fcb127fL11-R12)
[[2]](diffhunk://#diff-78a9bbf913195ad01e7814be0a2937858af6c019f895fa45726b5730974bc78cL53-R54)
**Kubernetes service creation and referencing:**
* Updated service creation in
`04_0322_create_search_loadbalancer_service.sh` to use
`MDB_SEARCH_SERVICE_NAME` for the service name instead of
`MDB_SEARCH_HOSTNAME`.
* Changed all `kubectl` commands and log messages in scripts to
reference `MDB_SEARCH_SERVICE_NAME` instead of `MDB_SEARCH_HOSTNAME`,
ensuring consistency throughout the deployment process.
[[1]](diffhunk://#diff-3b631e2e08f0d1e1b57c8118a489bd479473d66343885e68b50f8614589a2954L16-R20)
[[2]](diffhunk://#diff-7f7d23e97cadad8c2d81c63dab8f285f921bfbd83f39940febd47989a60986e1L1-R7)
## Proof of Work
Snippet tests pass
echo"Waiting for external IP to be assigned to service ${MDB_SEARCH_HOSTNAME}..."
16
+
echo"Waiting for external IP to be assigned to service ${MDB_SEARCH_SERVICE_NAME}..."
17
17
TIMEOUT=120 # 2 minutes timeout
18
18
ELAPSED=0
19
19
while [ ${ELAPSED}-lt${TIMEOUT} ];do
20
-
EXTERNAL_IP=$(kubectl get service "${MDB_SEARCH_HOSTNAME}" --context "${K8S_CTX}" -n "${MDB_NS}" -o jsonpath='{.status.loadBalancer.ingress[0].ip}'2>/dev/null)
20
+
EXTERNAL_IP=$(kubectl get service "${MDB_SEARCH_SERVICE_NAME}" --context "${K8S_CTX}" -n "${MDB_NS}" -o jsonpath='{.status.loadBalancer.ingress[0].ip}'2>/dev/null)
21
21
if [ -n"${EXTERNAL_IP}" ] && [ "${EXTERNAL_IP}"!="null" ];then
0 commit comments