diff --git a/postgres/config/clusters/main.yaml b/postgres/config/clusters/main.yaml index 2606d90..bf2d703 100644 --- a/postgres/config/clusters/main.yaml +++ b/postgres/config/clusters/main.yaml @@ -99,6 +99,12 @@ spec: login: true passwordSecret: name: attic-auth + - name: nextcloud + ensure: present + comment: nextcloud + login: true + passwordSecret: + name: nextcloud-auth - name: pooler ensure: present comment: pooler diff --git a/postgres/config/databases/nextcloud.yaml b/postgres/config/databases/nextcloud.yaml new file mode 100644 index 0000000..3a2a197 --- /dev/null +++ b/postgres/config/databases/nextcloud.yaml @@ -0,0 +1,9 @@ +apiVersion: postgresql.cnpg.io/v1 +kind: Database +metadata: + name: nextcloud +spec: + name: nextcloud + owner: nextcloud + cluster: + name: weyma-pgsql \ No newline at end of file diff --git a/postgres/config/nextcloud_auth.yaml b/postgres/config/nextcloud_auth.yaml new file mode 100644 index 0000000..dc9cf4e --- /dev/null +++ b/postgres/config/nextcloud_auth.yaml @@ -0,0 +1,25 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: nextcloud-auth +spec: + data: + - remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: cloudnativepg + metadataPolicy: None + property: nextcloud_pw + secretKey: password + refreshInterval: 1h + secretStoreRef: + kind: ClusterSecretStore + name: weyma-vault + target: + template: + data: + username: nextcloud + password: "{{ .password }}" + creationPolicy: Owner + deletionPolicy: Retain + name: nextcloud-auth