diff --git a/charts/keep/templates/keep-backend.yaml b/charts/keep/templates/keep-backend.yaml index 6d79e08..641e962 100644 --- a/charts/keep/templates/keep-backend.yaml +++ b/charts/keep/templates/keep-backend.yaml @@ -68,9 +68,12 @@ spec: resources: {{- toYaml .Values.backend.resources | nindent 12 }} initContainers: + {{- if .Values.backend.waitForDatabase }} - name: wait-for-database image: busybox command: ['sh', '-c', 'until nc -z keep-database 3306; do sleep 1; done;'] + {{- end }} + {{- with .Values.backend.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/keep/values.yaml b/charts/keep/values.yaml index fa9db47..9450627 100644 --- a/charts/keep/values.yaml +++ b/charts/keep/values.yaml @@ -8,6 +8,9 @@ fullnameOverride: "" backend: enabled: true + # if true, wait for the database to be ready before starting the API + # if you use external database, you can set this to false + waitForDatabase: true env: - name: SECRET_MANAGER_TYPE value: k8s