Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Commit dd849bd

Browse files
authored
Merge pull request #9 from Netcracker/bugfix/failReloadPods
Bugfix/fail reload pods
2 parents 8bb9daf + 6104285 commit dd849bd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docker/health.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,17 @@ has_http_port() {
1919
fi
2020
}
2121

22+
if [ -f "/usr/share/opensearch/credentials/username" ]; then
23+
OPENSEARCH_USERNAME=$(cat /usr/share/opensearch/credentials/username)
24+
fi
25+
26+
if [ -f "/usr/share/opensearch/credentials/password" ]; then
27+
OPENSEARCH_PASSWORD=$(cat /usr/share/opensearch/credentials/password)
28+
fi
2229
#Handles Kubernetes container readiness probe.
2330
readiness_probe() {
2431
HEALTH_LOG_FILE=/usr/share/opensearch/logs/health_readiness_probe.log
2532
truncate -s 0 ${HEALTH_LOG_FILE}
26-
2733
log "[readiness-probe] start"
2834
if [ "$(has_http_port)" -eq 0 ]; then
2935
command="curl -Is -u "${OPENSEARCH_USERNAME}:${OPENSEARCH_PASSWORD}" -XGET http://localhost:9200/_cat/health"

0 commit comments

Comments
 (0)