From 9aa1997ebde17dc850568ecc23ea47f7389844ce Mon Sep 17 00:00:00 2001 From: Valeriano Manassero <14011549+valeriano-manassero@users.noreply.github.com> Date: Mon, 30 Jan 2023 12:44:41 +0100 Subject: [PATCH] 141 apiserver init check improvements (#142) * Added: check also redis and mongo before starting apiserver * Changed: bump version --- charts/clearml/Chart.yaml | 6 +++--- charts/clearml/README.md | 2 +- .../clearml/templates/apiserver-deployment.yaml | 16 +++++++++++++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/charts/clearml/Chart.yaml b/charts/clearml/Chart.yaml index eb9dc69..f068704 100644 --- a/charts/clearml/Chart.yaml +++ b/charts/clearml/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: clearml description: MLOps platform type: application -version: "5.5.0" +version: "5.5.1" appVersion: "1.9.2" kubeVersion: ">= 1.21.0-0 < 1.27.0-0" home: https://clear.ml @@ -32,5 +32,5 @@ dependencies: condition: elasticsearch.enabled annotations: artifacthub.io/changes: | - - kind: added - description: support for fileserver static PVC + - kind: changed + description: check redis and mongodb too before starting apiserver diff --git a/charts/clearml/README.md b/charts/clearml/README.md index d81f5e8..f146dae 100644 --- a/charts/clearml/README.md +++ b/charts/clearml/README.md @@ -1,6 +1,6 @@ # ClearML Ecosystem for Kubernetes -![Version: 5.5.0](https://img.shields.io/badge/Version-5.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.9.2](https://img.shields.io/badge/AppVersion-1.9.2-informational?style=flat-square) +![Version: 5.5.1](https://img.shields.io/badge/Version-5.5.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.9.2](https://img.shields.io/badge/AppVersion-1.9.2-informational?style=flat-square) MLOps platform diff --git a/charts/clearml/templates/apiserver-deployment.yaml b/charts/clearml/templates/apiserver-deployment.yaml index efd27b9..a22c358 100644 --- a/charts/clearml/templates/apiserver-deployment.yaml +++ b/charts/clearml/templates/apiserver-deployment.yaml @@ -54,10 +54,24 @@ spec: - -c - > set -x; + {{- if .Values.elasticsearch.enabled }} while [ $(curl -sw '%{http_code}' "http://{{ include "elasticsearch.servicename" . }}:{{ include "elasticsearch.serviceport" . }}/_cluster/health" -o /dev/null) -ne 200 ] ; do echo "waiting for elasticsearch" ; sleep 5 ; - done + done ; + {{- end }} + {{- if .Values.mongodb.enabled }} + while [ $(curl --telnet-option BOGUS --connect-timeout 2 -s "telnet://{{ .Release.Name }}-mongodb:27017" -o /dev/null; echo $?) -ne 49 ] ; do + echo "waiting for mongodb" ; + sleep 5 ; + done ; + {{- end }} + {{- if .Values.redis.enabled }} + while [ $(curl --telnet-option BOGUS --connect-timeout 2 -s "telnet://{{ include "redis.servicename" . }}:{{ include "redis.serviceport" . }}" -o /dev/null; echo $?) -ne 49 ] ; do + echo "waiting for redis" ; + sleep 5 ; + done ; + {{- end }} containers: - name: clearml-apiserver {{- if .Values.enterpriseFeatures.enabled }}