From a84dbabc4671ebeee0c6c81251a4238cf7e45828 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Tue, 30 Apr 2024 15:46:57 +0200 Subject: [PATCH] feat(umami): avoid DB check when starting container --- umami/resources/deployment.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/umami/resources/deployment.yaml b/umami/resources/deployment.yaml index 892a2fa..e7546bd 100644 --- a/umami/resources/deployment.yaml +++ b/umami/resources/deployment.yaml @@ -13,9 +13,36 @@ spec: labels: app.kubernetes.io/name: umami spec: + initContainer: + - name: init-db + image: umami + command: + - /app/node_modules/.bin/npm-run-all + args: + - check-db + - update-tracker + env: + - name: DATABASE_URL + valueFrom: + secretKeyRef: + name: default-cluster-pguser-umami + key: uri + envFrom: + - configMapRef: + name: umami-config + resources: + requests: + memory: "256Mi" + cpu: "150m" + limits: + memory: "384Mi" + cpu: "250m" containers: - name: umami image: umami + args: + - node + - server.js env: - name: DATABASE_URL valueFrom: