mirror of
https://github.com/RoboSats/robosats-deploy.git
synced 2025-07-30 14:41:44 +00:00
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
# postgres StatefulSet
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet # Create a statefulset
|
|
metadata:
|
|
name: postgres # Set the name of the deployment
|
|
labels:
|
|
app: postgres
|
|
spec:
|
|
replicas: 1 # Set 1 deployment replicas
|
|
selector:
|
|
matchLabels:
|
|
app: postgres
|
|
serviceName: postgres
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: postgres
|
|
spec:
|
|
containers:
|
|
- name: postgres
|
|
image: postgres:alpine3.16 # Docker image
|
|
imagePullPolicy: IfNotPresent
|
|
resources:
|
|
limits:
|
|
cpu: "100m"
|
|
memory: "300Mi"
|
|
requests:
|
|
cpu: "1m"
|
|
memory: "5Mi"
|
|
ports:
|
|
- containerPort: 5432 # Exposing the container port 5432 for postgres client connections.
|
|
envFrom:
|
|
- secretRef:
|
|
name: postgres-secret # Using the Secret postgres-secret
|
|
volumeMounts:
|
|
- mountPath: /var/lib/postgresql/data/
|
|
name: postgres-data
|
|
volumes:
|
|
- name: postgres-data
|
|
persistentVolumeClaim:
|
|
claimName: postgres-pvc |