From 43595543db34e64189c80e9b2fb474a542708b98 Mon Sep 17 00:00:00 2001 From: Dhaval Maniyar <100835289+logoutdhaval@users.noreply.github.com> Date: Fri, 9 Aug 2024 17:28:34 +0530 Subject: [PATCH] updating init containers (#47) --- helm/fineract/templates/fineract-server-deployment.yml | 6 +++--- helm/fineract/values.yaml | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/helm/fineract/templates/fineract-server-deployment.yml b/helm/fineract/templates/fineract-server-deployment.yml index 9c800b1..79c2e7f 100644 --- a/helm/fineract/templates/fineract-server-deployment.yml +++ b/helm/fineract/templates/fineract-server-deployment.yml @@ -55,9 +55,9 @@ spec: tier: backend spec: initContainers: - - name: init-mydb - image: busybox:1.28 - command: ['sh', '-c', 'echo -e "Checking for the availability of MYSQL server deployment"; while ! nc -z "{{ .Values.fineract.spec.template.spec.containers.env.FINERACT_DEFAULT_TENANTDB_HOSTNAME }}" "{{ .Values.fineract.spec.template.spec.containers.env.FINERACT_DEFAULT_TENANTDB_PORT }}"; do sleep 1; printf "-"; done; echo -e " >> MYSQL server has started";'] + {{- with .Values.fineract.extraInitContainers }} + {{- tpl (toYaml .) $ | nindent 8 }} + {{- end }} containers: - name: fineract-server image: "{{ .Values.fineract.image }}" diff --git a/helm/fineract/values.yaml b/helm/fineract/values.yaml index 5eb754c..6fd5a9a 100644 --- a/helm/fineract/values.yaml +++ b/helm/fineract/values.yaml @@ -4,6 +4,10 @@ fineract: DFSPIDS: "" SPRING_PROFILES_ACTIVE: "bb" image: "docker.io/openmf/fineract:1.9.0" + extraInitContainers: + - name: init-mydb + image: busybox:1.28 + command: [ 'sh', '-c', 'echo -e "Checking for the availability of MYSQL server deployment"; while ! nc -z "{{ .Values.fineract.spec.template.spec.containers.env.FINERACT_DEFAULT_TENANTDB_HOSTNAME }}" "{{ .Values.fineract.spec.template.spec.containers.env.FINERACT_DEFAULT_TENANTDB_PORT }}"; do sleep 1; printf "-"; done; echo -e " >> MYSQL server has started";' ] spec: template: spec: