From b343ebeba02775eff12f4b120f59eb8419cc4ab6 Mon Sep 17 00:00:00 2001 From: William P Date: Sun, 8 Jun 2025 10:34:03 -0400 Subject: [PATCH] add gitea to cloudnativepg --- postgres/config/clusters/main.yaml | 8 +++++++- postgres/config/databases/gitea.yaml | 9 +++++++++ postgres/config/gitea_auth.yaml | 25 +++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 postgres/config/databases/gitea.yaml create mode 100644 postgres/config/gitea_auth.yaml diff --git a/postgres/config/clusters/main.yaml b/postgres/config/clusters/main.yaml index 709a252..caf2a95 100644 --- a/postgres/config/clusters/main.yaml +++ b/postgres/config/clusters/main.yaml @@ -41,4 +41,10 @@ spec: comment: authentik login: true passwordSecret: - name: authentik-auth \ No newline at end of file + name: authentik-auth + - name: gitea + ensure: present + comment: gitea + login: true + passwordSecret: + name: gitea-auth \ No newline at end of file diff --git a/postgres/config/databases/gitea.yaml b/postgres/config/databases/gitea.yaml new file mode 100644 index 0000000..a3ffc7d --- /dev/null +++ b/postgres/config/databases/gitea.yaml @@ -0,0 +1,9 @@ +apiVersion: postgresql.cnpg.io/v1 +kind: Database +metadata: + name: gitea +spec: + name: gitea + owner: gitea + cluster: + name: weyma-pgsql \ No newline at end of file diff --git a/postgres/config/gitea_auth.yaml b/postgres/config/gitea_auth.yaml new file mode 100644 index 0000000..e24f03b --- /dev/null +++ b/postgres/config/gitea_auth.yaml @@ -0,0 +1,25 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: gitea-auth +spec: + data: + - remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: cloudnativepg + metadataPolicy: None + property: gitea_pw + secretKey: password + refreshInterval: 1h + secretStoreRef: + kind: ClusterSecretStore + name: weyma-vault + target: + template: + data: + username: gitea + password: "{{ .password }}" + creationPolicy: Owner + deletionPolicy: Retain + name: gitea-auth