RD: Updated wait_for_mongodb.sh script and commented out liveness and readiness checks

Change-Id: I989b153f1c3df8016b838488672b30e062ef2656
This commit is contained in:
ipatini 2024-05-09 13:10:58 +03:00
parent a5ca07090c
commit 68b8bc9f34
2 changed files with 11 additions and 11 deletions

View File

@ -42,14 +42,14 @@ spec:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
# livenessProbe:
# httpGet:
# path: /
# port: http
# readinessProbe:
# httpGet:
# path: /
# port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
- name: {{ .Chart.Name }}-mongodb

View File

@ -1,12 +1,12 @@
#!/bin/bash
# Define MongoDB connection details
MONGODB_HOST="localhost"
MONGODB_PORT="27017"
if [ -z "$MONGODB_HOST" ]; then MONGODB_HOST="localhost"; fi
if [ -z "$MONGODB_PORT" ]; then MONGODB_PORT="27017"; fi
# Function to check if MongoDB is ready
wait_for_mongodb() {
echo "Waiting for MongoDB to be ready..."
echo "Waiting for MongoDB ($MONGODB_HOST:$MONGODB_PORT) to be ready..."
until nc -z $MONGODB_HOST $MONGODB_PORT
do
sleep 1