From 362e9d7afaecbda4a372b2f67a6db87c5bc58323 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Thu, 15 Aug 2024 15:18:06 +0200 Subject: [PATCH] feat(linkwarden): provision new DB --- linkwarden/kustomization.yaml | 2 ++ linkwarden/resources/db/db.yaml | 8 ++++++++ linkwarden/resources/db/user.yaml | 12 ++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 linkwarden/resources/db/db.yaml create mode 100644 linkwarden/resources/db/user.yaml diff --git a/linkwarden/kustomization.yaml b/linkwarden/kustomization.yaml index 20db401..4fb6d84 100644 --- a/linkwarden/kustomization.yaml +++ b/linkwarden/kustomization.yaml @@ -15,6 +15,8 @@ images: resources: - "resources/namespace.yaml" + - "resources/db/db.yaml" + - "resources/db/user.yaml" - "resources/deployment.yaml" - "resources/service.yaml" - "resources/http_routes.yaml" diff --git a/linkwarden/resources/db/db.yaml b/linkwarden/resources/db/db.yaml new file mode 100644 index 0000000..5996d52 --- /dev/null +++ b/linkwarden/resources/db/db.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: db.movetokube.com/v1alpha1 +kind: Postgres +metadata: + name: linkwarden +spec: + database: linkwarden + dropOnDelete: false \ No newline at end of file diff --git a/linkwarden/resources/db/user.yaml b/linkwarden/resources/db/user.yaml new file mode 100644 index 0000000..292461e --- /dev/null +++ b/linkwarden/resources/db/user.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: db.movetokube.com/v1alpha1 +kind: PostgresUser +metadata: + name: vaultwarden +spec: + role: vaultwarden + database: vaultwarden + secretName: vaultwarden-db-credentials + privileges: OWNER + secretTemplate: + PQ_URL: "postgresql://{{.Role}}:{{.Password}}@app-cluster-pooler-rw.postgres.svc:5432/{{.Database}}?sslmode=require" \ No newline at end of file