Skip to content

Commit

Permalink
Merge pull request #14 from keephq/feature/make-database-optional
Browse files Browse the repository at this point in the history
feat: the waitForDatabase container can be disabled for external db u…
  • Loading branch information
shahargl authored Mar 12, 2024
2 parents 3dfee5a + ece6264 commit 8813209
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/keep/templates/keep-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/keep/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8813209

Please sign in to comment.