Initial commit
This commit is contained in:
53
n8n/postgres/postgres-statefulset.yaml
Normal file
53
n8n/postgres/postgres-statefulset.yaml
Normal file
@@ -0,0 +1,53 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
namespace: n8n
|
||||
name: n8n-postgresql
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: n8n-postgresql
|
||||
serviceName: n8n-postgresql
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: n8n-postgresql
|
||||
spec:
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 60
|
||||
containers:
|
||||
- name: n8n-postgresql
|
||||
image: postgres:18
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
volumeMounts:
|
||||
- name: n8n-postgresql-database
|
||||
mountPath: /var/lib/postgresql/pgdata
|
||||
env:
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: n8n-secrets
|
||||
key: db_password
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: n8n-secrets
|
||||
key: db_user
|
||||
- name: POSTGRES_DB
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: n8n-secrets
|
||||
key: db_name
|
||||
volumes:
|
||||
- name: n8n-postgresql-database
|
||||
persistentVolumeClaim:
|
||||
claimName: n8n-postgresql-pvc
|
||||
Reference in New Issue
Block a user