stabilize prod statefulset gitops drift

This commit is contained in:
Prodiglagla
2026-06-14 12:41:42 +08:00
parent 5932f37fc0
commit a89e26b839
6 changed files with 85 additions and 5 deletions
+19 -1
View File
@@ -48,6 +48,11 @@ spec:
app.kubernetes.io/part-of: ircs
environment: prod
spec:
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
containers:
- name: postgres
image: postgres:18-alpine
@@ -55,6 +60,7 @@ spec:
ports:
- name: postgres
containerPort: 5432
protocol: TCP
env:
- name: POSTGRES_DB
value: ircs
@@ -72,14 +78,22 @@ spec:
command: ["pg_isready", "-U", "postgres", "-d", "ircs"]
failureThreshold: 30
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
exec:
command: ["pg_isready", "-U", "postgres", "-d", "ircs"]
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
livenessProbe:
exec:
command: ["pg_isready", "-U", "postgres", "-d", "ircs"]
failureThreshold: 3
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 1
resources:
requests:
cpu: 100m
@@ -90,8 +104,12 @@ spec:
volumeMounts:
- name: postgres-data
mountPath: /var/lib/postgresql/data
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeClaimTemplates:
- metadata:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-data
labels:
app: postgres