From 5501b4cc0794327f28ddd98728f96fa87cdb9d9b Mon Sep 17 00:00:00 2001 From: RNRod Date: Wed, 26 Jul 2023 21:06:07 +0200 Subject: [PATCH] add database extension issue: https://git.badhouseplants.net/badhouseplants/k8s-cluster-config/issues/86 --- badhouseplants/values/values.gitea.yaml | 5 +++++ common/values.database.yaml | 16 ++++++++++++++++ releases.yaml | 9 +++++++++ 3 files changed, 30 insertions(+) create mode 100644 common/values.database.yaml diff --git a/badhouseplants/values/values.gitea.yaml b/badhouseplants/values/values.gitea.yaml index feeeba1..ceefb4a 100644 --- a/badhouseplants/values/values.gitea.yaml +++ b/badhouseplants/values/values.gitea.yaml @@ -20,6 +20,11 @@ istio: service: gitea-ssh port: 22 +database: + enabled: true + name: gitea-postgres + instance: postgres + replicaCount: 1 clusterDomain: cluster.local diff --git a/common/values.database.yaml b/common/values.database.yaml new file mode 100644 index 0000000..8a6a183 --- /dev/null +++ b/common/values.database.yaml @@ -0,0 +1,16 @@ +--- +database: + templates: + - | + --- + apiVersion: kinda.rocks/v1beta1 + kind: Database + metadata: + name: "{{ .Values.name }}" + spec: + secretName: "{{ .Values.name }}-creds" + instance: "{{ .Values.instance }}" + deletionProtected: false + backup: + enable: false + cron: 0 0 * * * diff --git a/releases.yaml b/releases.yaml index 65e1a59..20ed74b 100644 --- a/releases.yaml +++ b/releases.yaml @@ -71,6 +71,14 @@ templates: inherit: - template: default-common-values - template: default-env-values + + ext-database: + dependencies: + - chart: bedag/raw + version: 2.0.0 + alias: database + values: + - '{{ requiredEnv "PWD" }}/common/values.database.yaml' # ---------------------------- # -- Releases # ---------------------------- @@ -248,6 +256,7 @@ templates: - template: default-env-values - template: default-env-secrets - template: ext-istio-resource + - template: ext-database funkwhale: &funkwhale name: funkwhale