67 lines
1.5 KiB
YAML
67 lines
1.5 KiB
YAML
---
|
|
apiVersion: secretgenerator.mittwald.de/v1alpha1
|
|
kind: StringSecret
|
|
metadata:
|
|
name: memelord-laurivosandi-database
|
|
labels:
|
|
cnpg.io/reload: "true"
|
|
spec:
|
|
data:
|
|
username: memelord-laurivosandi
|
|
fields:
|
|
- fieldName: password
|
|
length: "32"
|
|
encoding: hex
|
|
---
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
kind: Cluster
|
|
metadata:
|
|
name: memelord-laurivosandi-database
|
|
spec:
|
|
instances: 2
|
|
imageName: ghcr.io/cloudnative-pg/postgresql:17
|
|
storage:
|
|
size: 1Gi
|
|
storageClass: postgres
|
|
affinity:
|
|
additionalPodAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
podAffinityTerm:
|
|
labelSelector:
|
|
matchLabels:
|
|
app: memelord
|
|
topologyKey: topology.kubernetes.io/zone
|
|
podAntiAffinityType: required
|
|
nodeSelector:
|
|
codemowers.io/lvm-ubuntu-vg: enterprise-ssd
|
|
resources:
|
|
requests:
|
|
cpu: "100m"
|
|
memory: "1Gi"
|
|
limits:
|
|
cpu: "1"
|
|
memory: "4Gi"
|
|
postgresql:
|
|
parameters:
|
|
max_connections: "300"
|
|
shared_buffers: "512MB"
|
|
effective_cache_size: "2GB"
|
|
managed:
|
|
roles:
|
|
- name: memelord-laurivosandi
|
|
ensure: present
|
|
login: true
|
|
passwordSecret:
|
|
name: memelord-laurivosandi-database
|
|
---
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
kind: Database
|
|
metadata:
|
|
name: memelord-laurivosandi
|
|
spec:
|
|
name: memelord-laurivosandi
|
|
owner: memelord-laurivosandi
|
|
cluster:
|
|
name: memelord-laurivosandi-database
|