add postgres

This commit is contained in:
2025-05-19 14:32:14 -04:00
commit 33175dbe60
7 changed files with 791 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: weyma-pgsql
spec:
instances: 3
storage:
size: 20Gi
storageClass: rook-ceph-block
inheritedMetadata:
labels:
metrics_enabled: "true"
managed:
roles:
- name: williamp
ensure: present
comment: William Peebles
login: true
superuser: true
passwordSecret:
name: williamp-auth
- name: immich
ensure: present
comment: Immich
login: true
passwordSecret:
name: immich-auth

View File

@@ -0,0 +1,12 @@
apiVersion: postgresql.cnpg.io/v1
kind: Database
metadata:
name: immich-db
namespace: cloudnativepg
spec:
cluster:
name: weyma-pgsql
databaseReclaimPolicy: retain
ensure: present
name: immich
owner: immich

View File

@@ -0,0 +1,25 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: immich-auth
spec:
data:
- remoteRef:
conversionStrategy: Default
decodingStrategy: None
key: cloudnativepg
metadataPolicy: None
property: immich_pw
secretKey: password
refreshInterval: 1h
secretStoreRef:
kind: ClusterSecretStore
name: weyma-vault
target:
template:
data:
username: immich
password: "{{ .password }}"
creationPolicy: Owner
deletionPolicy: Retain
name: immich-auth

View File

@@ -0,0 +1,25 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: williamp-auth
spec:
data:
- remoteRef:
conversionStrategy: Default
decodingStrategy: None
key: cloudnativepg
metadataPolicy: None
property: williamp_pw
secretKey: password
refreshInterval: 1h
secretStoreRef:
kind: ClusterSecretStore
name: weyma-vault
target:
template:
data:
username: williamp
password: "{{ .password }}"
creationPolicy: Owner
deletionPolicy: Retain
name: williamp-auth