diff --git a/charts/supabase/templates/test/analytics.yaml b/charts/supabase/templates/test/analytics.yaml index b97c3408..c90df374 100644 --- a/charts/supabase/templates/test/analytics.yaml +++ b/charts/supabase/templates/test/analytics.yaml @@ -20,7 +20,9 @@ spec: - -c - | curl -sfo /dev/null \ - http://{{ include "supabase.analytics.fullname" . }}:{{ .Values.analytics.service.port }}/health + http://{{ include "supabase.analytics.fullname" . }}:{{ .Values.analytics.service.port }}/health \ + || { echo -e "\033[31mFailed to connect to the {{ include "supabase.analytics.fullname" . }}\033[0m."; exit 1; } + echo "Sevice {{ include "supabase.analytics.fullname" . }} is healthy." restartPolicy: Never {{- end }} diff --git a/charts/supabase/templates/test/auth.yaml b/charts/supabase/templates/test/auth.yaml index 19a7fb1f..799ba984 100644 --- a/charts/supabase/templates/test/auth.yaml +++ b/charts/supabase/templates/test/auth.yaml @@ -20,7 +20,9 @@ spec: - -c - | curl -sfo /dev/null \ - http://{{ include "supabase.auth.fullname" . }}:{{ .Values.auth.service.port }}/health + http://{{ include "supabase.auth.fullname" . }}:{{ .Values.auth.service.port }}/health \ + || { echo -e "\033[31mFailed to connect to the {{ include "supabase.auth.fullname" . }}.\033[0m"; exit 1; } + echo "Sevice {{ include "supabase.auth.fullname" . }} is healthy." restartPolicy: Never {{- end }} diff --git a/charts/supabase/templates/test/db.yaml b/charts/supabase/templates/test/db.yaml index 296bcc3b..ed54d787 100644 --- a/charts/supabase/templates/test/db.yaml +++ b/charts/supabase/templates/test/db.yaml @@ -16,9 +16,12 @@ spec: - /bin/sh - -c - | - pg_isready -h $(DB_HOST) -p $(DB_PORT) -U $(DB_USER) || $(echo "\e[0;31mFailed to connect to the database." && exit 1) + pg_isready -h $(DB_HOST) -p $(DB_PORT) -U $(DB_USER) \ + || { echo -e "\033[31mFailed to connect to the database.\033[0m"; exit 1; } + echo "Database is ready" env: + # no password? - name: DB_HOST {{- if .Values.db.enabled }} value: {{ include "supabase.db.fullname" . | quote }} diff --git a/charts/supabase/templates/test/imgproxy.yaml b/charts/supabase/templates/test/imgproxy.yaml index b283dc8a..be1d2ab0 100644 --- a/charts/supabase/templates/test/imgproxy.yaml +++ b/charts/supabase/templates/test/imgproxy.yaml @@ -20,7 +20,9 @@ spec: - -c - | curl -sfo /dev/null \ - http://{{ include "supabase.imgproxy.fullname" . }}:{{ .Values.imgproxy.service.port }}/health + http://{{ include "supabase.imgproxy.fullname" . }}:{{ .Values.imgproxy.service.port }}/health \ + || { echo -e "\033[31mFailed to connect to the {{ include "supabase.imgproxy.fullname" . }}.\033[0m"; exit 1; } + echo "Sevice {{ include "supabase.imgproxy.fullname" . }} is healthy." restartPolicy: Never {{- end }} diff --git a/charts/supabase/templates/test/kong.yaml b/charts/supabase/templates/test/kong.yaml index f8c741f8..dbefc40a 100644 --- a/charts/supabase/templates/test/kong.yaml +++ b/charts/supabase/templates/test/kong.yaml @@ -34,7 +34,8 @@ spec: curl -sL --fail \ -o /dev/null \ "http://${DASHBOARD_USERNAME}:${DASHBOARD_PASSWORD}@{{ include "supabase.kong.fullname" . }}:{{ .Values.kong.service.port }}" \ - || ( echo -e "\e[0;31mFailed to get a valid response." && exit 1 ) + || { echo -e "\033[31mFailed to connect to the {{ include "supabase.kong.fullname" . }}.\033[0m"; exit 1; } + echo "Successfully connected." restartPolicy: Never {{- end }} diff --git a/charts/supabase/templates/test/meta.yaml b/charts/supabase/templates/test/meta.yaml index 9aee7f54..af298b80 100644 --- a/charts/supabase/templates/test/meta.yaml +++ b/charts/supabase/templates/test/meta.yaml @@ -20,7 +20,9 @@ spec: - -c - | curl -sfo /dev/null \ - http://{{ include "supabase.meta.fullname" . }}:{{ .Values.meta.service.port }}/health + http://{{ include "supabase.meta.fullname" . }}:{{ .Values.meta.service.port }}/health \ + || { echo -e "\033[31mFailed to connect to the {{ include "supabase.meta.fullname" . }}.\033[0m"; exit 1; } + echo "Sevice {{ include "supabase.meta.fullname" . }} is healthy." restartPolicy: Never {{- end }} diff --git a/charts/supabase/templates/test/minio.yaml b/charts/supabase/templates/test/minio.yaml index b3c3db27..9798b967 100644 --- a/charts/supabase/templates/test/minio.yaml +++ b/charts/supabase/templates/test/minio.yaml @@ -19,7 +19,9 @@ spec: - -c - | curl -sfo /dev/null \ - http://{{ include "supabase.minio.fullname" . }}:{{ .Values.minio.service.port }}/minio/health/live + http://{{ include "supabase.minio.fullname" . }}:{{ .Values.minio.service.port }}/minio/health/live \ + || { echo -e "\033[31mFailed to connect to the {{ include "supabase.minio.fullname" . }}.\033[0m"; exit 1; } + echo "Sevice {{ include "supabase.minio.fullname" . }} is healthy." restartPolicy: Never {{- end }} diff --git a/charts/supabase/templates/test/realtime.yaml b/charts/supabase/templates/test/realtime.yaml index e373fde8..acc33b37 100644 --- a/charts/supabase/templates/test/realtime.yaml +++ b/charts/supabase/templates/test/realtime.yaml @@ -20,7 +20,9 @@ spec: - -c - | curl -sfo /dev/null \ - http://{{ include "supabase.realtime.fullname" . }}:{{ .Values.realtime.service.port }} + http://{{ include "supabase.realtime.fullname" . }}:{{ .Values.realtime.service.port }} \ + || { echo -e "\033[31mFailed to connect to the {{ include "supabase.realtime.fullname" . }}.\033[0m"; exit 1; } + echo "Sevice {{ include "supabase.realtime.fullname" . }} is healthy." restartPolicy: Never {{- end }} diff --git a/charts/supabase/templates/test/rest.yaml b/charts/supabase/templates/test/rest.yaml index 927ffc73..4b23f923 100644 --- a/charts/supabase/templates/test/rest.yaml +++ b/charts/supabase/templates/test/rest.yaml @@ -20,7 +20,9 @@ spec: - -c - | curl -sfo /dev/null \ - http://{{ include "supabase.rest.fullname" . }}:{{ .Values.rest.service.port }} + http://{{ include "supabase.rest.fullname" . }}:{{ .Values.rest.service.port }} \ + || { echo -e "\033[31mFailed to connect to the {{ include "supabase.rest.fullname" . }}.\033[0m"; exit 1; } + echo "Sevice {{ include "supabase.rest.fullname" . }} is healthy." restartPolicy: Never {{- end }} diff --git a/charts/supabase/templates/test/storage.yaml b/charts/supabase/templates/test/storage.yaml index db129fff..1db4fc26 100644 --- a/charts/supabase/templates/test/storage.yaml +++ b/charts/supabase/templates/test/storage.yaml @@ -20,7 +20,9 @@ spec: - -c - | curl -sfo /dev/null \ - http://{{ include "supabase.storage.fullname" . }}:{{ .Values.storage.service.port }}/status + http://{{ include "supabase.storage.fullname" . }}:{{ .Values.storage.service.port }}/status \ + || { echo -e "\033[31mFailed to connect to the {{ include "supabase.storage.fullname" . }}.\033[0m"; exit 1; } + echo "Sevice {{ include "supabase.storage.fullname" . }} is healthy." restartPolicy: Never {{- end }} diff --git a/charts/supabase/templates/test/studio.yaml b/charts/supabase/templates/test/studio.yaml index 7e5082d9..78e370b3 100644 --- a/charts/supabase/templates/test/studio.yaml +++ b/charts/supabase/templates/test/studio.yaml @@ -20,7 +20,9 @@ spec: - -c - | curl -sfo /dev/null \ - http://{{ include "supabase.studio.fullname" . }}:{{ .Values.studio.service.port }}/api/profile + http://{{ include "supabase.studio.fullname" . }}:{{ .Values.studio.service.port }}/api/profile \ + || { echo -e "\033[31mFailed to connect to the {{ include "supabase.studio.fullname" . }}.\033[0m"; exit 1; } + echo "Sevice {{ include "supabase.studio.fullname" . }} is healthy." restartPolicy: Never {{- end }}