From f03f26fbd2d5c33036ded7191d5a335ffa149e48 Mon Sep 17 00:00:00 2001 From: Hrafn Malmquist Date: Thu, 22 Aug 2024 13:48:05 +0100 Subject: [PATCH] Add init container to hold off until opensearch is running --- charts/invenio/templates/install-init-job.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/charts/invenio/templates/install-init-job.yaml b/charts/invenio/templates/install-init-job.yaml index ca8a2e5..8e763f8 100644 --- a/charts/invenio/templates/install-init-job.yaml +++ b/charts/invenio/templates/install-init-job.yaml @@ -21,6 +21,11 @@ metadata: spec: template: spec: + initContainers: + - name: wait-for-services + image: busybox + command: [ "/bin/sh","-c" ] + args: [ "until echo 'Waiting for opensearch...' && nc -vz -w 5 {{ include "invenio.opensearch.hostname" $ }} 9200; do echo 'And again...'; sleep 10; done;" ] containers: - name: install-init image: {{ required "Missing .Values.web.image" .Values.web.image }}