From 40f851e0b55e06a51b2b42750f42aceeedb8e09f Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Sat, 7 May 2022 07:59:58 +0000 Subject: [PATCH] Added db init job --- manifests/wallabag/wallabag.yaml | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/manifests/wallabag/wallabag.yaml b/manifests/wallabag/wallabag.yaml index adb3a7f..d1dc8fb 100644 --- a/manifests/wallabag/wallabag.yaml +++ b/manifests/wallabag/wallabag.yaml @@ -27,6 +27,52 @@ spec: selector: app.kubernetes.io/name: wallabag --- + +apiVersion: batch/v1 +kind: Job +metadata: + name: wallabag + namespace: wallabag + labels: + app.kubernetes.io/name: wallabag-init +spec: + template: + metadata: + labels: + app.kubernetes.io/name: wallabag-init + spec: + restartPolicy: OnFailure + containers: + - name: db-init + image: "docker.cluster.fun/dockerhub/wallabag/wallabag:2.4.3" + imagePullPolicy: IfNotPresent + envFrom: + - secretRef: + name: wallabag + env: + - name: "SYMFONY__ENV__DATABASE_CHARSET" + value: "utf8" + - name: "SYMFONY__ENV__DATABASE_DRIVER" + value: "pdo_pgsql" + - name: "SYMFONY__ENV__DATABASE_NAME" + value: "wallabag" + - name: "SYMFONY__ENV__DATABASE_TABLE_PREFIX" + value: "wallabag_" + - name: "SYMFONY__ENV__DOMAIN_NAME" + value: "https://wallabag.cluster.fun" + - name: "SYMFONY__ENV__FOSUSER_REGISTRATION" + value: "false" + - name: "SYMFONY__ENV__LOCALE" + value: "en" + - name: "TZ" + value: "UTC" + command: + - /var/www/wallabag/bin/console + - wallabag:install + - --env=prod + - --no-interaction + +--- apiVersion: apps/v1 kind: Deployment metadata: