add postgres
This commit is contained in:
30
postgres/config/cluster.yaml
Normal file
30
postgres/config/cluster.yaml
Normal 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
|
||||
12
postgres/config/databases/immich_db.yaml
Normal file
12
postgres/config/databases/immich_db.yaml
Normal 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
|
||||
25
postgres/config/immich_auth.yaml
Normal file
25
postgres/config/immich_auth.yaml
Normal 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
|
||||
25
postgres/config/williamp_auth.yaml
Normal file
25
postgres/config/williamp_auth.yaml
Normal 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
|
||||
Reference in New Issue
Block a user